diff --git a/Docs/Readme.backtrace b/Docs/Readme.backtrace index ea40a5cbb..2bcec2446 100644 --- a/Docs/Readme.backtrace +++ b/Docs/Readme.backtrace @@ -27,7 +27,7 @@ statement before that. But it might print out thousands (or even millions) of line before it hits the segfault. With BACKTRACE, you could do - #include + #include #ifdef BL_BACKTRACING std::ostringstream ss; diff --git a/MiniApps/FillBoundary/GNUmakefile b/MiniApps/FillBoundary/GNUmakefile index b0650790d..cf618c44f 100644 --- a/MiniApps/FillBoundary/GNUmakefile +++ b/MiniApps/FillBoundary/GNUmakefile @@ -17,8 +17,8 @@ EBASE = fbtest CEXE_sources += MultiFabFillBoundaryTest.cpp -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs +include $(BOXLIB_HOME)/Src/Boundary/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/MiniApps/FillBoundary/MultiFabFillBoundaryTest.cpp b/MiniApps/FillBoundary/MultiFabFillBoundaryTest.cpp index 4fdb26c75..62daed7be 100644 --- a/MiniApps/FillBoundary/MultiFabFillBoundaryTest.cpp +++ b/MiniApps/FillBoundary/MultiFabFillBoundaryTest.cpp @@ -3,7 +3,7 @@ // -------------------------------------------------------------------------- // this file tests fillboundary. // -------------------------------------------------------------------------- -#include +#include #include #include @@ -15,12 +15,12 @@ #include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifdef BL_USE_SETBUF #define pubsetbuf setbuf diff --git a/MiniApps/MultiGrid_C/COEF_3D.F b/MiniApps/MultiGrid_C/COEF_3D.F index 580dbbce8..01afc883e 100644 --- a/MiniApps/MultiGrid_C/COEF_3D.F +++ b/MiniApps/MultiGrid_C/COEF_3D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include -#include "ArrayLim.H" +#include +#include "AMReX_ArrayLim.H" #include "COEF_F.H" -#include "LO_BCTYPES.H" +#include "AMReX_LO_BCTYPES.H" c----------------------------------------------------------------------- subroutine FORT_COMP_ASOL ( diff --git a/MiniApps/MultiGrid_C/COEF_F.H b/MiniApps/MultiGrid_C/COEF_F.H index 363b9d11d..667612cf1 100644 --- a/MiniApps/MultiGrid_C/COEF_F.H +++ b/MiniApps/MultiGrid_C/COEF_F.H @@ -1,7 +1,7 @@ #ifndef _COEFF_H_ #define _COEFF_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -29,7 +29,7 @@ #define FORT_COEF_TO_EDGES coef_to_edges_ #endif -#include +#include extern "C" { diff --git a/MiniApps/MultiGrid_C/GNUmakefile b/MiniApps/MultiGrid_C/GNUmakefile index f912be729..73b5cb287 100644 --- a/MiniApps/MultiGrid_C/GNUmakefile +++ b/MiniApps/MultiGrid_C/GNUmakefile @@ -31,16 +31,16 @@ EBASE = main CPPFLAGS += -DCG_USE_OLD_CONVERGENCE_CRITERIA -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CEXE_sources += $(EBASE).cpp include Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package all: $(executable) @echo SUCCESS -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/MiniApps/MultiGrid_C/RHS_3D.F b/MiniApps/MultiGrid_C/RHS_3D.F index 5397d370b..b3c36ef6c 100644 --- a/MiniApps/MultiGrid_C/RHS_3D.F +++ b/MiniApps/MultiGrid_C/RHS_3D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include -#include "ArrayLim.H" +#include +#include "AMReX_ArrayLim.H" #include "RHS_F.H" -#include "LO_BCTYPES.H" +#include "AMReX_LO_BCTYPES.H" c----------------------------------------------------------------------- diff --git a/MiniApps/MultiGrid_C/RHS_F.H b/MiniApps/MultiGrid_C/RHS_F.H index 2ad7615ff..b9b8c5abf 100644 --- a/MiniApps/MultiGrid_C/RHS_F.H +++ b/MiniApps/MultiGrid_C/RHS_F.H @@ -1,7 +1,7 @@ #ifndef _RHS_H_ #define _RHS_H_ -#include +#include #if defined(BL_LANG_FORT) #define FORT_SET_RHS set_rhs @@ -15,7 +15,7 @@ #define FORT_SET_RHS set_rhs_ #endif -#include +#include extern "C" { diff --git a/MiniApps/MultiGrid_C/main.cpp b/MiniApps/MultiGrid_C/main.cpp index 864e597a0..6b43f3762 100644 --- a/MiniApps/MultiGrid_C/main.cpp +++ b/MiniApps/MultiGrid_C/main.cpp @@ -4,16 +4,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/MiniApps/PGAS_SMC/GNUmakefile b/MiniApps/PGAS_SMC/GNUmakefile index 35aeb1204..3c4b9fd26 100644 --- a/MiniApps/PGAS_SMC/GNUmakefile +++ b/MiniApps/PGAS_SMC/GNUmakefile @@ -22,15 +22,15 @@ Bpack := ./Make.package EBASE = SMC -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs all: $(executable) @echo SUCCESS include ./Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules #----------------------------------------------------------------------------- diff --git a/MiniApps/PGAS_SMC/SMC.H b/MiniApps/PGAS_SMC/SMC.H index 98f659f2d..35b48b0be 100644 --- a/MiniApps/PGAS_SMC/SMC.H +++ b/MiniApps/PGAS_SMC/SMC.H @@ -1,10 +1,10 @@ #ifndef _SMC_H_ #define _SMC_H_ -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _OPEMP #include diff --git a/MiniApps/PGAS_SMC/SMC.cpp b/MiniApps/PGAS_SMC/SMC.cpp index eff2a5bf2..f06460221 100644 --- a/MiniApps/PGAS_SMC/SMC.cpp +++ b/MiniApps/PGAS_SMC/SMC.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include diff --git a/MiniApps/PGAS_SMC/SMC_F.H b/MiniApps/PGAS_SMC/SMC_F.H index a61d96460..3e088c223 100644 --- a/MiniApps/PGAS_SMC/SMC_F.H +++ b/MiniApps/PGAS_SMC/SMC_F.H @@ -1,7 +1,7 @@ #ifndef _SMC_F_H_ #define _SMC_F_H_ -#include +#include extern "C" { diff --git a/MiniApps/PGAS_SMC/SMC_io.cpp b/MiniApps/PGAS_SMC/SMC_io.cpp index 3214eddfa..fcf575a49 100644 --- a/MiniApps/PGAS_SMC/SMC_io.cpp +++ b/MiniApps/PGAS_SMC/SMC_io.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include #include diff --git a/MiniApps/PGAS_SMC/main.cpp b/MiniApps/PGAS_SMC/main.cpp index fe7cf7ed9..f7dc690ac 100644 --- a/MiniApps/PGAS_SMC/main.cpp +++ b/MiniApps/PGAS_SMC/main.cpp @@ -1,5 +1,5 @@ -#include +#include #include int diff --git a/ReleaseNotes/release-notes-16.04 b/ReleaseNotes/release-notes-16.04 deleted file mode 100644 index bcf707152..000000000 --- a/ReleaseNotes/release-notes-16.04 +++ /dev/null @@ -1,57 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.04 - -The development branch was merged into master on Apr 11, 2016. - -* Bug Fixes -** 1075b6babb32227 and ce604a709b0e22e8c -Fix a memory leak in CollectData(): must call MPI_Wait even though the -messages have been successfully sent. This bug was fixed was in -16.03.1. -** 8bae1b5c81a4166862 -Fix a bug in Fortran bndry_reg when the fine level has a single box -and covers the entire non-periodic domain. - -* Backward Incompatible Changes -** 652dc2b991dc7d1c3175 -The flux we pass into the F90 interface (in ml_solve.f90) for -cell-centered multigrid solvers now starts at the base level of the -solve, not one level higher. See fbf65dd6143a1 for an example of -changes required. - -* Other Changes -** Memory Profiler in C++: To Use it, compile with "MEM_PROFILE=TRUE". -** New version of restricted build to ml_layout that takes a minimum and maximum. -And a shallow copy is performed on ml_layout and ml_boxarray. -** New routine in Fortran MultiGrid to do a nodal sum and nodal volume, weighting -faces, edges, and corners appropriately -** Allow for factor 4 as well as factor 2 interpolation in create_umac_grown in Fortran. -** Add the option in the F90 interfaces to the cell-centered solver to have the -base level have Dirichlet boundary conditions at a distance away from -the boundary, not just at the boundary. You make this happen by -passing in base_level > 1 and crse_ratio = the ratio of dx between the -coarsest level of the solve to the coarser AMR level outside the -solve. -** Define BL_PROFILE_VAR_NS when PROFILE=TRUE -** Disable SIGFPE trapping by default. -** Clean up BLMap. -** Slack support in regression testing. -** Valgrind support in regression testing. -** Decrease the default max # allowed in Fortran copyassoc. -** Fix CMake for F_BaseLib. -** Utility from Aleks that writes the contents of a 2d plotfile into a text file, -one line per data point - -* Compilers -** GCC does not correctly inline some of the functions. We had to explicitly -use the noinline attribute on a few functions. -** Add C++11 for Cray. -** Turn off debug symbols for optimized code with Cray, because using -"-g" or "-G2" significantly reduces code performance. -** Add more debug information flags to Intel. -** Remove explicit "-lmpich" flag for Edison and Cori. -** Optimization reports for Cray. -** Use gnu99 instead of c99 for GNU because some of the strtok_r function we use -in Combustion/Chemistry is not a standard C99 function. diff --git a/ReleaseNotes/release-notes-16.05 b/ReleaseNotes/release-notes-16.05 deleted file mode 100644 index 37a2042cc..000000000 --- a/ReleaseNotes/release-notes-16.05 +++ /dev/null @@ -1,26 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.05 - -The development branch was merged into master on May 2, 2016. - -* Bug Fix -** e972938c3b825e2fd96c353e50492f4a0b045884 -This commit fixed a bug in Geometry::PeriodicCopy when copying into -the destination's ghost cells. Parallel-copying into ghost cells is a -new feature. It's unlikely any code has been using it. - -* New Features -** New runtime parameter DistributionMapping.node_size=0. -When space-filling curve (SFC) is used for DistributionMapping and -this parameter is changed to say 24 on Edison, every 24 MPI processes -will be in the same team for a chunk of SFC, and the Knapsack scheme -is then used inside the team to further distribute the boxes to -individual processes. For flat MPI runs, this might help load -balance while maintaining data locality. -** TINY_PROFILE -This profiler only supports a tiny fraction of what the full BoxLib -profiler can offer. However, it does not need post-processing to -obtain inclusive times and it does not write any data to the disk -(other than the final report to stdout). diff --git a/ReleaseNotes/release-notes-16.06 b/ReleaseNotes/release-notes-16.06 deleted file mode 100644 index 8416e8df5..000000000 --- a/ReleaseNotes/release-notes-16.06 +++ /dev/null @@ -1,40 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.06 - -The development branch was merged into master on Jun 4, 2016. - -* New Features -** Fortran bl_random_module -There is a new random number module in Fortran BoxLib. This module -used C++11's random number generator, Mersenne Twister, and provides -uniform real, normal, Poisson, and binomial distributions. Unlike the -other existing random number generators in both C++ and Fortran -BoxLib, this new module allows multiple independent random number -generators. If this feature is needed in C++ BoxLib codes, we can -implement this in C++ BoxLib too. -** Multi-Color -This allows us to split the default MPI communicator into -boxlib.ncolors sub-communicators. See Tutorials/MultiColor_c for an -example of solving multiple linear systems in multiple -sub-communicators. -** Improved regression test script -** Added nodal injection - -* Major Changes -** FillPatchIterator and FluxRegister now use parallel copy and FillBoundary -functions instead of CollectData for communication if -amr.blocking_factor is large enough (e.g., >=8 when filling 4 ghost -cells with second spatial interpolation). This avoids the use of -MPI_Alltoall. -** DistributionMap now use std::pair instead of int as key to the cache. -The first of the pair is the number of boxes. The second is used to -represented communicator color. However, it can also be used for -general purpose to allow BoxArrays with the same number of boxes to -be distributed differently. - -* Make System -** removed some old machines and Intel < 13 -** Support for F90 file preprocessing in Fortran BoxLib -** disable -g on PGI when using OpenACC for performance reason diff --git a/ReleaseNotes/release-notes-16.07 b/ReleaseNotes/release-notes-16.07 deleted file mode 100644 index c66e411c1..000000000 --- a/ReleaseNotes/release-notes-16.07 +++ /dev/null @@ -1,37 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.07 - -The development branch was merged into master on July 5, 2016. - -* Bug Fixes -** Fortran BoxLib ml_layout -In subroutine ml_layout_build that takes a layout array as input, set -the pmask flag in ml_layout to that of the input layout array. -** C++ IArrayBox -IArrayBox::Initialize should return immediately if it has been called -already. - -* Backward Incompatible Changes -** Fortran bl_random_module -Separate engine from distribution following C++ standard. This makes -the module more flexible. - -* Other Changes -** Tiling in Fortran linear solvers -The cell-centered non-skewed GSRB and restriction are tiled. -** Floating point exceptions trapping -The backtrace module in Fortran BoxLib has a new subroutine -set_fpe_trap that can be used to turn on floating point exceptions -trapping. The exceptions include NaNs, divided by zero, and overflow. -** Tools/Postprocessing/F_Src/fcompare.f90 -It now has the ability to inspect the zone where the largest error -(for a given variable) is set. - -* Compiler Issues -** GCC 6.1.1 -GCC 6.1.1 has a bug that affects Fortran BoxLib's function -init_layout_tilearray. By changing it from function to subroutine -fixes the issue. - diff --git a/ReleaseNotes/release-notes-16.08 b/ReleaseNotes/release-notes-16.08 deleted file mode 100644 index 9e9508693..000000000 --- a/ReleaseNotes/release-notes-16.08 +++ /dev/null @@ -1,51 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.08 - -The development branch was merged into master on Auguest 1, 2016. - -* New Features -** Sidecars have been merged into the master branch. -See BoxLib/Docs/Readme.sidecars for more details. - -* Bug Fixes -** Fix a minor bug in Fortran tilearray counter for memory profiling. -Note that this bug affected neither simulation results nor actual memory usage. - -* Backward Incompatible Changes -** BoxArray::define(const BoxArray& rhs) -has been removed. "lhs = rhs" can be used instead. -** Remove edge_restriction.f90 because all its functions are already duplicated in -cc_restrition_module and the edge restriction functions are called by -functions in ml_cc_restriction_module. Note that there is no -ml_edge_restriction_module. - -* Major Changes -** Parallel communication cache -is reimplemented using BoxArray/DistributionMap keys. The new -approach avoids holding up BoxArrays that have been removed from the -run. -** VisMF is now class for FabArray, not just MultiFab. -** Fortran random module now support single precision. -** Fortran random module allows using FluctHydro/HydroGrid distribution. -** Lots of improvement in the regressing test script. -** Coarsened BoxArrays are kept in cache as long as the fine BoxArray is alive. -This can avoid building coarse BoxArrays again and again. -** bl_deallocate now nullifies fortran pointer. -** Memory profiling now keeps track of the number of BoxArrays and MultiFabs. -** Fourth order interpolation in fillpatch in Fortran BoxLib -now sets stencil width automatically. -** Write a plotfile on demand with plot_and_continue - -* Make System -** 'make file_locations' will printout where in the VPATH each source file is found -as well as indicate which files are not found. -** Make.local: Users now can have its own Make.local. Because it is included -near the very end of setting up make definitions, one can use to -override variables such as compiler options. -** New options USE_VTUNE and USE_ITTNOTIFY for Intel compilers. -** HPGMG: DUNLIMIT_FMG_VCYCLES -> DUNLIMIT_FMG_VCYCLES -** Add libquadmath when compiling with gfortran - - diff --git a/ReleaseNotes/release-notes-16.09 b/ReleaseNotes/release-notes-16.09 deleted file mode 100644 index fe6f8c543..000000000 --- a/ReleaseNotes/release-notes-16.09 +++ /dev/null @@ -1,79 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.09 - -The development branch was merged into master on September 1, 2016. - -* New Features -** Multigrid solvability -You can pass in an optional argument to ml_cc_solve, -ok_to_fix_singular=.false. (default true). If false, the multigrid -solver will not subtract off the average of the RHS for singular -matrices. Useful for debugging singular problems if you want to see, -e.g., if S integrates to zero for low mach codes, or if total charge -integrates to zero for electrostatic potential solves. -** FabArray::FillBoundary, EnforcePeriodicity and copy -FabArray::FillBoundary and FabArray::copy can take a Periodicity -argument and perform operations for periodic boundaries. -FabArray::EnforcePeriodicity is a new function that fills cells (not -necessarily ghost cells) outside the domain with periodically shifted -data that are inside the domain. -** FabArray::BuildMask -This new function fills a FabArray with provided mask values for ghost -cells overlapping with valid cells, ghost cell not overlapping with -valid cells, cells outside the physical domain, and valid cells. -** Extrapolater -This provides first-order extrapolation for a MulitFab's ghost -cells. -** ParallelDescriptor::Gatherv -For int type offset, this is a wrapper for MPI_gatherv. Additionally, -it also supports long int as offset. Note that MPI_gatherv does not -support using long int for offset. -** DistributionMapping::makeKnapSack -This static function makes a KnapSack DistributionMapping object -given a MultiFab of custom weight. -** BoxLib::InterpFromCoarseLevel -This function fills the destination MultiFab with interpolation of -data on a coarse level. This is useful for data that are not in -StateData of an AmrLevel. - -* Bug Fixes -** OMP race conditions in FArrayBox::Initialize -When the number of boxes is less than the number MPI processes, there -was a possibility that race conditions can occur in -FArrayBox::Initialize function. This is now fixed. -** I/O problem on Titan -The file system on Titan seems to have a bug. It reproducibly -generates corrupted checkpoint files for certain tests. We do not -believe it is due to a bug in BoxLib. Nevertheless, a way has been -found to get around the problem. - -* Backward Incompatible Changes -** BoxLib::bdryLo and bdryNode -The behavior of bdryLo and bdryNode has changed when len>1 because the -old behavior is determined to be undesired. It should be noted that -these functions have never been called with len>1 in any codes to the -best of our knowledge. - -* Deprecated Functions -** BoxLib::fill_boundary, Geometry::FillPeriodicBoundary and Geometry::PeriodicCopy -These functions are now deprecated, and they will be removed in the -next release. One should use FabArray::FillBoundary and -FabArray::copy instead. - -* Major Changes -** BoxArray -By introducing BATransformer class that can convert the box internally -stored in BoxArray to the box of the public interface, different -BoxArrays with the same origin can now share the internal data. This -greatly reduces the metadata size. -** FabSet -FabSet now contains a MultiFab member instead of deriving from -MultiFab. This allows flexibility in hiding MultiFab methods that -are not meant for FabSet. -** Communication Cache -We have reimplemented how communication metadata are cached. - -* Make System -** fix for CMake diff --git a/ReleaseNotes/release-notes-16.10 b/ReleaseNotes/release-notes-16.10 deleted file mode 100644 index 3b99cc5f5..000000000 --- a/ReleaseNotes/release-notes-16.10 +++ /dev/null @@ -1,38 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.10 - -The development branch was merged into master on October 3, 2016. - -* New Features -** Reduce duplicated BoxArrays after restart. -** MultiFab::SumBoundary works on nodal data now. -** MultiFab::AddProduct that computes dst += src1*src2. -** Add two more initialization routines for particles. -** Add FluxRegister::ClearInternalBorders that zeros out fine/fine fluxes in FluxRegister. -** Add FabSet::plusTo (a MultiFab) -** MultiFab::Xpay and BaseFab::xpay that do y = x + a*y -** Add MultiFab::Dot that returns the scalar dot product of two MultiFabs. -** Add MultiFab::LinComb that computes linear combination of two MultiFabs. -** New bl_fort_module Fortran module for C++. The module contains c_real -data type matching Real in C++. - -* Backward Incompatible Changes -** Remove deprecated Geometry::FillPeriodicBoundary and Geometry::PeriodicCopy - -* Major Changes -** Some Nyx specific Particle functions have been moved out of BoxLib. -** Updating User's Guide -** New tutorial and cleanup of C++ tutorials. -** Simplify boundary filling process for MultiFab not in StateData. -** Some OpenMP and tiling in linear solvers. -** BaseFab Fortran functions are now dimension agnostic. -** Call various Initialize() in BoxLib::Initialize() to ensure thread safety -** C_BoundaryLib: new MultiMask class based on MultiFab to replace the implementation -based map of Fabs. - -* Make -** Add -Mbounds for PGI in debug mode -** Set up VPATH_LOCATIONS and INCLUDE_LOCATIONS in various Make.package and add vpath -to Make.rules so that the user does not need to do it. diff --git a/ReleaseNotes/release-notes-16.11 b/ReleaseNotes/release-notes-16.11 deleted file mode 100644 index bb6b035cb..000000000 --- a/ReleaseNotes/release-notes-16.11 +++ /dev/null @@ -1,35 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.11 - -The development branch was merged into master on November 1, 2016. - -* New Features -** Some AMR core functionalites have been moved into a new directory, -Src/C_AmrCoreLib, and part of the Amr class is now in a new class, -AmrCore. This allows the user to write an Amr application without -using Amr, AmrLevel and StateData classes. An example of this can be -found at Tutorials/AMR_Adv_C_v2/. -** New BaseFab::make_alias function that makes an alias to an existing BaseFab -with the component 0 pointing to a given component in the original -BaseFab. -** Add support for strings in ParmParse on Fortran side of C++ BoxLib based codes. -** New preprocessing approach for F90 files. -Int the new approach, cpp is used on the F90 file, a script is then -applied on the proprocessed file to figure out module dependency, and -finally the original F90 file is sent to the compiler for generating -.o files, which will also handle preprocessing. -** Particle can now template on container type, vector or deque. -** A new template parameter is add to support integer data. - -* Backward Incompatible Changes -Particle now requires C++11. - -* Other Changes -** Regression test script no longer requires probin file for C++ code. -** The times stored in StateData can now be synchronized with the level 0 time -in postCoarseTimeStep. -** Most of the Particle stuff is now in C_ParticleLib. -** Many functions in Particle have been moved into Nyx. - diff --git a/ReleaseNotes/release-notes-16.12 b/ReleaseNotes/release-notes-16.12 deleted file mode 100644 index d76b4c2bc..000000000 --- a/ReleaseNotes/release-notes-16.12 +++ /dev/null @@ -1,23 +0,0 @@ -#-*- mode: org -*- -#+STARTUP: showall - - Release Notes for BoxLib 16.12 - -The development branch was merged into master on December 2, 2016. - -* Major Changes in C++ BoxLib - -** C++11 is now required. -This may require some small changes in application codes. Thanks to -C++11 rvalue ref-qualifier, flaws leading to potential dangling -pointers and references have been plugged. A few bugs in Box are -fixed. - -** New I/O -Significant changes have been to I/O. Many performance tuning -parameters have been introduced. See Docs/Readme.io for details. - -** Make system -The make system has gone through a lot of cleanups. See -Tools/C_mk/READ.md for details on the current make system. - diff --git a/Src/C_AMRLib/ARRAYLIM_1D.F b/Src/Amr/AMReX_ARRAYLIM_1D.F similarity index 98% rename from Src/C_AMRLib/ARRAYLIM_1D.F rename to Src/Amr/AMReX_ARRAYLIM_1D.F index a323fa552..c01ef6385 100644 --- a/Src/C_AMRLib/ARRAYLIM_1D.F +++ b/Src/Amr/AMReX_ARRAYLIM_1D.F @@ -4,7 +4,7 @@ #define BL_LANG_FORT #endif -#include +#include #define SDIM 1 diff --git a/Src/C_AMRLib/ARRAYLIM_2D.F b/Src/Amr/AMReX_ARRAYLIM_2D.F similarity index 98% rename from Src/C_AMRLib/ARRAYLIM_2D.F rename to Src/Amr/AMReX_ARRAYLIM_2D.F index 1fc6fd120..43df513b1 100644 --- a/Src/C_AMRLib/ARRAYLIM_2D.F +++ b/Src/Amr/AMReX_ARRAYLIM_2D.F @@ -4,7 +4,7 @@ #define BL_LANG_FORT #endif -#include +#include #define SDIM 2 diff --git a/Src/C_AMRLib/ARRAYLIM_3D.F b/Src/Amr/AMReX_ARRAYLIM_3D.F similarity index 98% rename from Src/C_AMRLib/ARRAYLIM_3D.F rename to Src/Amr/AMReX_ARRAYLIM_3D.F index d89ceba39..102445265 100644 --- a/Src/C_AMRLib/ARRAYLIM_3D.F +++ b/Src/Amr/AMReX_ARRAYLIM_3D.F @@ -4,7 +4,7 @@ #define BL_LANG_FORT #endif -#include +#include #define SDIM 3 diff --git a/Src/C_AMRLib/Amr.H b/Src/Amr/AMReX_Amr.H similarity index 97% rename from Src/C_AMRLib/Amr.H rename to Src/Amr/AMReX_Amr.H index 15e728243..83df504b0 100644 --- a/Src/C_AMRLib/Amr.H +++ b/Src/Amr/AMReX_Amr.H @@ -3,18 +3,18 @@ #define _Amr_H_ #include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include #ifdef USE_STATIONDATA -#include +#include #endif class AmrLevel; @@ -226,11 +226,11 @@ public: // // AmrLevel lev. // - AmrLevel& getLevel (int lev) { return amr_level[lev]; } + AmrLevel& getLevel (int lev) { return *amr_level[lev]; } // - // PArray of AmrLevels. + // Array of AmrLevels. // - PArray& getAmrLevels (); + Array >& getAmrLevels (); // // Total number of cells. // @@ -499,7 +499,7 @@ protected: // std::string regrid_grids_file; // Grids file that will bypass regridding. std::string initial_grids_file; // Grids file that will bypass regridding only at initialization. - PArray amr_level; // Array of levels + Array > amr_level; // Array of levels Real cumtime; // Physical time variable. Real start_time; // Physical time this simulation started. Array dt_level; // Timestep at this level. @@ -538,7 +538,7 @@ protected: std::ofstream gridlog; std::ofstream runlog; std::ofstream runlog_terse; - PArray datalog; + Array > datalog; Array datalogname; int sub_cycle; std::string restart_chkfile; diff --git a/Src/C_AMRLib/Amr.cpp b/Src/Amr/AMReX_Amr.cpp similarity index 94% rename from Src/C_AMRLib/Amr.cpp rename to Src/Amr/AMReX_Amr.cpp index 4ca063d16..fd9773805 100644 --- a/Src/C_AMRLib/Amr.cpp +++ b/Src/Amr/AMReX_Amr.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include @@ -17,33 +17,33 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef MG_USE_FBOXLIB #include #endif #ifdef BL_LAZY -#include +#include #endif #ifdef BL_MEM_PROFILING -#include +#include #endif #ifdef BL_USE_ARRAYVIEW @@ -142,7 +142,7 @@ bool Amr::Plot_Files_Output () { return plot_files_output; } std::ostream& Amr::DataLog (int i) { - return datalog[i]; + return *datalog[i]; } int @@ -164,7 +164,7 @@ Amr::setDtMin (const Array& dt_min_in) dt_min[i] = dt_min_in[i]; } -PArray& +Array >& Amr::getAmrLevels () { return amr_level; @@ -173,13 +173,13 @@ Amr::getAmrLevels () long Amr::cellCount (int lev) { - return amr_level[lev].countCells(); + return amr_level[lev]->countCells(); } int Amr::numGrids (int lev) { - return amr_level[lev].numGrids(); + return amr_level[lev]->numGrids(); } MultiFab* @@ -188,14 +188,12 @@ Amr::derive (const std::string& name, int lev, int ngrow) { - return amr_level[lev].derive(name,time,ngrow); + return amr_level[lev]->derive(name,time,ngrow); } Amr::Amr () : - AmrCore(), - amr_level(PArrayManage), - datalog(PArrayManage) + AmrCore() { Initialize(); InitAmr(); @@ -203,9 +201,7 @@ Amr::Amr () Amr::Amr (const RealBox* rb, int max_level_in, const Array& n_cell_in, int coord) : - AmrCore(rb,max_level_in,n_cell_in,coord), - amr_level(PArrayManage), - datalog(PArrayManage) + AmrCore(rb,max_level_in,n_cell_in,coord) { Initialize(); InitAmr(); @@ -642,9 +638,9 @@ Amr::setRecordDataInfo (int i, const std::string& filename) { if (ParallelDescriptor::IOProcessor()) { - datalog.set(i,new std::fstream); - datalog[i].open(filename.c_str(),std::ios::out|std::ios::app); - if (!datalog[i].good()) + datalog[i].reset(new std::fstream); + datalog[i]->open(filename.c_str(),std::ios::out|std::ios::app); + if (!datalog[i]->good()) BoxLib::FileOpenFailed(filename); } ParallelDescriptor::Barrier("Amr::setRecordDataInfo"); @@ -675,7 +671,7 @@ Amr::cellCount () { long cnt = 0; for (int i = 0; i <= finest_level; i++) - cnt += amr_level[i].countCells(); + cnt += amr_level[i]->countCells(); return cnt; } @@ -684,7 +680,7 @@ Amr::numGrids () { int cnt = 0; for (int i = 0; i <= finest_level; i++) - cnt += amr_level[i].numGrids(); + cnt += amr_level[i]->numGrids(); return cnt; } @@ -693,7 +689,7 @@ Amr::okToContinue () { int ok = true; for (int i = 0; ok && (i <= finest_level); i++) - ok = ok && amr_level[i].okToContinue(); + ok = ok && amr_level[i]->okToContinue(); if(bUserStopRequest) { ok = false; } @@ -716,7 +712,7 @@ Amr::writePlotFile () if (first_plotfile) { first_plotfile = false; - amr_level[0].setPlotVariables(); + amr_level[0]->setPlotVariables(); } Real dPlotFileTime0 = ParallelDescriptor::second(); @@ -749,7 +745,7 @@ Amr::writePlotFile () BoxLib::UtilRenameDirectoryToOld(pltfile, false); // dont call barrier BoxLib::UtilCreateCleanDirectory(pltfileTemp, false); // dont call barrier for(int i(0); i <= finest_level; ++i) { - amr_level[i].CreateLevelDirectory(pltfileTemp); + amr_level[i]->CreateLevelDirectory(pltfileTemp); } ParallelDescriptor::Barrier("Amr::precreate plotfile Directories"); } else { @@ -780,7 +776,7 @@ Amr::writePlotFile () } for (int k(0); k <= finest_level; ++k) { - amr_level[k].writePlotFile(pltfileTemp, HeaderFile); + amr_level[k]->writePlotFile(pltfileTemp, HeaderFile); } if (ParallelDescriptor::IOProcessor()) { @@ -835,7 +831,7 @@ Amr::writeSmallPlotFile () if (first_smallplotfile) { first_smallplotfile = false; - amr_level[0].setSmallPlotVariables(); + amr_level[0]->setSmallPlotVariables(); } // Don't continue if we have no variables to plot. @@ -875,7 +871,7 @@ Amr::writeSmallPlotFile () BoxLib::UtilRenameDirectoryToOld(pltfile, false); // dont call barrier BoxLib::UtilCreateCleanDirectory(pltfileTemp, false); // dont call barrier for(int i(0); i <= finest_level; ++i) { - amr_level[i].CreateLevelDirectory(pltfileTemp); + amr_level[i]->CreateLevelDirectory(pltfileTemp); } ParallelDescriptor::Barrier("Amr::precreate smallplotfile Directories"); } else { @@ -907,7 +903,7 @@ Amr::writeSmallPlotFile () } for (int k(0); k <= finest_level; ++k) { - amr_level[k].writeSmallPlotFile(pltfileTemp, HeaderFile); + amr_level[k]->writeSmallPlotFile(pltfileTemp, HeaderFile); } if (ParallelDescriptor::IOProcessor()) { @@ -1033,7 +1029,7 @@ Amr::init (Real strt_time, if (first_plotfile) { first_plotfile = false; - amr_level[0].setPlotVariables(); + amr_level[0]->setPlotVariables(); } #endif @@ -1206,12 +1202,12 @@ Amr::FinalizeInit (Real strt_time, // // Compute dt and set time levels of all grid data. // - amr_level[0].computeInitialDt(finest_level, - sub_cycle, - n_cycle, - ref_ratio, - dt_level, - stop_time); + amr_level[0]->computeInitialDt(finest_level, + sub_cycle, + n_cycle, + ref_ratio, + dt_level, + stop_time); // // The following was added for multifluid. // @@ -1230,10 +1226,10 @@ Amr::FinalizeInit (Real strt_time, bldFineLevels(strt_time); for (int lev = 0; lev <= finest_level; lev++) - amr_level[lev].setTimeLevel(strt_time,dt_level[lev],dt_level[lev]); + amr_level[lev]->setTimeLevel(strt_time,dt_level[lev],dt_level[lev]); for (int lev = 0; lev <= finest_level; lev++) - amr_level[lev].post_regrid(0,finest_level); + amr_level[lev]->post_regrid(0,finest_level); for (int lev = 0; lev <= finest_level; lev++) { @@ -1245,7 +1241,7 @@ Amr::FinalizeInit (Real strt_time, // Perform any special post_initialization operations. // for(int lev(0); lev <= finest_level; ++lev) { - amr_level[lev].post_init(stop_time); + amr_level[lev]->post_init(stop_time); } if (ParallelDescriptor::IOProcessor()) @@ -1468,17 +1464,17 @@ Amr::restart (const std::string& filename) // for (int lev(0); lev <= finest_level; ++lev) { - amr_level.set(lev,(*levelbld)()); - amr_level[lev].restart(*this, is); - this->SetBoxArray(lev, amr_level[lev].boxArray()); - this->SetDistributionMap(lev, DistributionMapping(amr_level[lev].boxArray(), + amr_level[lev].reset((*levelbld)()); + amr_level[lev]->restart(*this, is); + this->SetBoxArray(lev, amr_level[lev]->boxArray()); + this->SetDistributionMap(lev, DistributionMapping(amr_level[lev]->boxArray(), ParallelDescriptor::NProcs())); } // // Build any additional data structures. // - for (int lev(0); lev <= finest_level; ++lev) { - amr_level[lev].post_restart(); + for (int lev = 0; lev <= finest_level; lev++) { + amr_level[lev]->post_restart(); } } else { @@ -1535,18 +1531,19 @@ Amr::restart (const std::string& filename) // // Read levels. // - for (int lev(0); lev <= new_finest_level; ++lev) { - amr_level.set(lev,(*levelbld)()); - amr_level[lev].restart(*this, is); - this->SetBoxArray(lev, amr_level[lev].boxArray()); - this->SetDistributionMap(lev, DistributionMapping(amr_level[lev].boxArray(), + for (int lev = 0; lev <= new_finest_level; lev++) + { + amr_level[lev].reset((*levelbld)()); + amr_level[lev]->restart(*this, is); + this->SetBoxArray(lev, amr_level[lev]->boxArray()); + this->SetDistributionMap(lev, DistributionMapping(amr_level[lev]->boxArray(), ParallelDescriptor::NProcs())); } // // Build any additional data structures. // - for (int lev(0); lev <= new_finest_level; ++lev) { - amr_level[lev].post_restart(); + for (int lev = 0; lev <= new_finest_level; lev++) { + amr_level[lev]->post_restart(); } } @@ -1640,7 +1637,7 @@ Amr::checkPoint () BoxLib::UtilRenameDirectoryToOld(ckfile, false); // dont call barrier BoxLib::UtilCreateCleanDirectory(ckfileTemp, false); // dont call barrier for(int i(0); i <= finest_level; ++i) { - amr_level[i].CreateLevelDirectory(ckfileTemp); + amr_level[i]->CreateLevelDirectory(ckfileTemp); } ParallelDescriptor::Barrier("Amr::precreateDirectories"); } else { @@ -1696,8 +1693,8 @@ Amr::checkPoint () HeaderFile << '\n'; } - for(int i(0); i <= finest_level; ++i) { - amr_level[i].checkPoint(ckfileTemp, HeaderFile); + for (int i = 0; i <= finest_level; ++i) { + amr_level[i]->checkPoint(ckfileTemp, HeaderFile); } if (ParallelDescriptor::IOProcessor()) { @@ -1821,14 +1818,14 @@ Amr::timeStep (int level, if ( compute_new_dt_on_regrid && (i == 0) ) { int post_regrid_flag = 1; - amr_level[0].computeNewDt(finest_level, - sub_cycle, - n_cycle, - ref_ratio, - dt_min, - dt_level, - stop_time, - post_regrid_flag); + amr_level[0]->computeNewDt(finest_level, + sub_cycle, + n_cycle, + ref_ratio, + dt_min, + dt_level, + stop_time, + post_regrid_flag); } for (int k(i); k <= finest_level; ++k) { @@ -1873,7 +1870,7 @@ Amr::timeStep (int level, << std::endl; } BL_PROFILE_REGION_START("amr_level.advance"); - Real dt_new = amr_level[level].advance(time,dt_level[level],iteration,niter); + Real dt_new = amr_level[level]->advance(time,dt_level[level],iteration,niter); BL_PROFILE_REGION_STOP("amr_level.advance"); dt_min[level] = iteration == 1 ? dt_new : std::min(dt_min[level],dt_new); @@ -1886,17 +1883,17 @@ Amr::timeStep (int level, std::cout << "[Level " << level << " step " << level_steps[level] << "] "; std::cout << "Advanced " - << amr_level[level].countCells() + << amr_level[level]->countCells() << " cells" << std::endl; } #ifdef USE_STATIONDATA - station.report(time+dt_level[level],level,amr_level[level]); + station.report(time+dt_level[level],level,*amr_level[level]); #endif #ifdef USE_SLABSTAT - AmrLevel::get_slabstat_lst().update(amr_level[level],time,dt_level[level]); + AmrLevel::get_slabstat_lst().update(*amr_level[level],time,dt_level[level]); #endif // // Advance grids at higher level. @@ -1920,7 +1917,7 @@ Amr::timeStep (int level, } } - amr_level[level].post_timestep(iteration); + amr_level[level]->post_timestep(iteration); // Set this back to negative so we know whether we are in fact in this routine which_level_being_advanced = -1; @@ -1948,23 +1945,23 @@ Amr::coarseTimeStep (Real stop_time) if (levelSteps(0) > 0) { int post_regrid_flag = 0; - amr_level[0].computeNewDt(finest_level, - sub_cycle, - n_cycle, - ref_ratio, - dt_min, - dt_level, - stop_time, - post_regrid_flag); + amr_level[0]->computeNewDt(finest_level, + sub_cycle, + n_cycle, + ref_ratio, + dt_min, + dt_level, + stop_time, + post_regrid_flag); } else { - amr_level[0].computeInitialDt(finest_level, - sub_cycle, - n_cycle, - ref_ratio, - dt_level, - stop_time); + amr_level[0]->computeInitialDt(finest_level, + sub_cycle, + n_cycle, + ref_ratio, + dt_level, + stop_time); } BL_PROFILE_REGION_START(stepName.str()); @@ -1975,7 +1972,7 @@ Amr::coarseTimeStep (Real stop_time) cumtime += dt_level[0]; - amr_level[0].postCoarseTimeStep(cumtime); + amr_level[0]->postCoarseTimeStep(cumtime); #ifdef BL_PROFILING #ifdef DEBUG @@ -2186,7 +2183,7 @@ Amr::writePlotNow() return ( (plot_int > 0 && level_steps[0] % plot_int == 0) || plot_test == 1 || - amr_level[0].writePlotNow()); + amr_level[0]->writePlotNow()); } bool @@ -2212,7 +2209,7 @@ Amr::writeSmallPlotNow() return ( (small_plot_int > 0 && level_steps[0] % small_plot_int == 0) || plot_test == 1 || - amr_level[0].writeSmallPlotNow()); + amr_level[0]->writeSmallPlotNow()); } void @@ -2270,11 +2267,11 @@ Amr::defBaseLevel (Real strt_time, // // Now build level 0 grids. // - amr_level.set(0,(*levelbld)(*this,0,Geom(0),lev0,strt_time)); + amr_level[0].reset((*levelbld)(*this,0,Geom(0),lev0,strt_time)); // // Now init level 0 grids with data. // - amr_level[0].initData(); + amr_level[0]->initData(); } void @@ -2298,14 +2295,14 @@ Amr::regrid (int lbase, } bool regrid_level_zero = (!initial) && - (lbase == 0 && new_grid_places[0] != amr_level[0].boxArray()); + (lbase == 0 && new_grid_places[0] != amr_level[0]->boxArray()); const int start = regrid_level_zero ? 0 : lbase+1; bool grids_unchanged = finest_level == new_finest; for (int lev = start, End = std::min(finest_level,new_finest); lev <= End; lev++) { - if (new_grid_places[lev] == amr_level[lev].boxArray()) { - new_grid_places[lev] = amr_level[lev].boxArray(); // to avoid duplicates + if (new_grid_places[lev] == amr_level[lev]->boxArray()) { + new_grid_places[lev] = amr_level[lev]->boxArray(); // to avoid duplicates } else { grids_unchanged = false; } @@ -2327,13 +2324,13 @@ Amr::regrid (int lbase, // Reclaim old-time grid space for all remain levels > lbase. // for(int lev = start; lev <= finest_level; ++lev) { - amr_level[lev].removeOldData(); + amr_level[lev]->removeOldData(); } // // Reclaim all remaining storage for levels > new_finest. // for(int lev = new_finest + 1; lev <= finest_level; ++lev) { - amr_level.clear(lev); + amr_level[lev].reset(); this->ClearBoxArray(lev); this->ClearDistributionMap(lev); } @@ -2364,30 +2361,27 @@ Amr::regrid (int lbase, // NOTE: The initData function may use a filPatch, and so needs to // be officially inserted into the hierarchy prior to the call. // - amr_level.clear(lev); - amr_level.set(lev,a); - amr_level[lev].initData(); + amr_level[lev].reset(a); + amr_level[lev]->initData(); } - else if (amr_level.defined(lev)) + else if (amr_level[lev]) { // // Init with data from old structure then remove old structure. // NOTE: The init function may use a filPatch from the old level, // which therefore needs remain in the hierarchy during the call. // - a->init(amr_level[lev]); - amr_level.clear(lev); - amr_level.set(lev,a); + a->init(*amr_level[lev]); + amr_level[lev].reset(a); } else { a->init(); - amr_level.clear(lev); - amr_level.set(lev,a); + amr_level[lev].reset(a); } - this->SetBoxArray(lev, amr_level[lev].boxArray()); - this->SetDistributionMap(lev, DistributionMapping(amr_level[lev].boxArray(), + this->SetBoxArray(lev, amr_level[lev]->boxArray()); + this->SetDistributionMap(lev, DistributionMapping(amr_level[lev]->boxArray(), ParallelDescriptor::NProcs())); } @@ -2397,7 +2391,7 @@ Amr::regrid (int lbase, // at levels lbase+1 and higher may have changed. // for(int lev(0); lev <= new_finest; ++lev) { - amr_level[lev].post_regrid(lbase,new_finest); + amr_level[lev]->post_regrid(lbase,new_finest); } if(rebalance_grids > 0) { @@ -2495,22 +2489,21 @@ Amr::regrid_level_0_on_restart() // If use_efficient_regrid flag is set, then test to see whether we in fact // have just changed the level 0 grids. If not, then don't do anything more here. // - if ( !( (use_efficient_regrid == 1) && (lev0 == amr_level[0].boxArray()) ) ) + if ( !( (use_efficient_regrid == 1) && (lev0 == amr_level[0]->boxArray()) ) ) { // // Construct skeleton of new level. // AmrLevel* a = (*levelbld)(*this,0,Geom(0),lev0,cumtime); - a->init(amr_level[0]); - amr_level.clear(0); - amr_level.set(0,a); + a->init(*amr_level[0]); + amr_level[0].reset(a); - this->SetBoxArray(0, amr_level[0].boxArray()); - this->SetDistributionMap(0, DistributionMapping(amr_level[0].boxArray(), + this->SetBoxArray(0, amr_level[0]->boxArray()); + this->SetDistributionMap(0, DistributionMapping(amr_level[0]->boxArray(), ParallelDescriptor::NProcs())); - amr_level[0].post_regrid(0,0); + amr_level[0]->post_regrid(0,0); if (ParallelDescriptor::IOProcessor()) { @@ -2541,12 +2534,12 @@ Amr::printGridInfo (std::ostream& os, { for (int lev = min_lev; lev <= max_lev; lev++) { - const BoxArray& bs = amr_level[lev].boxArray(); + const BoxArray& bs = amr_level[lev]->boxArray(); int numgrid = bs.size(); - long ncells = amr_level[lev].countCells(); + long ncells = amr_level[lev]->countCells(); double ntot = Geom(lev).Domain().d_numPts(); Real frac = 100.0*(Real(ncells) / ntot); - const DistributionMapping& map = amr_level[lev].get_new_data(0).DistributionMap(); + const DistributionMapping& map = amr_level[lev]->get_new_data(0).DistributionMap(); os << " Level " << lev @@ -2583,9 +2576,9 @@ Amr::printGridSummary (std::ostream& os, { for (int lev = min_lev; lev <= max_lev; lev++) { - const BoxArray& bs = amr_level[lev].boxArray(); + const BoxArray& bs = amr_level[lev]->boxArray(); int numgrid = bs.size(); - long ncells = amr_level[lev].countCells(); + long ncells = amr_level[lev]->countCells(); double ntot = Geom(lev).Domain().d_numPts(); Real frac = 100.0*(Real(ncells) / ntot); @@ -2769,19 +2762,19 @@ Amr::grid_places (int lbase, void Amr::ErrorEst (int lev, TagBoxArray& tags, Real time, int ngrow) { - amr_level[lev].errorEst(tags,TagBox::CLEAR,TagBox::SET,time, n_error_buf[lev],ngrow); + amr_level[lev]->errorEst(tags,TagBox::CLEAR,TagBox::SET,time, n_error_buf[lev],ngrow); } BoxArray Amr::GetAreaNotToTag (int lev) { - return BoxArray(amr_level[lev].getAreaNotToTag()); + return BoxArray(amr_level[lev]->getAreaNotToTag()); } void Amr::ManualTagsPlacement (int lev, TagBoxArray& tags, Array& bf_lev) { - amr_level[lev].manual_tags_placement(tags, bf_lev); + amr_level[lev]->manual_tags_placement(tags, bf_lev); } void @@ -2816,9 +2809,9 @@ Amr::bldFineLevels (Real strt_time) new_grids[new_finest], strt_time); - amr_level.set(new_finest,level); + amr_level[new_finest].reset(level); - amr_level[new_finest].initData(); + amr_level[new_finest]->initData(); } while (finest_level < max_level); // @@ -2836,7 +2829,7 @@ Amr::bldFineLevels (Real strt_time) do { for (int i = 0; i <= finest_level; i++) { - new_grids[i] = amr_level[i].boxArray(); + new_grids[i] = amr_level[i]->boxArray(); } regrid(0,strt_time,true); @@ -2844,7 +2837,7 @@ Amr::bldFineLevels (Real strt_time) grids_the_same = true; for (int i = 0; i <= finest_level && grids_the_same; i++) { - if (!(new_grids[i] == amr_level[i].boxArray())) { + if (!(new_grids[i] == amr_level[i]->boxArray())) { grids_the_same = false; } } @@ -3049,7 +3042,7 @@ Amr::okToRegrid(int level) if (regrid_int[level] < 0) return false; else - return level_count[level] >= regrid_int[level] && amr_level[level].okToRegrid(); + return level_count[level] >= regrid_int[level] && amr_level[level]->okToRegrid(); } Real @@ -3108,7 +3101,7 @@ const Array& Amr::getInitialBA() void Amr::RedistributeParticles () { - amr_level[0].particle_redistribute(0,true); + amr_level[0]->particle_redistribute(0,true); } #endif @@ -3585,18 +3578,17 @@ Amr::AddProcsToComp(int nSidecarProcs, int prevSidecarProcs) { } if(scsMyId != ioProcNumSCS) { - amr_level.resize(0); - amr_level.resize(amr_level_Size, PArrayManage); - for(int lev(0); lev < amr_level.size(); ++lev) { - amr_level.set(lev,(*levelbld)()); - } + amr_level.clear(); + for(int lev(0); lev < amr_level_Size; ++lev) { + amr_level.push_back(std::unique_ptr((*levelbld)())); + } } for(int lev(0); lev <= finest_level; ++lev) { - amr_level[lev].AddProcsToComp(this, nSidecarProcs, prevSidecarProcs, - ioProcNumSCS, ioProcNumAll, scsMyId, scsComm); - this->SetBoxArray(lev, amr_level[lev].boxArray()); - this->SetDistributionMap(lev, DistributionMapping(amr_level[lev].boxArray(), + amr_level[lev]->AddProcsToComp(this, nSidecarProcs, prevSidecarProcs, + ioProcNumSCS, ioProcNumAll, scsMyId, scsComm); + this->SetBoxArray(lev, amr_level[lev]->boxArray()); + this->SetDistributionMap(lev, DistributionMapping(amr_level[lev]->boxArray(), ParallelDescriptor::NProcs())); } @@ -3744,8 +3736,8 @@ using std::endl; SHOWVAL(amr_level.size()); os << endl; for(int i(0); i < amr_level.size(); ++i) { - AmrLevel &amrlev = amr_level[i]; - os << "amr_level[" << i << "] = " << &(amr_level[i]) << endl; + AmrLevel &amrlev = *amr_level[i]; + os << "amr_level[" << i << "] = " << &(*amr_level[i]) << endl; SHOWVAL(amrlev.numGrids()); SHOWVAL(amrlev.nStep()); SHOWVAL(amrlev.countCells()); diff --git a/Src/C_AMRLib/AmrLevel.H b/Src/Amr/AMReX_AmrLevel.H similarity index 98% rename from Src/C_AMRLib/AmrLevel.H rename to Src/Amr/AMReX_AmrLevel.H index b85197a65..dfb5d06fa 100644 --- a/Src/C_AMRLib/AmrLevel.H +++ b/Src/Amr/AMReX_AmrLevel.H @@ -2,19 +2,19 @@ #ifndef _AmrLevel_H_ #define _AmrLevel_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/Src/C_AMRLib/AmrLevel.cpp b/Src/Amr/AMReX_AmrLevel.cpp similarity index 96% rename from Src/C_AMRLib/AmrLevel.cpp rename to Src/Amr/AMReX_AmrLevel.cpp index c31f4d8af..2f156c615 100644 --- a/Src/C_AMRLib/AmrLevel.cpp +++ b/Src/Amr/AMReX_AmrLevel.cpp @@ -1,16 +1,17 @@ -#include +#include #include #include +#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include DescriptorList AmrLevel::desc_lst; DeriveList AmrLevel::derive_lst; @@ -493,8 +494,8 @@ FillPatchIteratorHelper::Initialize (int boxGrow, m_FixUpCorners = NeedToTouchUpPhysCorners(m_amrlevel.geom); const int MyProc = ParallelDescriptor::MyProc(); - PArray& amrLevels = m_amrlevel.parent->getAmrLevels(); - const AmrLevel& topLevel = amrLevels[m_amrlevel.level]; + auto& amrLevels = m_amrlevel.parent->getAmrLevels(); + const AmrLevel& topLevel = *amrLevels[m_amrlevel.level]; const Box& topPDomain = topLevel.state[m_index].getDomain(); const IndexType& boxType = m_leveldata.boxArray().ixType(); const bool extrap = AmrLevel::desc_lst[m_index].extrap(); @@ -505,7 +506,7 @@ FillPatchIteratorHelper::Initialize (int boxGrow, for (int l = 0; l <= m_amrlevel.level; ++l) { - amrLevels[l].state[m_index].RegisterData(m_mfcd, m_mfid[l]); + amrLevels[l]->state[m_index].RegisterData(m_mfcd, m_mfid[l]); } for (int i = 0, N = m_leveldata.boxArray().size(); i < N; ++i) { @@ -607,7 +608,7 @@ FillPatchIteratorHelper::Initialize (int boxGrow, { unfillableThisLevel.clear(); - AmrLevel& theAmrLevel = amrLevels[l]; + AmrLevel& theAmrLevel = *amrLevels[l]; StateData& theState = theAmrLevel.state[m_index]; const Box& thePDomain = theState.getDomain(); const Geometry& theGeom = theAmrLevel.geom; @@ -842,8 +843,8 @@ FillPatchIterator::FillFromLevel0 (Real time, int index, int scomp, int dcomp, i StateData& statedata = m_amrlevel.state[index]; - PArray smf; - std::vector stime; + Array smf; + Array stime; statedata.getData(smf,stime,time); const Geometry& geom = m_amrlevel.geom; @@ -867,14 +868,14 @@ FillPatchIterator::FillFromTwoLevels (Real time, int index, int scomp, int dcomp const Geometry& geom_fine = fine_level.geom; const Geometry& geom_crse = crse_level.geom; - PArray smf_crse; - std::vector stime_crse; + Array smf_crse; + Array stime_crse; StateData& statedata_crse = crse_level.state[index]; statedata_crse.getData(smf_crse,stime_crse,time); StateDataPhysBCFunct physbcf_crse(statedata_crse,scomp,geom_crse); - PArray smf_fine; - std::vector stime_fine; + Array smf_fine; + Array stime_fine; StateData& statedata_fine = fine_level.state[index]; statedata_fine.getData(smf_fine,stime_fine,time); StateDataPhysBCFunct physbcf_fine(statedata_fine,scomp,geom_fine); @@ -1005,30 +1006,30 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, BL_ASSERT(fab.box() == m_ba[idx]); BL_ASSERT(fab.nComp() >= dcomp + m_ncomp); - Array< PArray > cfab(m_amrlevel.level+1); + Array< Array > > cfab(m_amrlevel.level+1); Array< Array >& TheCrseBoxes = m_cbox[idx]; Array< Array >& TheFineBoxes = m_fbox[idx]; Array< Array< Array > >& TheFBIDs = m_fbid[idx]; const bool extrap = AmrLevel::desc_lst[m_index].extrap(); - PArray& amrLevels = m_amrlevel.parent->getAmrLevels(); + auto& amrLevels = m_amrlevel.parent->getAmrLevels(); // // Build all coarse fabs from which we'll interpolate and // fill them with coarse data as best we can. // for (int l = 0; l <= m_amrlevel.level; l++) { - StateData& TheState = amrLevels[l].state[m_index]; + StateData& TheState = amrLevels[l]->state[m_index]; const Array& CrseBoxes = TheCrseBoxes[l]; - PArray& CrseFabs = cfab[l]; + auto& CrseFabs = cfab[l]; const Array< Array >& FBIDs = TheFBIDs[l]; const int NC = CrseBoxes.size(); - CrseFabs.resize(NC,PArrayManage); + CrseFabs.resize(NC); for (int i = 0; i < NC; i++) { BL_ASSERT(CrseBoxes[i].ok()); - CrseFabs.set(i, new FArrayBox(CrseBoxes[i],m_ncomp)); + CrseFabs[i].reset(new FArrayBox(CrseBoxes[i],m_ncomp)); } for (int i = 0; i < NC; i++) @@ -1040,7 +1041,7 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, TheState.InterpFillFab(m_mfcd, m_mfid[l], FBIDs[i], - CrseFabs[i], + *CrseFabs[i], m_time, 0, 0, @@ -1053,8 +1054,8 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, // for (int l = 0; l < m_amrlevel.level; l++) { - PArray& CrseFabs = cfab[l]; - AmrLevel& TheLevel = amrLevels[l]; + auto& CrseFabs = cfab[l]; + AmrLevel& TheLevel = *amrLevels[l]; StateData& TheState = TheLevel.state[m_index]; const Box& ThePDomain = TheState.getDomain(); const int NC = CrseFabs.size(); @@ -1066,7 +1067,7 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, // for (int i = 0; i < NC; i++) { - FArrayBox& dstfab = CrseFabs[i]; + FArrayBox& dstfab = *CrseFabs[i]; if (ThePDomain.contains(dstfab.box())) continue; @@ -1086,7 +1087,7 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, for (int j = 0; j < NC; j++) { - const FArrayBox& srcfab = CrseFabs[j]; + const FArrayBox& srcfab = *CrseFabs[j]; const Box& srcbox = fullsrcbox & srcfab.box(); if (srcbox.ok()) @@ -1104,9 +1105,9 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, // This MUST come after the periodic fill mumbo-jumbo. for (int i = 0; i < NC; ++i) { - if ( ! ThePDomain.contains(CrseFabs[i].box())) + if ( ! ThePDomain.contains(CrseFabs[i]->box())) { - TheLevel.setPhysBoundaryValues(CrseFabs[i], + TheLevel.setPhysBoundaryValues(*CrseFabs[i], m_index, m_time, 0, @@ -1119,19 +1120,19 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, { for (int i = 0; i < NC; ++i) { - FixUpPhysCorners(CrseFabs[i],TheLevel,m_index,m_time,m_scomp,0,m_ncomp); + FixUpPhysCorners(*CrseFabs[i],TheLevel,m_index,m_time,m_scomp,0,m_ncomp); } } // // Interpolate up to next level. // - AmrLevel& crseAmrLevel = amrLevels[l]; - AmrLevel& fineAmrLevel = amrLevels[l+1]; + AmrLevel& crseAmrLevel = *amrLevels[l]; + AmrLevel& fineAmrLevel = *amrLevels[l+1]; const IntVect& fine_ratio = crseAmrLevel.fine_ratio; const Array& FineBoxes = TheFineBoxes[l]; StateData& fState = fineAmrLevel.state[m_index]; const Box& fDomain = fState.getDomain(); - PArray& FinerCrseFabs = cfab[l+1]; + auto& FinerCrseFabs = cfab[l+1]; const Array& theBCs = AmrLevel::desc_lst[m_index].getBCs(); const int NF = FineBoxes.size(); @@ -1144,7 +1145,7 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, // Fill crsefab from m_cbox via copy on intersect. // for (int j = 0; j < NC; j++) { - crsefab.copy(CrseFabs[j]); + crsefab.copy(*CrseFabs[j]); } // // Get boundary conditions for the fine patch. @@ -1175,7 +1176,7 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, // Copy intersect finefab into next level m_cboxes. // for (int j = 0, K = FinerCrseFabs.size(); j < K; ++j) { - FinerCrseFabs[j].copy(finefab); + FinerCrseFabs[j]->copy(finefab); } } @@ -1187,12 +1188,12 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, StateData& FineState = m_amrlevel.state[m_index]; const Box& FineDomain = FineState.getDomain(); const Geometry& FineGeom = m_amrlevel.geom; - PArray& FinestCrseFabs = cfab[m_amrlevel.level]; + auto& FinestCrseFabs = cfab[m_amrlevel.level]; // // Copy intersect coarse into destination fab. // for (int i = 0, N = FinestCrseFabs.size(); i < N; ++i) { - fab.copy(FinestCrseFabs[i],0,dcomp,m_ncomp); + fab.copy(*FinestCrseFabs[i],0,dcomp,m_ncomp); } if (FineGeom.isAnyPeriodic() && !FineDomain.contains(fab.box())) @@ -1212,11 +1213,11 @@ FillPatchIteratorHelper::fill (FArrayBox& fab, fab.shift(iv); - Box src_dst = FinestCrseFabs[i].box() & fab.box(); + Box src_dst = FinestCrseFabs[i]->box() & fab.box(); src_dst &= FineDomain; if (src_dst.ok()) - fab.copy(FinestCrseFabs[i],src_dst,0,src_dst,dcomp,m_ncomp); + fab.copy(*FinestCrseFabs[i],src_dst,0,src_dst,dcomp,m_ncomp); fab.shift(-iv); } @@ -1309,8 +1310,8 @@ AmrLevel::FillCoarsePatch (MultiFab& mf, { StateData& statedata = clev.state[index]; - PArray smf; - std::vector stime; + Array smf; + Array stime; statedata.getData(smf,stime,time); const Geometry& cgeom = clev.geom; diff --git a/Src/C_AMRLib/AuxBoundaryData.H b/Src/Amr/AMReX_AuxBoundaryData.H similarity index 97% rename from Src/C_AMRLib/AuxBoundaryData.H rename to Src/Amr/AMReX_AuxBoundaryData.H index 1bcb5b6d9..08dc87a6a 100644 --- a/Src/C_AMRLib/AuxBoundaryData.H +++ b/Src/Amr/AMReX_AuxBoundaryData.H @@ -2,8 +2,8 @@ #ifndef _AuxBoundaryData_H_ #define _AuxBoundaryData_H_ -#include -#include +#include +#include class AuxBoundaryData { diff --git a/Src/C_AMRLib/AuxBoundaryData.cpp b/Src/Amr/AMReX_AuxBoundaryData.cpp similarity index 97% rename from Src/C_AMRLib/AuxBoundaryData.cpp rename to Src/Amr/AMReX_AuxBoundaryData.cpp index fa03881e6..1e0df557a 100644 --- a/Src/C_AMRLib/AuxBoundaryData.cpp +++ b/Src/Amr/AMReX_AuxBoundaryData.cpp @@ -1,10 +1,10 @@ -#include +#include #include -#include +#include #ifdef BL_LAZY -#include +#include #endif AuxBoundaryData::AuxBoundaryData () diff --git a/Src/C_AMRLib/Derive.H b/Src/Amr/AMReX_Derive.H similarity index 98% rename from Src/C_AMRLib/Derive.H rename to Src/Amr/AMReX_Derive.H index 0c876664f..04875965b 100644 --- a/Src/C_AMRLib/Derive.H +++ b/Src/Amr/AMReX_Derive.H @@ -3,10 +3,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class DescriptorList; diff --git a/Src/C_AMRLib/Derive.cpp b/Src/Amr/AMReX_Derive.cpp similarity index 99% rename from Src/C_AMRLib/Derive.cpp rename to Src/Amr/AMReX_Derive.cpp index 3b7916adc..c8a211932 100644 --- a/Src/C_AMRLib/Derive.cpp +++ b/Src/Amr/AMReX_Derive.cpp @@ -1,9 +1,9 @@ -#include +#include #include -#include -#include +#include +#include Box DeriveRec::TheSameBox (const Box& box) diff --git a/Src/C_AMRLib/Extrapolater.H b/Src/Amr/AMReX_Extrapolater.H similarity index 91% rename from Src/C_AMRLib/Extrapolater.H rename to Src/Amr/AMReX_Extrapolater.H index 9b9cd3f4c..a53bc24f2 100644 --- a/Src/C_AMRLib/Extrapolater.H +++ b/Src/Amr/AMReX_Extrapolater.H @@ -1,8 +1,8 @@ #ifndef _EXTRAPOLATER_H_ #define _EXTRAPOLATER_H_ -#include -#include +#include +#include namespace Extrapolater { diff --git a/Src/C_AMRLib/Extrapolater.cpp b/Src/Amr/AMReX_Extrapolater.cpp similarity index 95% rename from Src/C_AMRLib/Extrapolater.cpp rename to Src/Amr/AMReX_Extrapolater.cpp index d95ee3bd0..a847165e4 100644 --- a/Src/C_AMRLib/Extrapolater.cpp +++ b/Src/Amr/AMReX_Extrapolater.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include #ifdef _OPENMP #include diff --git a/Src/C_AMRLib/FLUSH_F.H b/Src/Amr/AMReX_FLUSH_F.H similarity index 100% rename from Src/C_AMRLib/FLUSH_F.H rename to Src/Amr/AMReX_FLUSH_F.H diff --git a/Src/C_AMRLib/LevelBld.H b/Src/Amr/AMReX_LevelBld.H similarity index 92% rename from Src/C_AMRLib/LevelBld.H rename to Src/Amr/AMReX_LevelBld.H index d6991aa0a..851247785 100644 --- a/Src/C_AMRLib/LevelBld.H +++ b/Src/Amr/AMReX_LevelBld.H @@ -2,11 +2,11 @@ #ifndef _LEVELBLD_H_ #define _LEVELBLD_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include extern LevelBld* getLevelBld (); diff --git a/Src/C_AMRLib/MAKESLICE_3D.F b/Src/Amr/AMReX_MAKESLICE_3D.F similarity index 98% rename from Src/C_AMRLib/MAKESLICE_3D.F rename to Src/Amr/AMReX_MAKESLICE_3D.F index da21f2efc..28ee6f6cc 100644 --- a/Src/C_AMRLib/MAKESLICE_3D.F +++ b/Src/Amr/AMReX_MAKESLICE_3D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "ArrayLim.H" -#include "REAL.H" -#include "CONSTANTS.H" -#include "MAKESLICE_F.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_MAKESLICE_F.H" #define SDIM 3 #define npart 20 diff --git a/Src/C_AMRLib/MAKESLICE_F.H b/Src/Amr/AMReX_MAKESLICE_F.H similarity index 100% rename from Src/C_AMRLib/MAKESLICE_F.H rename to Src/Amr/AMReX_MAKESLICE_F.H diff --git a/Src/C_AMRLib/PROB_AMR_F.H b/Src/Amr/AMReX_PROB_AMR_F.H similarity index 100% rename from Src/C_AMRLib/PROB_AMR_F.H rename to Src/Amr/AMReX_PROB_AMR_F.H diff --git a/Src/C_AMRLib/SLABSTAT_1D.F b/Src/Amr/AMReX_SLABSTAT_1D.F similarity index 98% rename from Src/C_AMRLib/SLABSTAT_1D.F rename to Src/Amr/AMReX_SLABSTAT_1D.F index 249dd49e9..39eff4eb5 100644 --- a/Src/C_AMRLib/SLABSTAT_1D.F +++ b/Src/Amr/AMReX_SLABSTAT_1D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "SPACE.H" -#include "CONSTANTS.H" -#include "ArrayLim.H" -#include "SLABSTAT_F.H" +#include "AMReX_REAL.H" +#include "AMReX_SPACE.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_SLABSTAT_F.H" #define SDIM 1 diff --git a/Src/C_AMRLib/SLABSTAT_2D.F b/Src/Amr/AMReX_SLABSTAT_2D.F similarity index 98% rename from Src/C_AMRLib/SLABSTAT_2D.F rename to Src/Amr/AMReX_SLABSTAT_2D.F index 2a2007938..b31c0bdf8 100644 --- a/Src/C_AMRLib/SLABSTAT_2D.F +++ b/Src/Amr/AMReX_SLABSTAT_2D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "SPACE.H" -#include "CONSTANTS.H" -#include "ArrayLim.H" -#include "SLABSTAT_F.H" +#include "AMReX_REAL.H" +#include "AMReX_SPACE.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_SLABSTAT_F.H" #define SDIM 2 diff --git a/Src/C_AMRLib/SLABSTAT_3D.F b/Src/Amr/AMReX_SLABSTAT_3D.F similarity index 98% rename from Src/C_AMRLib/SLABSTAT_3D.F rename to Src/Amr/AMReX_SLABSTAT_3D.F index cec7538bf..14beaf3ad 100644 --- a/Src/C_AMRLib/SLABSTAT_3D.F +++ b/Src/Amr/AMReX_SLABSTAT_3D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "SPACE.H" -#include "CONSTANTS.H" -#include "ArrayLim.H" -#include "SLABSTAT_F.H" +#include "AMReX_REAL.H" +#include "AMReX_SPACE.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_SLABSTAT_F.H" #define SDIM 3 diff --git a/Src/C_AMRLib/SLABSTAT_F.H b/Src/Amr/AMReX_SLABSTAT_F.H similarity index 100% rename from Src/C_AMRLib/SLABSTAT_F.H rename to Src/Amr/AMReX_SLABSTAT_F.H diff --git a/Src/C_AMRLib/SlabStat.H b/Src/Amr/AMReX_SlabStat.H similarity index 96% rename from Src/C_AMRLib/SlabStat.H rename to Src/Amr/AMReX_SlabStat.H index 0c4dfac6e..9e79be604 100644 --- a/Src/C_AMRLib/SlabStat.H +++ b/Src/Amr/AMReX_SlabStat.H @@ -2,10 +2,11 @@ #define _SlabStat_H_ #include -#include -#include -#include -#include +#include +#include +#include +#include +#include // // Forward declaration. // @@ -204,7 +205,7 @@ public: // // Write out any SlabStats in the list. // - void checkPoint (PArray& amrLevels, int level0_step); + void checkPoint (Array >& amrLevels, int level0_step); std::list& list (); diff --git a/Src/C_AMRLib/SlabStat.cpp b/Src/Amr/AMReX_SlabStat.cpp similarity index 96% rename from Src/C_AMRLib/SlabStat.cpp rename to Src/Amr/AMReX_SlabStat.cpp index 20e8fed6d..a82c51348 100644 --- a/Src/C_AMRLib/SlabStat.cpp +++ b/Src/Amr/AMReX_SlabStat.cpp @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include SlabStatRec::SlabStatRec (const std::string& name, int ncomp, @@ -300,8 +300,7 @@ SlabStatList::update (AmrLevel& amrlevel, } void -SlabStatList::checkPoint (PArray& amrLevels, - int level0_step) +SlabStatList::checkPoint (Array >& amrLevels, int level0_step) { if (m_list.empty()) return; // @@ -363,7 +362,7 @@ SlabStatList::checkPoint (PArray& amrLevels, for (int level = 0; level < amrLevels.size(); level++) { for (int dir = 0; dir < BL_SPACEDIM; dir++) - HeaderFile << amrLevels[level].Geom().CellSize(dir) << " "; + HeaderFile << amrLevels[level]->Geom().CellSize(dir) << " "; HeaderFile << '\n'; } diff --git a/Src/C_AMRLib/StateData.H b/Src/Amr/AMReX_StateData.H similarity index 95% rename from Src/C_AMRLib/StateData.H rename to Src/Amr/AMReX_StateData.H index 7d807619c..09a3b8238 100644 --- a/Src/C_AMRLib/StateData.H +++ b/Src/Amr/AMReX_StateData.H @@ -2,17 +2,19 @@ #ifndef _StateData_H_ #define _StateData_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // // Current and previous level-time data. @@ -239,8 +241,8 @@ public: // bool hasNewData () const { return new_data != 0; } - void getData (PArray& data, - std::vector& datatime, + void getData (Array& data, + Array& datatime, Real time) const; void AddProcsToComp(const StateDescriptor &sdPtr, diff --git a/Src/C_AMRLib/StateData.cpp b/Src/Amr/AMReX_StateData.cpp similarity index 99% rename from Src/C_AMRLib/StateData.cpp rename to Src/Amr/AMReX_StateData.cpp index b4ef0e0f3..b3d946734 100644 --- a/Src/C_AMRLib/StateData.cpp +++ b/Src/Amr/AMReX_StateData.cpp @@ -1,15 +1,15 @@ -#include +#include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef _OPENMP #include @@ -688,8 +688,8 @@ StateData::InterpFillFab (MultiFabCopyDescriptor& multiFabCopyDesc, } void -StateData::getData (PArray& data, - std::vector& datatime, +StateData::getData (Array& data, + Array& datatime, Real time) const { data.clear(); diff --git a/Src/C_AMRLib/StateDescriptor.H b/Src/Amr/AMReX_StateDescriptor.H similarity index 97% rename from Src/C_AMRLib/StateDescriptor.H rename to Src/Amr/AMReX_StateDescriptor.H index 821ed8b20..c2d6e1433 100644 --- a/Src/C_AMRLib/StateDescriptor.H +++ b/Src/Amr/AMReX_StateDescriptor.H @@ -3,13 +3,12 @@ #define _StateDescriptor_H_ #include -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include class Interpolater; @@ -244,7 +243,7 @@ private: bool m_store_in_checkpoint; // Should store this in the checkpoint file? Array names; // Printable names of components Array bc; // Array of bndry types for entire level - PArray bc_func; // PArray of pointers to bndry fill functions + Array > bc_func; // Array of pointers to bndry fill functions Array m_master; // Are we a master or slave? (true or false) Array m_groupsize; // Groupsize if we're a master // @@ -346,7 +345,7 @@ private: DescriptorList (const DescriptorList&); DescriptorList& operator= (const DescriptorList&); - PArray desc; + Array > desc; }; #endif /*_StateDescriptor_H_*/ diff --git a/Src/C_AMRLib/StateDescriptor.cpp b/Src/Amr/AMReX_StateDescriptor.cpp similarity index 95% rename from Src/C_AMRLib/StateDescriptor.cpp rename to Src/Amr/AMReX_StateDescriptor.cpp index ab68cf56e..ed568d66d 100644 --- a/Src/C_AMRLib/StateDescriptor.cpp +++ b/Src/Amr/AMReX_StateDescriptor.cpp @@ -1,12 +1,12 @@ -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include int StateDescriptor::bf_ext_dir_threadsafe = 0; @@ -132,15 +132,12 @@ StateDescriptor::BndryFunc::Print () const DescriptorList::DescriptorList () - : - desc(PArrayManage) {} void DescriptorList::clear () { desc.clear(); - desc.resize(0); } int @@ -155,7 +152,7 @@ DescriptorList::resetComponentBCs (int indx, const BCRec& bc, const StateDescriptor::BndryFunc& func) { - desc[indx].resetComponentBCs(comp,bc,func); + desc[indx]->resetComponentBCs(comp,bc,func); } void @@ -168,7 +165,7 @@ DescriptorList::setComponent (int indx, int max_map_start_comp, int min_map_end_comp) { - desc[indx].setComponent(comp,nm,bc,func,interp,max_map_start_comp,min_map_end_comp); + desc[indx]->setComponent(comp,nm,bc,func,interp,max_map_start_comp,min_map_end_comp); } void @@ -183,14 +180,14 @@ DescriptorList::setComponent (int indx, { const bool master = (i == 0) ? true : false; - desc[indx].setComponent(comp+i,nm[i],bc[i],func,interp,master,nm.size()); + desc[indx]->setComponent(comp+i,nm[i],bc[i],func,interp,master,nm.size()); } } const StateDescriptor& DescriptorList::operator[] (int k) const { - return desc[k]; + return *desc[k]; } void @@ -205,7 +202,7 @@ DescriptorList::addDescriptor (int indx, { if (indx >= desc.size()) desc.resize(indx+1); - desc.set(indx,new StateDescriptor(typ,ttyp,indx,nextra,num_comp,interp,extrap,store_in_checkpoint)); + desc[indx].reset(new StateDescriptor(typ,ttyp,indx,nextra,num_comp,interp,extrap,store_in_checkpoint)); } @@ -213,8 +210,8 @@ void DescriptorList::Print () const { std::cout << "==== DescriptorList: size = " << desc.size() << std::endl; - for(int i(0); i < desc.size(); ++i) { - desc[i].Print(); + for(const auto& d : desc) { + d->Print(); } } @@ -227,8 +224,7 @@ StateDescriptor::StateDescriptor () ngrow(0), mapper(0), m_extrap(false), - m_store_in_checkpoint(true), - bc_func(PArrayManage) + m_store_in_checkpoint(true) {} StateDescriptor::StateDescriptor (IndexType btyp, @@ -247,8 +243,7 @@ StateDescriptor::StateDescriptor (IndexType btyp, ngrow(nextra), mapper(interp), m_extrap(extrap), - m_store_in_checkpoint(store_in_checkpoint), - bc_func(PArrayManage) + m_store_in_checkpoint(store_in_checkpoint) { BL_ASSERT (num_comp > 0); @@ -274,8 +269,7 @@ StateDescriptor::resetComponentBCs (int comp, { BL_ASSERT(comp >= 0 && comp < ncomp); - bc_func.clear(comp); - bc_func.set(comp,func.clone()); + bc_func[comp].reset(func.clone()); bc[comp] = bcr; } @@ -349,7 +343,7 @@ StateDescriptor::store_in_checkpoint () const const StateDescriptor::BndryFunc& StateDescriptor::bndryFill (int i) const { - return bc_func[i]; + return *bc_func[i]; } int @@ -398,8 +392,7 @@ StateDescriptor::setComponent (int comp, int max_map_start_comp_, int min_map_end_comp_) { - bc_func.clear(comp); - bc_func.set(comp,func.clone()); + bc_func[comp].reset(func.clone()); names[comp] = nm; bc[comp] = bcr; @@ -649,7 +642,7 @@ StateDescriptor::Print () const } for(int i(0); i < bc_func.size(); ++i) { std::cout << "==== StateDescriptor: bc_func[" << i << "] = " << std::endl; - bc_func[i].Print(); + bc_func[i]->Print(); std::cout << std::endl; } for(int i(0); i < m_master.size(); ++i) { diff --git a/Src/C_AMRLib/StationData.H b/Src/Amr/AMReX_StationData.H similarity index 84% rename from Src/C_AMRLib/StationData.H rename to Src/Amr/AMReX_StationData.H index 036b60639..7293e9069 100644 --- a/Src/C_AMRLib/StationData.H +++ b/Src/Amr/AMReX_StationData.H @@ -5,12 +5,13 @@ #include #include #include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // // Forward declaration. // @@ -44,7 +45,7 @@ public: // // Data files have the form: "Station/stn_CPU_NNNN" // - void init (const PArray& levels, const int finestlevel); + void init (const Array >& levels, const int finestlevel); // // Collect data for all station points at level and write to station file. // @@ -54,7 +55,7 @@ public: // // Locate finest level grid for each station point. // - void findGrid (const PArray& levels, + void findGrid (const Array >& levels, const Array& geoms); private: diff --git a/Src/C_AMRLib/StationData.cpp b/Src/Amr/AMReX_StationData.cpp similarity index 92% rename from Src/C_AMRLib/StationData.cpp rename to Src/Amr/AMReX_StationData.cpp index e27d2dd0c..9ba29c60e 100644 --- a/Src/C_AMRLib/StationData.cpp +++ b/Src/Amr/AMReX_StationData.cpp @@ -1,12 +1,12 @@ -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include StationRec::StationRec () { @@ -21,7 +21,7 @@ StationData::~StationData () } void -StationData::init (const PArray& levels, const int finestlevel) +StationData::init (const Array >& levels, const int finestlevel) { // // ParmParse variables: @@ -111,7 +111,7 @@ StationData::init (const PArray& levels, const int finestlevel) // adjust the positions so they are not exactly on a grid line // cannot use [levels.size()-1] because of level capping - const Real *fineDX = levels[finestlevel].Geom().CellSize(); + const Real *fineDX = levels[finestlevel]->Geom().CellSize(); for(int i(0); i < m_stn.size(); ++i) { for(int d(0); d < BL_SPACEDIM; ++d) { Real tempPos(m_stn[i].pos[d]), dx(fineDX[d]); @@ -297,7 +297,7 @@ StationData::report (Real time, } void -StationData::findGrid (const PArray& levels, +StationData::findGrid (const Array >& levels, const Array& geoms) { BL_ASSERT(geoms.size() == levels.size()); @@ -316,19 +316,19 @@ StationData::findGrid (const PArray& levels, for (int level = levels.size()-1; level >= 0; level--) { - if (levels.defined(level)) + if (levels[level]) { - Array boxes(levels[level].boxArray().size()); + Array boxes(levels[level]->boxArray().size()); for (int i = 0; i < boxes.size(); i++) { - boxes[i] = RealBox(levels[level].boxArray()[i], - levels[level].Geom().CellSize(), - levels[level].Geom().ProbLo()); + boxes[i] = RealBox(levels[level]->boxArray()[i], + levels[level]->Geom().CellSize(), + levels[level]->Geom().ProbLo()); } - MultiFab mf(levels[level].boxArray(),1,0,Fab_noallocate); + MultiFab mf(levels[level]->boxArray(),1,0,Fab_noallocate); BL_ASSERT(mf.boxArray().size() == boxes.size()); diff --git a/Src/C_AMRLib/extrapolater_1d.f90 b/Src/Amr/AMReX_extrapolater_1d.f90 similarity index 100% rename from Src/C_AMRLib/extrapolater_1d.f90 rename to Src/Amr/AMReX_extrapolater_1d.f90 diff --git a/Src/C_AMRLib/extrapolater_2d.f90 b/Src/Amr/AMReX_extrapolater_2d.f90 similarity index 100% rename from Src/C_AMRLib/extrapolater_2d.f90 rename to Src/Amr/AMReX_extrapolater_2d.f90 diff --git a/Src/C_AMRLib/extrapolater_3d.f90 b/Src/Amr/AMReX_extrapolater_3d.f90 similarity index 100% rename from Src/C_AMRLib/extrapolater_3d.f90 rename to Src/Amr/AMReX_extrapolater_3d.f90 diff --git a/Src/C_AMRLib/CMakeLists.txt b/Src/Amr/CMakeLists.txt similarity index 53% rename from Src/C_AMRLib/CMakeLists.txt rename to Src/Amr/CMakeLists.txt index eceeecdb8..b4d0880eb 100644 --- a/Src/C_AMRLib/CMakeLists.txt +++ b/Src/Amr/CMakeLists.txt @@ -14,22 +14,22 @@ project(CAMRLIB) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files Amr.cpp AmrLevel.cpp AuxBoundaryData.cpp Derive.cpp Extrapolater.cpp SlabStat.cpp StateData.cpp StateDescriptor.cpp StationData.cpp ) -set(FPP_source_files ARRAYLIM_${BL_SPACEDIM}D.F SLABSTAT_${BL_SPACEDIM}D.F) +set(CXX_source_files AMReX_Amr.cpp AMReX_AmrLevel.cpp AMReX_AuxBoundaryData.cpp AMReX_Derive.cpp AMReX_Extrapolater.cpp AMReX_SlabStat.cpp AMReX_StateData.cpp AMReX_StateDescriptor.cpp AMReX_StationData.cpp ) +set(FPP_source_files AMReX_ARRAYLIM_${BL_SPACEDIM}D.F AMReX_SLABSTAT_${BL_SPACEDIM}D.F) if(BL_SPACEDIM EQUAL 3) - set(FPP_source_files ${FPP_source_files} MAKESLICE_${BL_SPACEDIM}D.F) + set(FPP_source_files ${FPP_source_files} AMReX_MAKESLICE_${BL_SPACEDIM}D.F) endif() -set(CXX_header_files Amr.H AmrLevel.H AuxBoundaryData.H Derive.H Extrapolater.H LevelBld.H PROB_AMR_F.H SLABSTAT_F.H SlabStat.H StateData.H StateDescriptor.H StationData.H ) -set(FPP_header_files FLUSH_F.H ) +set(CXX_header_files AMReX_Amr.H AMReX_AmrLevel.H AMReX_AuxBoundaryData.H AMReX_Derive.H AMReX_Extrapolater.H AMReX_LevelBld.H AMReX_PROB_AMR_F.H AMReX_SLABSTAT_F.H AMReX_SlabStat.H AMReX_StateData.H AMReX_StateDescriptor.H AMReX_StationData.H ) +set(FPP_header_files AMReX_FLUSH_F.H ) if(BL_SPACEDIM EQUAL 3) - list(APPEND FPP_header_files MAKESLICE_F.H) + list(APPEND FPP_header_files AMReX_MAKESLICE_F.H) endif() set(F77_header_files) set(F90_header_files) set(F77_source_files) -set(F90_source_files extrapolater_${BL_SPACEDIM}d.f90) +set(F90_source_files AMReX_extrapolater_${BL_SPACEDIM}d.f90) preprocess_boxlib_fortran(FPP_out_files ${FPP_source_files}) diff --git a/Src/Amr/Make.package b/Src/Amr/Make.package new file mode 100644 index 000000000..a188a5e4b --- /dev/null +++ b/Src/Amr/Make.package @@ -0,0 +1,42 @@ + +AMRLIB_BASE=EXE +ifeq ($(LBASE),amr) + AMRLIB_BASE=LIB +endif + +C$(AMRLIB_BASE)_sources += AMReX_Amr.cpp AMReX_AmrLevel.cpp AMReX_Derive.cpp AMReX_StateData.cpp \ + AMReX_StateDescriptor.cpp AMReX_AuxBoundaryData.cpp AMReX_Extrapolater.cpp + +C$(AMRLIB_BASE)_headers += AMReX_Amr.H AMReX_AmrLevel.H AMReX_Derive.H AMReX_LevelBld.H AMReX_StateData.H \ + AMRex_StateDescriptor.H AMReX_PROB_AMR_F.H AMReX_AuxBoundaryData.H AMReX_Extrapolater.H + +f90$(AMRLIB_BASE)_sources += AMReX_extrapolater_$(DIM)d.f90 + +F$(AMRLIB_BASE)_sources += AMReX_ARRAYLIM_$(DIM)D.F + +ifeq ($(DIM),3) + F$(AMRLIB_BASE)_sources += AMReX_MAKESLICE_$(DIM)D.F +endif + +ifeq ($(USE_SLABSTAT), TRUE) + DEFINES += -DUSE_SLABSTAT + C$(AMRLIB_BASE)_sources += AMReX_SlabStat.cpp + C$(AMRLIB_BASE)_headers += AMReX_SlabState.H + F$(AMRLIB_BASE)_sources += AMReX_SLABSTAT_$(DIM)D.F + F$(AMRLIB_BASE)_headers += AMReX_SLABSTAT_F.H AMReX_MAKESLICE_F.H +endif + +ifeq ($(USE_STATIONDATA), TRUE) + DEFINES += -DUSE_STATIONDATA + C$(AMRLIB_BASE)_sources += AMReX_StationData.cpp + C$(AMRLIB_BASE)_headers += AMReX_StationData.H +endif + +ifeq ($(USE_ARRAYVIEW),TRUE) + C$(AMRLIB_BASE)_headers += AMReX_DatasetClient.H + C$(AMRLIB_BASE)_sources += AMReX_DatasetClient.cpp +endif + +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Amr +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr + diff --git a/Src/C_AmrCoreLib/AmrCore.H b/Src/AmrCore/AMReX_AmrCore.H similarity index 97% rename from Src/C_AmrCoreLib/AmrCore.H rename to Src/AmrCore/AMReX_AmrCore.H index 9c78767e6..417b962ce 100644 --- a/Src/C_AmrCoreLib/AmrCore.H +++ b/Src/AmrCore/AMReX_AmrCore.H @@ -3,10 +3,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef USE_PARTICLES class AmrParGDB; diff --git a/Src/C_AmrCoreLib/AmrCore.cpp b/Src/AmrCore/AMReX_AmrCore.cpp similarity index 99% rename from Src/C_AmrCoreLib/AmrCore.cpp rename to Src/AmrCore/AMReX_AmrCore.cpp index 7cb3e6b63..a8b27c6aa 100644 --- a/Src/C_AmrCoreLib/AmrCore.cpp +++ b/Src/AmrCore/AMReX_AmrCore.cpp @@ -1,13 +1,13 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef USE_PARTICLES -#include +#include #endif namespace @@ -215,7 +215,7 @@ AmrCore::InitAmrCore (int max_level_in, const Array& n_cell_in) finest_level = -1; #ifdef USE_PARTICLES - m_gdb = std::unique_ptr(new AmrParGDB(this)); + m_gdb.reset(new AmrParGDB(this)); #endif } diff --git a/Src/C_AmrCoreLib/AmrParGDB.H b/Src/AmrCore/AMReX_AmrParGDB.H similarity index 98% rename from Src/C_AmrCoreLib/AmrParGDB.H rename to Src/AmrCore/AMReX_AmrParGDB.H index 7cd1181ec..6a40c2754 100644 --- a/Src/C_AmrCoreLib/AmrParGDB.H +++ b/Src/AmrCore/AMReX_AmrParGDB.H @@ -1,8 +1,8 @@ #ifndef _AmrParGDB_H #define _AmrParGDB_H -#include -#include +#include +#include class AmrParGDB : public ParGDBBase diff --git a/Src/C_AmrCoreLib/AmrParticles.H b/Src/AmrCore/AMReX_AmrParticles.H similarity index 91% rename from Src/C_AmrCoreLib/AmrParticles.H rename to Src/AmrCore/AMReX_AmrParticles.H index 46b7e1b64..7e3df640a 100644 --- a/Src/C_AmrCoreLib/AmrParticles.H +++ b/Src/AmrCore/AMReX_AmrParticles.H @@ -1,9 +1,9 @@ #ifndef _AmrParticles_H_ #define _AmrParticles_H_ -#include -#include -#include +#include +#include +#include template > > class AmrParticleContainer diff --git a/Src/C_AmrCoreLib/Cluster.H b/Src/AmrCore/AMReX_Cluster.H similarity index 97% rename from Src/C_AmrCoreLib/Cluster.H rename to Src/AmrCore/AMReX_Cluster.H index 5f2133344..f9c1a4bde 100644 --- a/Src/C_AmrCoreLib/Cluster.H +++ b/Src/AmrCore/AMReX_Cluster.H @@ -3,11 +3,11 @@ #define _Cluster_H_ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class BoxDomain; class ClusterList; diff --git a/Src/C_AmrCoreLib/Cluster.cpp b/Src/AmrCore/AMReX_Cluster.cpp similarity index 99% rename from Src/C_AmrCoreLib/Cluster.cpp rename to Src/AmrCore/AMReX_Cluster.cpp index 62ac51301..ad22da992 100644 --- a/Src/C_AmrCoreLib/Cluster.cpp +++ b/Src/AmrCore/AMReX_Cluster.cpp @@ -1,8 +1,8 @@ -#include +#include #include -#include -#include +#include +#include enum CutStatus { HoleCut=0, SteepCut, BisectCut, InvalidCut }; diff --git a/Src/C_AmrCoreLib/ErrorList.H b/Src/AmrCore/AMReX_ErrorList.H similarity index 97% rename from Src/C_AmrCoreLib/ErrorList.H rename to Src/AmrCore/AMReX_ErrorList.H index fc931d3fb..77fd9a9a2 100644 --- a/Src/C_AmrCoreLib/ErrorList.H +++ b/Src/AmrCore/AMReX_ErrorList.H @@ -2,11 +2,11 @@ #define _ErrorList_H_ #include -#include +#include -#include -#include -#include +#include +#include +#include extern "C" { @@ -206,8 +206,7 @@ private: class ErrorList { public: - ErrorList() - : vec(PArrayManage) {} + ErrorList() {} // // The number of ErrorRecs in the list. // @@ -232,7 +231,7 @@ public: private: - PArray vec; + Array > vec; }; std::ostream& operator << (std::ostream& os, const ErrorList& elst); diff --git a/Src/C_AmrCoreLib/ErrorList.cpp b/Src/AmrCore/AMReX_ErrorList.cpp similarity index 96% rename from Src/C_AmrCoreLib/ErrorList.cpp rename to Src/AmrCore/AMReX_ErrorList.cpp index 0c43a776b..4ef846c18 100644 --- a/Src/C_AmrCoreLib/ErrorList.cpp +++ b/Src/AmrCore/AMReX_ErrorList.cpp @@ -1,8 +1,8 @@ #include -#include -#include -#include +#include +#include +#include ErrorRec::ErrorFunc::ErrorFunc () : @@ -181,7 +181,7 @@ ErrorList::add (const std::string& name, // int n = vec.size(); vec.resize(n+1); - vec.set(n,new ErrorRec(name, nextra, typ, func)); + vec[n].reset(new ErrorRec(name, nextra, typ, func)); } void @@ -195,7 +195,7 @@ ErrorList::add (const std::string& name, // int n = vec.size(); vec.resize(n+1); - vec.set(n,new ErrorRec(name, nextra, typ, func2)); + vec[n].reset(new ErrorRec(name, nextra, typ, func2)); } const ErrorRec& @@ -203,7 +203,7 @@ ErrorList::operator[] (int k) const { BL_ASSERT(k < size()); - return vec[k]; + return *vec[k]; } static const char* err_name[] = { "Special", "Standard", "UseAverage" }; diff --git a/Src/C_AmrCoreLib/FLUXREG_1D.F b/Src/AmrCore/AMReX_FLUXREG_1D.F similarity index 97% rename from Src/C_AmrCoreLib/FLUXREG_1D.F rename to Src/AmrCore/AMReX_FLUXREG_1D.F index ee4ab26f3..daddec733 100644 --- a/Src/C_AmrCoreLib/FLUXREG_1D.F +++ b/Src/AmrCore/AMReX_FLUXREG_1D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "FLUXREG_F.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_FLUXREG_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 1 diff --git a/Src/C_AmrCoreLib/FLUXREG_2D.F b/Src/AmrCore/AMReX_FLUXREG_2D.F similarity index 98% rename from Src/C_AmrCoreLib/FLUXREG_2D.F rename to Src/AmrCore/AMReX_FLUXREG_2D.F index 0139689d5..44b32ce40 100644 --- a/Src/C_AmrCoreLib/FLUXREG_2D.F +++ b/Src/AmrCore/AMReX_FLUXREG_2D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "FLUXREG_F.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_FLUXREG_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Src/C_AmrCoreLib/FLUXREG_3D.F b/Src/AmrCore/AMReX_FLUXREG_3D.F similarity index 98% rename from Src/C_AmrCoreLib/FLUXREG_3D.F rename to Src/AmrCore/AMReX_FLUXREG_3D.F index 14da0bdc2..e818fdc79 100644 --- a/Src/C_AmrCoreLib/FLUXREG_3D.F +++ b/Src/AmrCore/AMReX_FLUXREG_3D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "FLUXREG_F.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_FLUXREG_F.H" +#include "AMReX_ArrayLim.H" #if defined(BL_USE_FLOAT) || defined(BL_T3E) || defined(BL_CRAY) #define BL_USE_FLOAT_CONST diff --git a/Src/C_AmrCoreLib/FLUXREG_F.H b/Src/AmrCore/AMReX_FLUXREG_F.H similarity index 98% rename from Src/C_AmrCoreLib/FLUXREG_F.H rename to Src/AmrCore/AMReX_FLUXREG_F.H index 2cf91287b..632c39b82 100644 --- a/Src/C_AmrCoreLib/FLUXREG_F.H +++ b/Src/AmrCore/AMReX_FLUXREG_F.H @@ -22,7 +22,7 @@ # endif # endif -#include +#include extern "C" { diff --git a/Src/C_AmrCoreLib/FillPatchUtil.H b/Src/AmrCore/AMReX_FillPatchUtil.H similarity index 75% rename from Src/C_AmrCoreLib/FillPatchUtil.H rename to Src/AmrCore/AMReX_FillPatchUtil.H index 90d1b5f31..eec2e9c40 100644 --- a/Src/C_AmrCoreLib/FillPatchUtil.H +++ b/Src/AmrCore/AMReX_FillPatchUtil.H @@ -1,10 +1,10 @@ #ifndef _FillPatchUtil_H_ #define _FillPatchUtil_H_ -#include -#include -#include -#include +#include +#include +#include +#include namespace BoxLib { @@ -12,13 +12,13 @@ namespace BoxLib const IndexType& boxType, Interpolater* mapper); void FillPatchSingleLevel (MultiFab& mf, Real time, - const PArray& smf, const std::vector& stime, + const Array& smf, const Array& stime, int scomp, int dcomp, int ncomp, const Geometry& geom, PhysBCFunctBase& physbcf); void FillPatchTwoLevels (MultiFab& mf, Real time, - const PArray& cmf, const std::vector& ct, - const PArray& fmf, const std::vector& ft, + const Array& cmf, const Array& ct, + const Array& fmf, const Array& ft, int scomp, int dcomp, int ncomp, const Geometry& cgeom, const Geometry& fgeom, PhysBCFunctBase& cbc, PhysBCFunctBase& fbc, diff --git a/Src/C_AmrCoreLib/FillPatchUtil.cpp b/Src/AmrCore/AMReX_FillPatchUtil.cpp similarity index 87% rename from Src/C_AmrCoreLib/FillPatchUtil.cpp rename to Src/AmrCore/AMReX_FillPatchUtil.cpp index 3c05a74b9..5ec83755b 100644 --- a/Src/C_AmrCoreLib/FillPatchUtil.cpp +++ b/Src/AmrCore/AMReX_FillPatchUtil.cpp @@ -1,5 +1,5 @@ -#include +#include #include #ifdef _OPENMP @@ -34,35 +34,36 @@ namespace BoxLib } void FillPatchSingleLevel (MultiFab& mf, Real time, - const PArray& smf, const std::vector& stime, + const Array& smf, const Array& stime, int scomp, int dcomp, int ncomp, const Geometry& geom, PhysBCFunctBase& physbcf) { BL_PROFILE("FillPatchSingleLevel"); - BL_ASSERT(scomp+ncomp <= smf[0].nComp()); + BL_ASSERT(scomp+ncomp <= smf[0]->nComp()); BL_ASSERT(dcomp+ncomp <= mf.nComp()); BL_ASSERT(smf.size() == stime.size()); BL_ASSERT(smf.size() != 0); if (smf.size() == 1) { - mf.copy(smf[0], scomp, dcomp, ncomp, 0, mf.nGrow(), geom.periodicity()); + mf.copy(*smf[0], scomp, dcomp, ncomp, 0, mf.nGrow(), geom.periodicity()); } else if (smf.size() == 2) { - BL_ASSERT(smf[0].boxArray() == smf[1].boxArray()); - PArray raii(PArrayManage); + BL_ASSERT(smf[0]->boxArray() == smf[1]->boxArray()); + MultiFab raii; MultiFab * dmf; int destcomp; bool sameba; - if (mf.boxArray() == smf[0].boxArray()) { + if (mf.boxArray() == smf[0]->boxArray()) { dmf = &mf; destcomp = dcomp; sameba = true; } else { - dmf = raii.push_back(new MultiFab(smf[0].boxArray(), ncomp, 0, - smf[0].DistributionMap())); + raii.define(smf[0]->boxArray(), ncomp, 0, + smf[0]->DistributionMap(), Fab_allocate); + dmf = &raii; destcomp = 0; sameba = false; } @@ -73,9 +74,9 @@ namespace BoxLib for (MFIter mfi(*dmf,true); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); - (*dmf)[mfi].linInterp(smf[0][mfi], + (*dmf)[mfi].linInterp((*smf[0])[mfi], scomp, - smf[1][mfi], + (*smf[1])[mfi], scomp, stime[0], stime[1], @@ -108,8 +109,8 @@ namespace BoxLib void FillPatchTwoLevels (MultiFab& mf, Real time, - const PArray& cmf, const std::vector& ct, - const PArray& fmf, const std::vector& ft, + const Array& cmf, const Array& ct, + const Array& fmf, const Array& ft, int scomp, int dcomp, int ncomp, const Geometry& cgeom, const Geometry& fgeom, PhysBCFunctBase& cbc, PhysBCFunctBase& fbc, @@ -120,7 +121,7 @@ namespace BoxLib int ngrow = mf.nGrow(); - if (ngrow > 0 || mf.getBDKey() != fmf[0].getBDKey()) + if (ngrow > 0 || mf.getBDKey() != fmf[0]->getBDKey()) { const InterpolaterBoxCoarsener& coarsener = mapper->BoxCoarsener(ratio); @@ -133,7 +134,7 @@ namespace BoxLib } } - const FabArrayBase::FPinfo& fpc = FabArrayBase::TheFPinfo(fmf[0], mf, fdomain_g, ngrow, coarsener); + const FabArrayBase::FPinfo& fpc = FabArrayBase::TheFPinfo(*fmf[0], mf, fdomain_g, ngrow, coarsener); if ( ! fpc.ba_crse_patch.empty()) { diff --git a/Src/C_AmrCoreLib/FluxRegister.H b/Src/AmrCore/AMReX_FluxRegister.H similarity index 99% rename from Src/C_AmrCoreLib/FluxRegister.H rename to Src/AmrCore/AMReX_FluxRegister.H index 1e2795699..2e471db19 100644 --- a/Src/C_AmrCoreLib/FluxRegister.H +++ b/Src/AmrCore/AMReX_FluxRegister.H @@ -1,8 +1,8 @@ #ifndef _FLUXREGISTER_H_ #define _FLUXREGISTER_H_ -#include -#include +#include +#include // // Flux Register. diff --git a/Src/C_AmrCoreLib/FluxRegister.cpp b/Src/AmrCore/AMReX_FluxRegister.cpp similarity index 98% rename from Src/C_AmrCoreLib/FluxRegister.cpp rename to Src/AmrCore/AMReX_FluxRegister.cpp index 0ea333e5a..8f5d1b012 100644 --- a/Src/C_AmrCoreLib/FluxRegister.cpp +++ b/Src/AmrCore/AMReX_FluxRegister.cpp @@ -1,11 +1,11 @@ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/Src/C_AmrCoreLib/INTERP_1D.F b/Src/AmrCore/AMReX_INTERP_1D.F similarity index 99% rename from Src/C_AmrCoreLib/INTERP_1D.F rename to Src/AmrCore/AMReX_INTERP_1D.F index ecd9e0c25..fc930c541 100644 --- a/Src/C_AmrCoreLib/INTERP_1D.F +++ b/Src/AmrCore/AMReX_INTERP_1D.F @@ -1,10 +1,10 @@ #undef BL_LANG_CC #define BL_LANG_FORT -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "INTERP_F.H" -#include "ArrayLim.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_INTERP_F.H" +#include "AMReX_ArrayLim.H" #define IX_PROJ(A,B) (A+B*iabs(A))/B-iabs(A) #define SDIM BL_SPACEDIM diff --git a/Src/C_AmrCoreLib/INTERP_2D.F b/Src/AmrCore/AMReX_INTERP_2D.F similarity index 99% rename from Src/C_AmrCoreLib/INTERP_2D.F rename to Src/AmrCore/AMReX_INTERP_2D.F index 070e008bc..43c6c58e4 100644 --- a/Src/C_AmrCoreLib/INTERP_2D.F +++ b/Src/AmrCore/AMReX_INTERP_2D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "INTERP_F.H" -#include +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_INTERP_F.H" +#include #define IX_PROJ(A,B) (A+B*iabs(A))/B-iabs(A) #define SDIM 2 diff --git a/Src/C_AmrCoreLib/INTERP_3D.F b/Src/AmrCore/AMReX_INTERP_3D.F similarity index 99% rename from Src/C_AmrCoreLib/INTERP_3D.F rename to Src/AmrCore/AMReX_INTERP_3D.F index 84fb6b5bb..9381dee46 100644 --- a/Src/C_AmrCoreLib/INTERP_3D.F +++ b/Src/AmrCore/AMReX_INTERP_3D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "INTERP_F.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_INTERP_F.H" +#include "AMReX_ArrayLim.H" #define IX_PROJ(A,B) (A+B*iabs(A))/B-iabs(A) #define SDIM 3 diff --git a/Src/C_AmrCoreLib/INTERP_F.H b/Src/AmrCore/AMReX_INTERP_F.H similarity index 99% rename from Src/C_AmrCoreLib/INTERP_F.H rename to Src/AmrCore/AMReX_INTERP_F.H index 6ec2e642a..6f7c86c02 100644 --- a/Src/C_AmrCoreLib/INTERP_F.H +++ b/Src/AmrCore/AMReX_INTERP_F.H @@ -46,7 +46,7 @@ # endif # endif -#include +#include extern "C" { diff --git a/Src/C_AmrCoreLib/Interpolater.H b/Src/AmrCore/AMReX_Interpolater.H similarity index 99% rename from Src/C_AmrCoreLib/Interpolater.H rename to Src/AmrCore/AMReX_Interpolater.H index 595917cd6..9cf4fed42 100644 --- a/Src/C_AmrCoreLib/Interpolater.H +++ b/Src/AmrCore/AMReX_Interpolater.H @@ -1,9 +1,9 @@ #ifndef _INTERPOLATER_H_ #define _INTERPOLATER_H_ -#include -#include -#include +#include +#include +#include class Geometry; class FArrayBox; diff --git a/Src/C_AmrCoreLib/Interpolater.cpp b/Src/AmrCore/AMReX_Interpolater.cpp similarity index 99% rename from Src/C_AmrCoreLib/Interpolater.cpp rename to Src/AmrCore/AMReX_Interpolater.cpp index bba9a696d..04fb9a63b 100644 --- a/Src/C_AmrCoreLib/Interpolater.cpp +++ b/Src/AmrCore/AMReX_Interpolater.cpp @@ -1,11 +1,11 @@ -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include // // Note that in 1D, CellConservativeProtected and CellQuadratic diff --git a/Src/C_AmrCoreLib/TagBox.H b/Src/AmrCore/AMReX_TagBox.H similarity index 95% rename from Src/C_AmrCoreLib/TagBox.H rename to Src/AmrCore/AMReX_TagBox.H index 980013478..a32c10818 100644 --- a/Src/C_AmrCoreLib/TagBox.H +++ b/Src/AmrCore/AMReX_TagBox.H @@ -2,14 +2,13 @@ #ifndef _TagBox_H_ #define _TagBox_H_ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // // Tagged cells in a Box. diff --git a/Src/C_AmrCoreLib/TagBox.cpp b/Src/AmrCore/AMReX_TagBox.cpp similarity index 98% rename from Src/C_AmrCoreLib/TagBox.cpp rename to Src/AmrCore/AMReX_TagBox.cpp index be4946d93..a857b49ef 100644 --- a/Src/C_AmrCoreLib/TagBox.cpp +++ b/Src/AmrCore/AMReX_TagBox.cpp @@ -1,14 +1,14 @@ -#include +#include #include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include TagBox::TagBox () {} diff --git a/Src/C_AmrCoreLib/CMakeLists.txt b/Src/AmrCore/CMakeLists.txt similarity index 61% rename from Src/C_AmrCoreLib/CMakeLists.txt rename to Src/AmrCore/CMakeLists.txt index c17e7674c..a1207b066 100644 --- a/Src/C_AmrCoreLib/CMakeLists.txt +++ b/Src/AmrCore/CMakeLists.txt @@ -14,19 +14,19 @@ project(CAMRCORELIB) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files AmrCore.cpp Cluster.cpp ErrorList.cpp FillPatchUtil.cpp FluxRegister.cpp Interpolater.cpp TagBox.cpp ) -set(FPP_source_files FLUXREG_${BL_SPACEDIM}D.F INTERP_${BL_SPACEDIM}D.F ) +set(CXX_source_files AMReX_AmrCore.cpp AMReX_Cluster.cpp AMReX_ErrorList.cpp AMReX_FillPatchUtil.cpp AMReX_FluxRegister.cpp AMReX_Interpolater.cpp AMReX_TagBox.cpp ) +set(FPP_source_files AMReX_FLUXREG_${BL_SPACEDIM}D.F AMReX_INTERP_${BL_SPACEDIM}D.F ) -set(CXX_header_files AmrCore.H Cluster.H ErrorList.H FillPatchUtil.H FluxRegister.H Interpolater.H TagBox.H INTERP_F.H) -set(FPP_header_files FLUXREG_F.H ) +set(CXX_header_files AMReX_AmrCore.H AMReX_Cluster.H AMReX_ErrorList.H AMReX_FillPatchUtil.H AMReX_FluxRegister.H AMReX_Interpolater.H AMReX_TagBox.H AMReX_INTERP_F.H) +set(FPP_header_files AMReX_FLUXREG_F.H ) set(F77_header_files) set(F90_header_files) set(F77_source_files) -# These files are in C_ParticleLib +# These files are in Particle if(BL_USE_PARTICLES EQUAL 1) - list(APPEND CXX_header_files AmrParGDB.H AmrParticles.H) + list(APPEND CXX_header_files AMReX_AmrParGDB.H AMReX_AmrParticles.H) endif() preprocess_boxlib_fortran(FPP_out_files ${FPP_source_files}) diff --git a/Src/AmrCore/Make.package b/Src/AmrCore/Make.package new file mode 100644 index 000000000..d1ce98f48 --- /dev/null +++ b/Src/AmrCore/Make.package @@ -0,0 +1,15 @@ + +CEXE_headers += AMReX_AmrCore.H AMReX_Cluster.H AMReX_ErrorList.H AMReX_FillPatchUtil.H AMReX_FluxRegister.H \ + AMReX_Interpolater.H AMReX_TagBox.H +CEXE_sources += AMReX_AmrCore.cpp AMReX_Cluster.cpp AMReX_ErrorList.cpp AMReX_FillPatchUtil.cpp AMReX_FluxRegister.cpp \ + AMReX_Interpolater.cpp AMReX_TagBox.cpp + +FEXE_headers += AMReX_FLUXREG_F.H AMReX_INTERP_F.H +FEXE_sources += AMReX_FLUXREG_$(DIM)D.F AMReX_INTERP_$(DIM)D.F + +ifeq ($(USE_PARTICLES), TRUE) + CEXE_headers += AMReX_AmrParGDB.H AMReX_AmrParticles.H +endif + +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/AmrCore +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/AmrCore diff --git a/Src/C_BaseLib/Arena.H b/Src/Base/AMReX_Arena.H similarity index 97% rename from Src/C_BaseLib/Arena.H rename to Src/Base/AMReX_Arena.H index c158d2077..f3f8cdbc8 100644 --- a/Src/C_BaseLib/Arena.H +++ b/Src/Base/AMReX_Arena.H @@ -2,7 +2,7 @@ #ifndef BL_ARENA_H #define BL_ARENA_H -#include +#include #include class Arena; diff --git a/Src/C_BaseLib/Arena.cpp b/Src/Base/AMReX_Arena.cpp similarity index 78% rename from Src/C_BaseLib/Arena.cpp rename to Src/Base/AMReX_Arena.cpp index 5b49a16f1..6a6b96408 100644 --- a/Src/C_BaseLib/Arena.cpp +++ b/Src/Base/AMReX_Arena.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include const unsigned int Arena::align_size; diff --git a/Src/C_BaseLib/Array.H b/Src/Base/AMReX_Array.H similarity index 75% rename from Src/C_BaseLib/Array.H rename to Src/Base/AMReX_Array.H index 3c0066aef..110fddf7c 100644 --- a/Src/C_BaseLib/Array.H +++ b/Src/Base/AMReX_Array.H @@ -5,7 +5,7 @@ #include #include #include -#include +#include // // This class is a thin wrapper around std::vector. Unlike vector, @@ -44,18 +44,16 @@ namespace BoxLib template Array GetArrOfPtrs (const Array >& a) { - Array r(a.size()); - std::transform(a.begin(), a.end(), r.begin(), - [](const std::unique_ptr& p) { return p.get(); }); + Array r; + for (const auto& x : a) r.push_back(x.get()); return r; } template Array GetArrOfConstPtrs (const Array >& a) { - Array r(a.size()); - std::transform(a.begin(), a.end(), r.begin(), - [](const std::unique_ptr& p) { return p.get(); }); + Array r; + for (const auto& x : a) r.push_back(x.get()); return r; } @@ -64,6 +62,14 @@ namespace BoxLib { return {a.begin(), a.end()}; } + + template + Array > GetArrOfArrOfPtrs (const Array > >& a) + { + Array > r; + for (const auto& x : a) r.push_back(GetArrOfPtrs(x)); + return r; + } } #endif /*BL_ARRAY_H*/ diff --git a/Src/C_BaseLib/ArrayLim.H b/Src/Base/AMReX_ArrayLim.H similarity index 99% rename from Src/C_BaseLib/ArrayLim.H rename to Src/Base/AMReX_ArrayLim.H index 07b7ca06d..c17cc185c 100644 --- a/Src/C_BaseLib/ArrayLim.H +++ b/Src/Base/AMReX_ArrayLim.H @@ -50,7 +50,7 @@ ** Fortran stuff ... */ -#include +#include #ifdef BL_USE_ARLIM diff --git a/Src/C_BaseLib/BArena.H b/Src/Base/AMReX_BArena.H similarity index 95% rename from Src/C_BaseLib/BArena.H rename to Src/Base/AMReX_BArena.H index 190dbb3f3..98aa1c428 100644 --- a/Src/C_BaseLib/BArena.H +++ b/Src/Base/AMReX_BArena.H @@ -2,7 +2,7 @@ #ifndef BL_BARENA_H #define BL_BARENA_H -#include +#include // // A Concrete Class for Dynamic Memory Management diff --git a/Src/C_BaseLib/BArena.cpp b/Src/Base/AMReX_BArena.cpp similarity index 84% rename from Src/C_BaseLib/BArena.cpp rename to Src/Base/AMReX_BArena.cpp index 27b1f1b7a..e7c325ac9 100644 --- a/Src/C_BaseLib/BArena.cpp +++ b/Src/Base/AMReX_BArena.cpp @@ -1,5 +1,5 @@ -#include +#include void* BArena::alloc (std::size_t _sz) diff --git a/Src/C_BaseLib/BCRec.H b/Src/Base/AMReX_BCRec.H similarity index 98% rename from Src/C_BaseLib/BCRec.H rename to Src/Base/AMReX_BCRec.H index 80fd40903..fd29974c3 100644 --- a/Src/C_BaseLib/BCRec.H +++ b/Src/Base/AMReX_BCRec.H @@ -2,8 +2,8 @@ #ifndef _BCREC_H_ #define _BCREC_H_ -#include -#include +#include +#include // // Boundary Condition Records. // diff --git a/Src/C_BaseLib/BCRec.cpp b/Src/Base/AMReX_BCRec.cpp similarity index 99% rename from Src/C_BaseLib/BCRec.cpp rename to Src/Base/AMReX_BCRec.cpp index 4deefe96c..d47936933 100644 --- a/Src/C_BaseLib/BCRec.cpp +++ b/Src/Base/AMReX_BCRec.cpp @@ -1,7 +1,7 @@ #include -#include +#include BCRec::BCRec (D_DECL(int loX, int loY, int loZ), D_DECL(int hiX, int hiY, int hiZ)) diff --git a/Src/C_BaseLib/BC_TYPES.H b/Src/Base/AMReX_BC_TYPES.H similarity index 100% rename from Src/C_BaseLib/BC_TYPES.H rename to Src/Base/AMReX_BC_TYPES.H diff --git a/Src/C_BaseLib/BLBackTrace.H b/Src/Base/AMReX_BLBackTrace.H similarity index 100% rename from Src/C_BaseLib/BLBackTrace.H rename to Src/Base/AMReX_BLBackTrace.H diff --git a/Src/C_BaseLib/BLBackTrace.cpp b/Src/Base/AMReX_BLBackTrace.cpp similarity index 97% rename from Src/C_BaseLib/BLBackTrace.cpp rename to Src/Base/AMReX_BLBackTrace.cpp index 96aabf488..7c3dc89bf 100644 --- a/Src/C_BaseLib/BLBackTrace.cpp +++ b/Src/Base/AMReX_BLBackTrace.cpp @@ -4,9 +4,9 @@ #include -#include -#include -#include +#include +#include +#include #ifdef BL_BACKTRACING std::stack > BLBackTrace::bt_stack; diff --git a/Src/C_BaseLib/BLBoxLib_F.f b/Src/Base/AMReX_BLBoxLib_F.f similarity index 100% rename from Src/C_BaseLib/BLBoxLib_F.f rename to Src/Base/AMReX_BLBoxLib_F.f diff --git a/Src/C_BaseLib/BLFort.H b/Src/Base/AMReX_BLFort.H similarity index 94% rename from Src/C_BaseLib/BLFort.H rename to Src/Base/AMReX_BLFort.H index 58ff9d093..23fb8fa3f 100644 --- a/Src/C_BaseLib/BLFort.H +++ b/Src/Base/AMReX_BLFort.H @@ -1,8 +1,8 @@ #ifndef _BL_BLFORT_H_ #define _BL_BLFORT_H_ -#include -#include +#include +#include #ifndef BL_LANG_FORT diff --git a/Src/C_BaseLib/BLParmParse_F.f b/Src/Base/AMReX_BLParmParse_F.f similarity index 100% rename from Src/C_BaseLib/BLParmParse_F.f rename to Src/Base/AMReX_BLParmParse_F.f diff --git a/Src/C_BaseLib/BLPgas.H b/Src/Base/AMReX_BLPgas.H similarity index 98% rename from Src/C_BaseLib/BLPgas.H rename to Src/Base/AMReX_BLPgas.H index 5883cade4..65491e9d4 100644 --- a/Src/C_BaseLib/BLPgas.H +++ b/Src/Base/AMReX_BLPgas.H @@ -2,7 +2,7 @@ #ifndef BL_PGAS_H #define BL_PGAS_H -#include +#include #include namespace BLPgas diff --git a/Src/C_BaseLib/BLPgas.cpp b/Src/Base/AMReX_BLPgas.cpp similarity index 98% rename from Src/C_BaseLib/BLPgas.cpp rename to Src/Base/AMReX_BLPgas.cpp index ef04e57b0..81b3258d9 100644 --- a/Src/C_BaseLib/BLPgas.cpp +++ b/Src/Base/AMReX_BLPgas.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include //#include #include diff --git a/Src/C_BaseLib/BLProfiler.H b/Src/Base/AMReX_BLProfiler.H similarity index 99% rename from Src/C_BaseLib/BLProfiler.H rename to Src/Base/AMReX_BLProfiler.H index 9ee588215..5cba1c758 100644 --- a/Src/C_BaseLib/BLProfiler.H +++ b/Src/Base/AMReX_BLProfiler.H @@ -3,11 +3,11 @@ #ifdef BL_PROFILING -#include -#include +#include +#include #ifndef BL_AMRPROF -#include -#include +#include +#include #endif #include @@ -423,7 +423,7 @@ inline std::string BLProfiler::CommStats::CFTToString(CommFuncType cft) { // -------------------------------------------- #elif defined(BL_TINY_PROFILING) -#include +#include #define BL_PROFILE_INITIALIZE() TinyProfiler::Initialize(); #define BL_PROFILE_FINALIZE() TinyProfiler::Finalize(); @@ -451,7 +451,7 @@ inline std::string BLProfiler::CommStats::CFTToString(CommFuncType cft) { #else #include -#include +#include class BLProfiler { diff --git a/Src/C_BaseLib/BLProfiler.cpp b/Src/Base/AMReX_BLProfiler.cpp similarity index 99% rename from Src/C_BaseLib/BLProfiler.cpp rename to Src/Base/AMReX_BLProfiler.cpp index f3cb7a452..f12b3bda0 100644 --- a/Src/C_BaseLib/BLProfiler.cpp +++ b/Src/Base/AMReX_BLProfiler.cpp @@ -1,11 +1,11 @@ #ifdef BL_PROFILING -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -1519,7 +1519,7 @@ namespace { } } -#include +#include BL_FORT_PROC_DECL(BL_PROFFORTFUNCSTART_CPP, bl_proffortfuncstart_cpp) (const int istr[], const int *NSTR) @@ -1596,7 +1596,7 @@ BL_FORT_PROC_DECL(BL_PROFFORTFUNCSTOP_CPP_INT, bl_proffortfuncstop_cpp_int) #else -#include +#include BL_FORT_PROC_DECL(BL_PROFFORTFUNCSTART_CPP,bl_proffortfuncstart_cpp) ( diff --git a/Src/C_BaseLib/BLProfiler_F.f b/Src/Base/AMReX_BLProfiler_F.f similarity index 100% rename from Src/C_BaseLib/BLProfiler_F.f rename to Src/Base/AMReX_BLProfiler_F.f diff --git a/Src/C_BaseLib/BLassert.H b/Src/Base/AMReX_BLassert.H similarity index 98% rename from Src/C_BaseLib/BLassert.H rename to Src/Base/AMReX_BLassert.H index 295ced8ea..4de9c3c56 100644 --- a/Src/C_BaseLib/BLassert.H +++ b/Src/Base/AMReX_BLassert.H @@ -2,7 +2,7 @@ #ifndef BL_BLASSERT_H #define BL_BLASSERT_H -#include +#include #ifdef BL_ASSERT #undef BL_ASSERT diff --git a/Src/C_BaseLib/BLutil_F.f b/Src/Base/AMReX_BLutil_F.f similarity index 100% rename from Src/C_BaseLib/BLutil_F.f rename to Src/Base/AMReX_BLutil_F.f diff --git a/Src/C_BaseLib/BaseFab.H b/Src/Base/AMReX_BaseFab.H similarity index 99% rename from Src/C_BaseLib/BaseFab.H rename to Src/Base/AMReX_BaseFab.H index ef9e0384f..25af11677 100644 --- a/Src/C_BaseLib/BaseFab.H +++ b/Src/Base/AMReX_BaseFab.H @@ -2,7 +2,7 @@ #ifndef BL_BASEFAB_H #define BL_BASEFAB_H -#include +#include #include #include #include @@ -12,14 +12,13 @@ #include #endif -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace BoxLib { diff --git a/Src/C_BaseLib/BaseFab.cpp b/Src/Base/AMReX_BaseFab.cpp similarity index 98% rename from Src/C_BaseLib/BaseFab.cpp rename to Src/Base/AMReX_BaseFab.cpp index b40018bf7..fa5816273 100644 --- a/Src/C_BaseLib/BaseFab.cpp +++ b/Src/Base/AMReX_BaseFab.cpp @@ -1,19 +1,19 @@ -#include +#include #include #include -#include -#include -#include +#include +#include +#include #if !(defined(BL_NO_FORT) || defined(WIN32)) -#include +#include #endif #ifdef BL_MEM_PROFILING -#include +#include #endif long BoxLib::private_total_bytes_allocated_in_fabs = 0L; diff --git a/Src/C_BaseLib/BaseFab_f.H b/Src/Base/AMReX_BaseFab_f.H similarity index 98% rename from Src/C_BaseLib/BaseFab_f.H rename to Src/Base/AMReX_BaseFab_f.H index c81e715fc..a92f6296f 100644 --- a/Src/C_BaseLib/BaseFab_f.H +++ b/Src/Base/AMReX_BaseFab_f.H @@ -1,8 +1,8 @@ #ifndef BASEFAB_F_H_ #define BASEFAB_F_H_ -#include -#include +#include +#include extern "C" { diff --git a/Src/C_BaseLib/BaseFab_nd.f90 b/Src/Base/AMReX_BaseFab_nd.f90 similarity index 100% rename from Src/C_BaseLib/BaseFab_nd.f90 rename to Src/Base/AMReX_BaseFab_nd.f90 diff --git a/Src/C_BaseLib/Box.H b/Src/Base/AMReX_Box.H similarity index 99% rename from Src/C_BaseLib/Box.H rename to Src/Base/AMReX_Box.H index eb884d7a2..b6c36373d 100644 --- a/Src/C_BaseLib/Box.H +++ b/Src/Base/AMReX_Box.H @@ -4,12 +4,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // // Forward declaration. // diff --git a/Src/C_BaseLib/Box.cpp b/Src/Base/AMReX_Box.cpp similarity index 99% rename from Src/C_BaseLib/Box.cpp rename to Src/Base/AMReX_Box.cpp index 2a14cb4f5..72ffe2cc6 100644 --- a/Src/C_BaseLib/Box.cpp +++ b/Src/Base/AMReX_Box.cpp @@ -2,9 +2,9 @@ #include #include -#include -#include -#include +#include +#include +#include const Box& Box::TheUnitBox () diff --git a/Src/C_BaseLib/BoxArray.H b/Src/Base/AMReX_BoxArray.H similarity index 99% rename from Src/C_BaseLib/BoxArray.H rename to Src/Base/AMReX_BoxArray.H index 5f789a248..72b26798f 100644 --- a/Src/C_BaseLib/BoxArray.H +++ b/Src/Base/AMReX_BoxArray.H @@ -6,11 +6,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class BoxArray; diff --git a/Src/C_BaseLib/BoxArray.cpp b/Src/Base/AMReX_BoxArray.cpp similarity index 99% rename from Src/C_BaseLib/BoxArray.cpp rename to Src/Base/AMReX_BoxArray.cpp index c2eb787fa..10056b065 100644 --- a/Src/C_BaseLib/BoxArray.cpp +++ b/Src/Base/AMReX_BoxArray.cpp @@ -1,11 +1,11 @@ -#include -#include -#include -#include +#include +#include +#include +#include #ifdef BL_MEM_PROFILING -#include +#include int BARef::numboxarrays = 0; int BARef::numboxarrays_hwm = 0; long BARef::total_box_bytes = 0L; diff --git a/Src/C_BaseLib/BoxDomain.H b/Src/Base/AMReX_BoxDomain.H similarity index 97% rename from Src/C_BaseLib/BoxDomain.H rename to Src/Base/AMReX_BoxDomain.H index 9e7ef5ee8..d0f344395 100644 --- a/Src/C_BaseLib/BoxDomain.H +++ b/Src/Base/AMReX_BoxDomain.H @@ -4,10 +4,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include // // Forward declaration. // diff --git a/Src/C_BaseLib/BoxDomain.cpp b/Src/Base/AMReX_BoxDomain.cpp similarity index 98% rename from Src/C_BaseLib/BoxDomain.cpp rename to Src/Base/AMReX_BoxDomain.cpp index 9943e6706..155acb18a 100644 --- a/Src/C_BaseLib/BoxDomain.cpp +++ b/Src/Base/AMReX_BoxDomain.cpp @@ -1,8 +1,8 @@ #include -#include -#include +#include +#include BoxDomain& BoxDomain::intersect (const Box& b) diff --git a/Src/C_BaseLib/BoxLib.H b/Src/Base/AMReX_BoxLib.H similarity index 98% rename from Src/C_BaseLib/BoxLib.H rename to Src/Base/AMReX_BoxLib.H index 52cd165ed..bda9ca176 100644 --- a/Src/C_BaseLib/BoxLib.H +++ b/Src/Base/AMReX_BoxLib.H @@ -2,7 +2,7 @@ #ifndef BL_BOXLIB_H #define BL_BOXLIB_H -#include +#include #include #include diff --git a/Src/C_BaseLib/BoxLib.cpp b/Src/Base/AMReX_BoxLib.cpp similarity index 96% rename from Src/C_BaseLib/BoxLib.cpp rename to Src/Base/AMReX_BoxLib.cpp index b11f3bcc7..29b7663bf 100644 --- a/Src/C_BaseLib/BoxLib.cpp +++ b/Src/Base/AMReX_BoxLib.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include @@ -9,24 +9,24 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifndef BL_AMRPROF -#include -#include -#include -#include +#include +#include +#include +#include #endif #ifdef BL_LAZY -#include +#include #endif #ifdef BL_MEM_PROFILING -#include +#include #ifdef BL_USE_F_BASELIB #include #endif @@ -36,8 +36,8 @@ #include #endif -#include -#include +#include +#include #if defined(BL_USE_FORTRAN_MPI) || defined(BL_USE_F_INTERFACES) extern "C" { @@ -160,7 +160,7 @@ namespace } } -#include +#include BL_FORT_PROC_DECL(BL_ERROR_CPP,bl_error_cpp) ( diff --git a/Src/C_BaseLib/BoxList.H b/Src/Base/AMReX_BoxList.H similarity index 99% rename from Src/C_BaseLib/BoxList.H rename to Src/Base/AMReX_BoxList.H index 905f747ac..0e8bab5ed 100644 --- a/Src/C_BaseLib/BoxList.H +++ b/Src/Base/AMReX_BoxList.H @@ -5,9 +5,9 @@ #include #include -#include -#include -#include +#include +#include +#include // // Forward declarations. // diff --git a/Src/C_BaseLib/BoxList.cpp b/Src/Base/AMReX_BoxList.cpp similarity index 99% rename from Src/C_BaseLib/BoxList.cpp rename to Src/Base/AMReX_BoxList.cpp index 81c97c7d4..346e158b8 100644 --- a/Src/C_BaseLib/BoxList.cpp +++ b/Src/Base/AMReX_BoxList.cpp @@ -1,12 +1,12 @@ -#include +#include #include #include -#include -#include -#include +#include +#include +#include void BoxList::clear () diff --git a/Src/C_BaseLib/CArena.H b/Src/Base/AMReX_CArena.H similarity index 98% rename from Src/C_BaseLib/CArena.H rename to Src/Base/AMReX_CArena.H index f26593580..5539d7afe 100644 --- a/Src/C_BaseLib/CArena.H +++ b/Src/Base/AMReX_CArena.H @@ -1,13 +1,13 @@ #ifndef BL_CARENA_H #define BL_CARENA_H -#include +#include #include #include #include -#include -#include +#include +#include // // A Concrete Class for Dynamic Memory Management diff --git a/Src/C_BaseLib/CArena.cpp b/Src/Base/AMReX_CArena.cpp similarity index 98% rename from Src/C_BaseLib/CArena.cpp rename to Src/Base/AMReX_CArena.cpp index 70079c85f..c95634441 100644 --- a/Src/C_BaseLib/CArena.cpp +++ b/Src/Base/AMReX_CArena.cpp @@ -1,9 +1,9 @@ -#include +#include #include #include -#include +#include CArena::CArena (size_t hunk_size) { diff --git a/Src/C_BaseLib/CONSTANTS.H b/Src/Base/AMReX_CONSTANTS.H similarity index 97% rename from Src/C_BaseLib/CONSTANTS.H rename to Src/Base/AMReX_CONSTANTS.H index b1df1d07f..e0a0f1e26 100644 --- a/Src/C_BaseLib/CONSTANTS.H +++ b/Src/Base/AMReX_CONSTANTS.H @@ -1,7 +1,7 @@ #ifndef BL_CONSTANTS_H #define BL_CONSTANTS_H -#include +#include #ifdef BL_LANG_FORT diff --git a/Src/C_BaseLib/COORDSYS_1D.F b/Src/Base/AMReX_COORDSYS_1D.F similarity index 98% rename from Src/C_BaseLib/COORDSYS_1D.F rename to Src/Base/AMReX_COORDSYS_1D.F index 59fe284f1..1f203209a 100644 --- a/Src/C_BaseLib/COORDSYS_1D.F +++ b/Src/Base/AMReX_COORDSYS_1D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "COORDSYS_F.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_COORDSYS_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 1 diff --git a/Src/C_BaseLib/COORDSYS_2D.F b/Src/Base/AMReX_COORDSYS_2D.F similarity index 98% rename from Src/C_BaseLib/COORDSYS_2D.F rename to Src/Base/AMReX_COORDSYS_2D.F index 357432324..da57b8f19 100644 --- a/Src/C_BaseLib/COORDSYS_2D.F +++ b/Src/Base/AMReX_COORDSYS_2D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "COORDSYS_F.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_COORDSYS_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Src/C_BaseLib/COORDSYS_3D.F b/Src/Base/AMReX_COORDSYS_3D.F similarity index 97% rename from Src/C_BaseLib/COORDSYS_3D.F rename to Src/Base/AMReX_COORDSYS_3D.F index 589dea3f1..94dc2d572 100644 --- a/Src/C_BaseLib/COORDSYS_3D.F +++ b/Src/Base/AMReX_COORDSYS_3D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "COORDSYS_F.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_COORDSYS_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 diff --git a/Src/C_BaseLib/COORDSYS_F.H b/Src/Base/AMReX_COORDSYS_F.H similarity index 98% rename from Src/C_BaseLib/COORDSYS_F.H rename to Src/Base/AMReX_COORDSYS_F.H index 8e6c947f7..c488e72e0 100644 --- a/Src/C_BaseLib/COORDSYS_F.H +++ b/Src/Base/AMReX_COORDSYS_F.H @@ -26,7 +26,7 @@ # endif # endif -#include +#include extern "C" { diff --git a/Src/C_BaseLib/CoordSys.H b/Src/Base/AMReX_CoordSys.H similarity index 99% rename from Src/C_BaseLib/CoordSys.H rename to Src/Base/AMReX_CoordSys.H index 3a0b8ffcf..de40c9374 100644 --- a/Src/C_BaseLib/CoordSys.H +++ b/Src/Base/AMReX_CoordSys.H @@ -2,9 +2,9 @@ #ifndef _COORDSYS_H_ #define _COORDSYS_H_ -#include -#include -#include +#include +#include +#include class FArrayBox; diff --git a/Src/C_BaseLib/CoordSys.cpp b/Src/Base/AMReX_CoordSys.cpp similarity index 98% rename from Src/C_BaseLib/CoordSys.cpp rename to Src/Base/AMReX_CoordSys.cpp index bb8dbed5c..2cf190728 100644 --- a/Src/C_BaseLib/CoordSys.cpp +++ b/Src/Base/AMReX_CoordSys.cpp @@ -1,11 +1,11 @@ -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #if (BL_SPACEDIM==2) const double RZFACTOR = 2*3.14159265358979323846264338327950288; diff --git a/Src/C_BaseLib/DistributionMapping.H b/Src/Base/AMReX_DistributionMapping.H similarity index 98% rename from Src/C_BaseLib/DistributionMapping.H rename to Src/Base/AMReX_DistributionMapping.H index a74284753..bc74c9ea9 100644 --- a/Src/C_BaseLib/DistributionMapping.H +++ b/Src/Base/AMReX_DistributionMapping.H @@ -4,12 +4,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class BoxArray; class MultiFab; diff --git a/Src/C_BaseLib/DistributionMapping.cpp b/Src/Base/AMReX_DistributionMapping.cpp similarity index 99% rename from Src/C_BaseLib/DistributionMapping.cpp rename to Src/Base/AMReX_DistributionMapping.cpp index fc1723e68..6e4966c27 100644 --- a/Src/C_BaseLib/DistributionMapping.cpp +++ b/Src/Base/AMReX_DistributionMapping.cpp @@ -1,16 +1,16 @@ -#include - -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include #if !(defined(BL_NO_FORT) || defined(WIN32)) -#include +#include #endif -#include -#include +#include +#include #include #include diff --git a/Src/C_BaseLib/FArrayBox.H b/Src/Base/AMReX_FArrayBox.H similarity index 99% rename from Src/C_BaseLib/FArrayBox.H rename to Src/Base/AMReX_FArrayBox.H index d3da8c6a6..403b005db 100644 --- a/Src/C_BaseLib/FArrayBox.H +++ b/Src/Base/AMReX_FArrayBox.H @@ -2,11 +2,11 @@ #ifndef BL_FARRAYBOX_H #define BL_FARRAYBOX_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class FArrayBox; diff --git a/Src/C_BaseLib/FArrayBox.cpp b/Src/Base/AMReX_FArrayBox.cpp similarity index 98% rename from Src/C_BaseLib/FArrayBox.cpp rename to Src/Base/AMReX_FArrayBox.cpp index fe9035ec6..96538e151 100644 --- a/Src/C_BaseLib/FArrayBox.cpp +++ b/Src/Base/AMReX_FArrayBox.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include @@ -8,17 +8,17 @@ #include #include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include bool FArrayBox::initialized = false; diff --git a/Src/C_BaseLib/FILCC_1D.F b/Src/Base/AMReX_FILCC_1D.F similarity index 96% rename from Src/C_BaseLib/FILCC_1D.F rename to Src/Base/AMReX_FILCC_1D.F index ae9e30ac1..4bd90e5bf 100644 --- a/Src/C_BaseLib/FILCC_1D.F +++ b/Src/Base/AMReX_FILCC_1D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_ArrayLim.H" #define SDIM 1 diff --git a/Src/C_BaseLib/FILCC_2D.F b/Src/Base/AMReX_FILCC_2D.F similarity index 99% rename from Src/C_BaseLib/FILCC_2D.F rename to Src/Base/AMReX_FILCC_2D.F index bfa45e8b9..23f3bc891 100644 --- a/Src/C_BaseLib/FILCC_2D.F +++ b/Src/Base/AMReX_FILCC_2D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Src/C_BaseLib/FILCC_3D.F b/Src/Base/AMReX_FILCC_3D.F similarity index 99% rename from Src/C_BaseLib/FILCC_3D.F rename to Src/Base/AMReX_FILCC_3D.F index 1e82a0145..f95e449ab 100644 --- a/Src/C_BaseLib/FILCC_3D.F +++ b/Src/Base/AMReX_FILCC_3D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 diff --git a/Src/C_BaseLib/FPC.H b/Src/Base/AMReX_FPC.H similarity index 99% rename from Src/C_BaseLib/FPC.H rename to Src/Base/AMReX_FPC.H index 397cfffe4..74024dac3 100644 --- a/Src/C_BaseLib/FPC.H +++ b/Src/Base/AMReX_FPC.H @@ -2,7 +2,7 @@ #ifndef BL_FPC_H #define BL_FPC_H -#include +#include // // A Collection of Floating-Point Constants Supporting FAB I/O diff --git a/Src/C_BaseLib/FPC.cpp b/Src/Base/AMReX_FPC.cpp similarity index 99% rename from Src/C_BaseLib/FPC.cpp rename to Src/Base/AMReX_FPC.cpp index b104ce202..c52e16f09 100644 --- a/Src/C_BaseLib/FPC.cpp +++ b/Src/Base/AMReX_FPC.cpp @@ -1,5 +1,5 @@ -#include +#include // // FP orders. // diff --git a/Src/C_BaseLib/FabArray.H b/Src/Base/AMReX_FabArray.H similarity index 99% rename from Src/C_BaseLib/FabArray.H rename to Src/Base/AMReX_FabArray.H index 926dab195..3976b4351 100644 --- a/Src/C_BaseLib/FabArray.H +++ b/Src/Base/AMReX_FabArray.H @@ -17,23 +17,23 @@ #endif #ifdef BL_USE_UPCXX -#include +#include #endif -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // // Helper class @@ -3257,9 +3257,7 @@ FabArray::AddProcsToComp (int ioProcNumSCS, int ioProcNumAll, } BoxLib::BroadcastArray(setArray, scsMyId, ioProcNumSCS, scsComm); if(scsMyId != ioProcNumSCS) { - for(int i(0); i < setArray.size(); ++i) { - noallocFAPIds.insert(setArray[i]); - } + noallocFAPIds.insert(std::begin(setArray), std::end(setArray)); } // ---- m_bdkey diff --git a/Src/C_BaseLib/FabArray.cpp b/Src/Base/AMReX_FabArray.cpp similarity index 99% rename from Src/C_BaseLib/FabArray.cpp rename to Src/Base/AMReX_FabArray.cpp index 3ac3c4921..3f9128476 100644 --- a/Src/C_BaseLib/FabArray.cpp +++ b/Src/Base/AMReX_FabArray.cpp @@ -1,19 +1,19 @@ -#include +#include #include #include #ifdef BL_LAZY -#include +#include #endif -#include -#include -#include -#include +#include +#include +#include +#include #ifdef BL_MEM_PROFILING -#include +#include #endif // diff --git a/Src/C_BaseLib/FabConv.H b/Src/Base/AMReX_FabConv.H similarity index 99% rename from Src/C_BaseLib/FabConv.H rename to Src/Base/AMReX_FabConv.H index 63bb1e3fe..244e5140d 100644 --- a/Src/C_BaseLib/FabConv.H +++ b/Src/Base/AMReX_FabConv.H @@ -4,9 +4,9 @@ #include -#include -#include -#include +#include +#include +#include // // A Descriptor of the Long Integer type diff --git a/Src/C_BaseLib/FabConv.cpp b/Src/Base/AMReX_FabConv.cpp similarity index 99% rename from Src/C_BaseLib/FabConv.cpp rename to Src/Base/AMReX_FabConv.cpp index 75dbd0680..fccd32385 100644 --- a/Src/C_BaseLib/FabConv.cpp +++ b/Src/Base/AMReX_FabConv.cpp @@ -4,12 +4,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include bool RealDescriptor::bAlwaysFixDenormals (false); int RealDescriptor::writeBufferSize(262144); // ---- these are number of reals, diff --git a/Src/C_BaseLib/Geometry.H b/Src/Base/AMReX_Geometry.H similarity index 97% rename from Src/C_BaseLib/Geometry.H rename to Src/Base/AMReX_Geometry.H index 15d397a46..f1e769d08 100644 --- a/Src/C_BaseLib/Geometry.H +++ b/Src/Base/AMReX_Geometry.H @@ -9,14 +9,14 @@ #endif #ifdef BL_USE_UPCXX -#include +#include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // // Rectangular problem domain geometry. diff --git a/Src/C_BaseLib/Geometry.cpp b/Src/Base/AMReX_Geometry.cpp similarity index 98% rename from Src/C_BaseLib/Geometry.cpp rename to Src/Base/AMReX_Geometry.cpp index 808560369..e0e905c54 100644 --- a/Src/C_BaseLib/Geometry.cpp +++ b/Src/Base/AMReX_Geometry.cpp @@ -1,14 +1,14 @@ -#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifdef _OPENMP #include diff --git a/Src/C_BaseLib/IArrayBox.H b/Src/Base/AMReX_IArrayBox.H similarity index 95% rename from Src/C_BaseLib/IArrayBox.H rename to Src/Base/AMReX_IArrayBox.H index 44489be85..2f99d83c8 100644 --- a/Src/C_BaseLib/IArrayBox.H +++ b/Src/Base/AMReX_IArrayBox.H @@ -2,11 +2,11 @@ #ifndef BL_IFARRAYBOX_H #define BL_IFARRAYBOX_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class IArrayBox; diff --git a/Src/C_BaseLib/IArrayBox.cpp b/Src/Base/AMReX_IArrayBox.cpp similarity index 93% rename from Src/C_BaseLib/IArrayBox.cpp rename to Src/Base/AMReX_IArrayBox.cpp index 509179a95..e0959a4d6 100644 --- a/Src/C_BaseLib/IArrayBox.cpp +++ b/Src/Base/AMReX_IArrayBox.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include @@ -8,14 +8,14 @@ #include #include -#include -#include -#include +#include +#include +#include -#include -#include -#include -#include +#include +#include +#include +#include namespace { diff --git a/Src/C_BaseLib/IndexType.H b/Src/Base/AMReX_IndexType.H similarity index 98% rename from Src/C_BaseLib/IndexType.H rename to Src/Base/AMReX_IndexType.H index 121fb5b03..90b30b92e 100644 --- a/Src/C_BaseLib/IndexType.H +++ b/Src/Base/AMReX_IndexType.H @@ -4,9 +4,9 @@ #include -#include -#include -#include +#include +#include +#include // // Cell-Based or Node-Based Indices diff --git a/Src/C_BaseLib/IndexType.cpp b/Src/Base/AMReX_IndexType.cpp similarity index 98% rename from Src/C_BaseLib/IndexType.cpp rename to Src/Base/AMReX_IndexType.cpp index 1f31f50b6..1c4cf77f1 100644 --- a/Src/C_BaseLib/IndexType.cpp +++ b/Src/Base/AMReX_IndexType.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include void IndexType::setType (int dir, diff --git a/Src/C_BaseLib/IntVect.H b/Src/Base/AMReX_IntVect.H similarity index 99% rename from Src/C_BaseLib/IntVect.H rename to Src/Base/AMReX_IntVect.H index 98ba6207f..3a0460aee 100644 --- a/Src/C_BaseLib/IntVect.H +++ b/Src/Base/AMReX_IntVect.H @@ -2,13 +2,13 @@ #ifndef BL_INTVECT_H #define BL_INTVECT_H -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include // // An Integer Vector in SPACEDIM-Dimensional Space diff --git a/Src/C_BaseLib/IntVect.cpp b/Src/Base/AMReX_IntVect.cpp similarity index 96% rename from Src/C_BaseLib/IntVect.cpp rename to Src/Base/AMReX_IntVect.cpp index 1db2b1020..2e9887efd 100644 --- a/Src/C_BaseLib/IntVect.cpp +++ b/Src/Base/AMReX_IntVect.cpp @@ -1,14 +1,14 @@ -#include +#include #include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include const IntVect& IntVect::TheUnitVector () @@ -224,7 +224,7 @@ operator<< (std::ostream& os, // Copied from // #define BL_IGNORE_MAX 100000 -#include +#include std::istream& operator>> (std::istream& is, diff --git a/Src/C_BaseLib/Lazy.H b/Src/Base/AMReX_Lazy.H similarity index 100% rename from Src/C_BaseLib/Lazy.H rename to Src/Base/AMReX_Lazy.H diff --git a/Src/C_BaseLib/Lazy.cpp b/Src/Base/AMReX_Lazy.cpp similarity index 95% rename from Src/C_BaseLib/Lazy.cpp rename to Src/Base/AMReX_Lazy.cpp index ba325e387..2effee68c 100644 --- a/Src/C_BaseLib/Lazy.cpp +++ b/Src/Base/AMReX_Lazy.cpp @@ -1,4 +1,4 @@ -#include +#include namespace Lazy { diff --git a/Src/C_BaseLib/Looping.H b/Src/Base/AMReX_Looping.H similarity index 100% rename from Src/C_BaseLib/Looping.H rename to Src/Base/AMReX_Looping.H diff --git a/Src/C_BaseLib/MemPool.H b/Src/Base/AMReX_MemPool.H similarity index 100% rename from Src/C_BaseLib/MemPool.H rename to Src/Base/AMReX_MemPool.H diff --git a/Src/C_BaseLib/MemPool.cpp b/Src/Base/AMReX_MemPool.cpp similarity index 83% rename from Src/C_BaseLib/MemPool.cpp rename to Src/Base/AMReX_MemPool.cpp index 1e17c8c71..30fa8dba2 100644 --- a/Src/C_BaseLib/MemPool.cpp +++ b/Src/Base/AMReX_MemPool.cpp @@ -6,23 +6,23 @@ #include #include #include +#include #include -#include -#include -#include +#include +#include #ifdef BL_MEM_PROFILING -#include +#include #endif #ifndef FORTRAN_BOXLIB -#include +#include #endif namespace { - static PArray the_memory_pool; + static Array > the_memory_pool; #if defined(BL_TESTING) || defined(DEBUG) static int init_snan = 1; #else @@ -49,9 +49,9 @@ void mempool_init() #else int nthreads = 1; #endif - the_memory_pool.resize(nthreads, PArrayManage); + the_memory_pool.resize(nthreads); for (int i=0; ialloc(nbytes); } void mempool_free (void* p) @@ -92,7 +92,7 @@ void mempool_free (void* p) #else int tid = 0; #endif - the_memory_pool[tid].free(p); + the_memory_pool[tid]->free(p); } void mempool_get_stats (int& mp_min, int& mp_max, int& mp_tot) // min, max & tot in MB @@ -100,8 +100,8 @@ void mempool_get_stats (int& mp_min, int& mp_max, int& mp_tot) // min, max & tot size_t hsu_min=std::numeric_limits::max(); size_t hsu_max=0; size_t hsu_tot=0; - for (int i=0; iheap_space_used(); hsu_min = std::min(hsu, hsu_min); hsu_max = std::max(hsu, hsu_max); hsu_tot += hsu; diff --git a/Src/C_BaseLib/MemProfiler.H b/Src/Base/AMReX_MemProfiler.H similarity index 100% rename from Src/C_BaseLib/MemProfiler.H rename to Src/Base/AMReX_MemProfiler.H diff --git a/Src/C_BaseLib/MemProfiler.cpp b/Src/Base/AMReX_MemProfiler.cpp similarity index 98% rename from Src/C_BaseLib/MemProfiler.cpp rename to Src/Base/AMReX_MemProfiler.cpp index 3d68fea1a..59acd8b26 100644 --- a/Src/C_BaseLib/MemProfiler.cpp +++ b/Src/Base/AMReX_MemProfiler.cpp @@ -11,10 +11,10 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include void MemProfiler::add (const std::string& name, std::function&& f) diff --git a/Src/C_BaseLib/MultiFab.H b/Src/Base/AMReX_MultiFab.H similarity index 99% rename from Src/C_BaseLib/MultiFab.H rename to Src/Base/AMReX_MultiFab.H index 6597486ac..c320dad50 100644 --- a/Src/C_BaseLib/MultiFab.H +++ b/Src/Base/AMReX_MultiFab.H @@ -2,13 +2,13 @@ #ifndef BL_MULTIFAB_H #define BL_MULTIFAB_H -#include +#include #include -#include -#include -#include +#include +#include +#include // diff --git a/Src/C_BaseLib/MultiFab.cpp b/Src/Base/AMReX_MultiFab.cpp similarity index 98% rename from Src/C_BaseLib/MultiFab.cpp rename to Src/Base/AMReX_MultiFab.cpp index ce73d1599..ed7b47c31 100644 --- a/Src/C_BaseLib/MultiFab.cpp +++ b/Src/Base/AMReX_MultiFab.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include @@ -7,15 +7,14 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef BL_MEM_PROFILING -#include +#include #endif namespace @@ -877,10 +876,7 @@ MultiFab::norm0 (const Array& comps, int nghost, bool local) const #else int nthreads = 1; #endif - PArray< Array > priv_nm0(nthreads, PArrayManage); - for (int i=0; i(n, -rmax)); - } + Array > priv_nm0(nthreads, Array(n, -rmax)); #ifdef _OPENMP #pragma omp parallel @@ -934,7 +930,7 @@ MultiFab::norm2 (const Array& comps) const #else int nthreads = 1; #endif - PArray< Array > priv_nm2(nthreads, PArrayManage); + Array > priv_nm2(nthreads, Array(n, 0.0)); #ifdef _OPENMP #pragma omp parallel @@ -945,7 +941,6 @@ MultiFab::norm2 (const Array& comps) const #else int tid = 0; #endif - priv_nm2.set(tid, new Array(n, 0.0)); for (MFIter mfi(*this,true); mfi.isValid(); ++mfi) { @@ -1005,10 +1000,7 @@ MultiFab::norm1 (const Array& comps, int ngrow, bool local) const #else int nthreads = 1; #endif - PArray< Array > priv_nm1(nthreads, PArrayManage); - for (int i=0; i(n, 0.0)); - } + Array > priv_nm1(nthreads, Array(n, 0.0)); #ifdef _OPENMP #pragma omp parallel diff --git a/Src/C_BaseLib/MultiFabUtil.H b/Src/Base/AMReX_MultiFabUtil.H similarity index 59% rename from Src/C_BaseLib/MultiFabUtil.H rename to Src/Base/AMReX_MultiFabUtil.H index 944eeff92..dfe8bd4f2 100644 --- a/Src/C_BaseLib/MultiFabUtil.H +++ b/Src/Base/AMReX_MultiFabUtil.H @@ -1,36 +1,36 @@ #ifndef _MultiFabUtil_H_ #define _MultiFabUtil_H_ -#include -#include +#include +#include namespace BoxLib { // Average face-based MultiFab onto cell-centered MultiFab. - void average_edge_to_cellcenter (MultiFab& cc, int dcomp, const std::vector& edge); + void average_edge_to_cellcenter (MultiFab& cc, int dcomp, const Array& edge); // Average face-based MultiFab onto cell-centered MultiFab. - void average_face_to_cellcenter (MultiFab& cc, int dcomp, const std::vector& fc); - void average_face_to_cellcenter (MultiFab& cc, const PArray& fc, const Geometry& geom); + void average_face_to_cellcenter (MultiFab& cc, int dcomp, const Array& fc); + void average_face_to_cellcenter (MultiFab& cc, const Array& fc, const Geometry& geom); // Average cell-centered MultiFab onto face-based MultiFab. - void average_cellcenter_to_face (PArray& fc, const MultiFab& cc, const Geometry& geom); + void average_cellcenter_to_face (const Array& fc, const MultiFab& cc, const Geometry& geom); // Average fine face-based MultiFab onto crse fine-centered MultiFab. // This routine assumes that the crse BoxArray is a coarsened version of the fine BoxArray. - void average_down_faces (PArray& fine, PArray& crse, IntVect& ratio); + void average_down_faces (const Array& fine, const Array& crse, const IntVect& ratio); // Average fine cell-based MultiFab onto crse cell-centered MultiFab using volume-weighting. // This routine DOES NOT assume that the crse BoxArray is a coarsened version of the fine BoxArray. - void average_down(MultiFab& S_fine, MultiFab& S_crse, const Geometry& fine_geom, const Geometry& crse_geom, + void average_down(const MultiFab& S_fine, MultiFab& S_crse, const Geometry& fine_geom, const Geometry& crse_geom, int scomp, int ncomp, const IntVect& ratio); - void average_down(MultiFab& S_fine, MultiFab& S_crse, const Geometry& fine_geom, const Geometry& crse_geom, + void average_down(const MultiFab& S_fine, MultiFab& S_crse, const Geometry& fine_geom, const Geometry& crse_geom, int scomp, int ncomp, const int ratio); // Average fine cell-based MultiFab onto crse cell-centered MultiFab without volume weighting. // This routine DOES NOT assume that the crse BoxArray is a coarsened version of the fine BoxArray. - void average_down(MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp, const IntVect& ratio); - void average_down(MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp, int ratio); + void average_down(const MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp, const IntVect& ratio); + void average_down(const MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp, int ratio); // Fill MultiFab boundaries except for physical boundaries. void fill_boundary(MultiFab& mf, const Geometry& geom, bool cross = false); diff --git a/Src/C_BaseLib/MultiFabUtil.cpp b/Src/Base/AMReX_MultiFabUtil.cpp similarity index 82% rename from Src/C_BaseLib/MultiFabUtil.cpp rename to Src/Base/AMReX_MultiFabUtil.cpp index 35d6e79c2..c9a103ea5 100644 --- a/Src/C_BaseLib/MultiFabUtil.cpp +++ b/Src/Base/AMReX_MultiFabUtil.cpp @@ -1,10 +1,10 @@ -#include -#include +#include +#include namespace BoxLib { - void average_edge_to_cellcenter (MultiFab& cc, int dcomp, const std::vector& edge) + void average_edge_to_cellcenter (MultiFab& cc, int dcomp, const Array& edge) { BL_ASSERT(cc.nComp() >= dcomp + BL_SPACEDIM); BL_ASSERT(edge.size() == BL_SPACEDIM); @@ -25,7 +25,7 @@ namespace BoxLib } } - void average_face_to_cellcenter (MultiFab& cc, int dcomp, const std::vector& fc) + void average_face_to_cellcenter (MultiFab& cc, int dcomp, const Array& fc) { BL_ASSERT(cc.nComp() >= dcomp + BL_SPACEDIM); BL_ASSERT(fc.size() == BL_SPACEDIM); @@ -52,11 +52,12 @@ namespace BoxLib } } - void average_face_to_cellcenter (MultiFab& cc, const PArray& fc, const Geometry& geom) + void average_face_to_cellcenter (MultiFab& cc, const Array& fc, + const Geometry& geom) { BL_ASSERT(cc.nComp() >= BL_SPACEDIM); BL_ASSERT(fc.size() == BL_SPACEDIM); - BL_ASSERT(fc[0].nComp() == 1); // We only expect fc to have the gradient perpendicular to the face + BL_ASSERT(fc[0]->nComp() == 1); // We only expect fc to have the gradient perpendicular to the face const Real* dx = geom.CellSize(); const Real* problo = geom.ProbLo(); @@ -72,19 +73,20 @@ namespace BoxLib BL_FORT_PROC_CALL(BL_AVG_FC_TO_CC,bl_avg_fc_to_cc) (bx.loVect(), bx.hiVect(), BL_TO_FORTRAN(cc[mfi]), - D_DECL(BL_TO_FORTRAN(fc[0][mfi]), - BL_TO_FORTRAN(fc[1][mfi]), - BL_TO_FORTRAN(fc[2][mfi])), + D_DECL(BL_TO_FORTRAN((*fc[0])[mfi]), + BL_TO_FORTRAN((*fc[1])[mfi]), + BL_TO_FORTRAN((*fc[2])[mfi])), dx, problo, coord_type); } } - void average_cellcenter_to_face (PArray& fc, const MultiFab& cc, const Geometry& geom) + void average_cellcenter_to_face (const Array& fc, const MultiFab& cc, + const Geometry& geom) { BL_ASSERT(cc.nComp() == 1); BL_ASSERT(cc.nGrow() >= 1); BL_ASSERT(fc.size() == BL_SPACEDIM); - BL_ASSERT(fc[0].nComp() == 1); // We only expect fc to have the gradient perpendicular to the face + BL_ASSERT(fc[0]->nComp() == 1); // We only expect fc to have the gradient perpendicular to the face const Real* dx = geom.CellSize(); const Real* problo = geom.ProbLo(); @@ -111,9 +113,9 @@ namespace BoxLib #if (BL_SPACEDIM == 3) zbx.loVect(), zbx.hiVect(), #endif - D_DECL(BL_TO_FORTRAN(fc[0][mfi]), - BL_TO_FORTRAN(fc[1][mfi]), - BL_TO_FORTRAN(fc[2][mfi])), + D_DECL(BL_TO_FORTRAN((*fc[0])[mfi]), + BL_TO_FORTRAN((*fc[1])[mfi]), + BL_TO_FORTRAN((*fc[2])[mfi])), BL_TO_FORTRAN(cc[mfi]), dx, problo, coord_type); } @@ -124,13 +126,15 @@ namespace BoxLib // Average fine cell-based MultiFab onto crse cell-centered MultiFab. // We do NOT assume that the coarse layout is a coarsened version of the fine layout. // This version DOES use volume-weighting. - void average_down (MultiFab& S_fine, MultiFab& S_crse, const Geometry& fgeom, const Geometry& cgeom, + void average_down (const MultiFab& S_fine, MultiFab& S_crse, + const Geometry& fgeom, const Geometry& cgeom, int scomp, int ncomp, int rr) { average_down(S_fine,S_crse,fgeom,cgeom,scomp,ncomp,rr*IntVect::TheUnitVector()); } - void average_down (MultiFab& S_fine, MultiFab& S_crse, const Geometry& fgeom, const Geometry& cgeom, + void average_down (const MultiFab& S_fine, MultiFab& S_crse, + const Geometry& fgeom, const Geometry& cgeom, int scomp, int ncomp, const IntVect& ratio) { @@ -186,12 +190,12 @@ namespace BoxLib // Average fine cell-based MultiFab onto crse cell-centered MultiFab. // We do NOT assume that the coarse layout is a coarsened version of the fine layout. // This version does NOT use volume-weighting - void average_down (MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp, int rr) + void average_down (const MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp, int rr) { average_down(S_fine,S_crse,scomp,ncomp,rr*IntVect::TheUnitVector()); } - void average_down (MultiFab& S_fine, MultiFab& S_crse, + void average_down (const MultiFab& S_fine, MultiFab& S_crse, int scomp, int ncomp, const IntVect& ratio) { BL_ASSERT(S_crse.nComp() == S_fine.nComp()); @@ -229,26 +233,27 @@ namespace BoxLib // Average fine face-based MultiFab onto crse fine-centered MultiFab. // This routine assumes that the crse BoxArray is a coarsened version of the fine BoxArray. - void average_down_faces (PArray& fine, PArray& crse, IntVect& ratio) + void average_down_faces (const Array& fine, const Array& crse, + const IntVect& ratio) { BL_ASSERT(crse.size() == BL_SPACEDIM); BL_ASSERT(fine.size() == BL_SPACEDIM); - BL_ASSERT(crse[0].nComp() == fine[0].nComp()); + BL_ASSERT(crse[0]->nComp() == fine[0]->nComp()); - int ncomp = crse[0].nComp(); + int ncomp = crse[0]->nComp(); #ifdef _OPENMP #pragma omp parallel #endif for (int n=0; n +#include BL_FORT_PROC_DECL(BL_AVG_EG_TO_CC, bl_avg_eg_to_cc) (const int* lo, const int* hi, @@ -34,21 +34,21 @@ BL_FORT_PROC_DECL(BL_AVG_CC_TO_FC, bl_avg_cc_to_fc) BL_FORT_PROC_DECL(BL_AVGDOWN_FACES, bl_avgdown_faces) (const int* lo, const int* hi, - BL_FORT_FAB_ARG(fine), + const BL_FORT_FAB_ARG(fine), BL_FORT_FAB_ARG(crse), const int* ratio, const int& n, const int& ncomp); BL_FORT_PROC_DECL(BL_AVGDOWN, bl_avgdown) (const int* ovlp_lo, const int* ovlp_hi, - BL_FORT_FAB_ARG(fine), + const BL_FORT_FAB_ARG(fine), BL_FORT_FAB_ARG(crse), const int* ratio, const int* ncomp); BL_FORT_PROC_DECL(BL_AVGDOWN_WITH_VOL, bl_avgdown_with_vol) (const int* ovlp_lo, const int* ovlp_hi, - BL_FORT_FAB_ARG(fine), + const BL_FORT_FAB_ARG(fine), BL_FORT_FAB_ARG(crse), - BL_FORT_FAB_ARG(fvolume), + const BL_FORT_FAB_ARG(fvolume), const int* ratio, const int* ncomp); #endif diff --git a/Src/C_BaseLib/NFiles.H b/Src/Base/AMReX_NFiles.H similarity index 98% rename from Src/C_BaseLib/NFiles.H rename to Src/Base/AMReX_NFiles.H index f0af8e997..28b6ae31a 100644 --- a/Src/C_BaseLib/NFiles.H +++ b/Src/Base/AMReX_NFiles.H @@ -5,8 +5,8 @@ #include #include -#include -#include +#include +#include // // This class encapsulates writing to nfiles. diff --git a/Src/C_BaseLib/NFiles.cpp b/Src/Base/AMReX_NFiles.cpp similarity index 99% rename from Src/C_BaseLib/NFiles.cpp rename to Src/Base/AMReX_NFiles.cpp index 60aa5be43..6b1053222 100644 --- a/Src/C_BaseLib/NFiles.cpp +++ b/Src/Base/AMReX_NFiles.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include #include diff --git a/Src/C_BaseLib/Orientation.H b/Src/Base/AMReX_Orientation.H similarity index 98% rename from Src/C_BaseLib/Orientation.H rename to Src/Base/AMReX_Orientation.H index 5b45585d1..64e82ad34 100644 --- a/Src/C_BaseLib/Orientation.H +++ b/Src/Base/AMReX_Orientation.H @@ -4,8 +4,8 @@ #include -#include -#include +#include +#include class OrientationIter; diff --git a/Src/C_BaseLib/Orientation.cpp b/Src/Base/AMReX_Orientation.cpp similarity index 92% rename from Src/C_BaseLib/Orientation.cpp rename to Src/Base/AMReX_Orientation.cpp index bcb458c75..5ad18323e 100644 --- a/Src/C_BaseLib/Orientation.cpp +++ b/Src/Base/AMReX_Orientation.cpp @@ -1,8 +1,8 @@ #include -#include -#include +#include +#include std::ostream& operator<< (std::ostream& os, diff --git a/Src/C_BaseLib/PList.H b/Src/Base/AMReX_PList.H similarity index 100% rename from Src/C_BaseLib/PList.H rename to Src/Base/AMReX_PList.H diff --git a/Src/C_BaseLib/ParallelDescriptor.H b/Src/Base/AMReX_ParallelDescriptor.H similarity index 99% rename from Src/C_BaseLib/ParallelDescriptor.H rename to Src/Base/AMReX_ParallelDescriptor.H index a482f7fb1..722ce2496 100644 --- a/Src/C_BaseLib/ParallelDescriptor.H +++ b/Src/Base/AMReX_ParallelDescriptor.H @@ -1,14 +1,14 @@ #ifndef BL_PARALLELDESCRIPTOR_H #define BL_PARALLELDESCRIPTOR_H -#include -#include -#include -#include +#include +#include +#include +#include #ifndef BL_AMRPROF -#include +#include #endif -#include +#include #ifdef BL_USE_UPCXX #include @@ -23,7 +23,7 @@ #endif #ifdef BL_LAZY -#include +#include #endif #include diff --git a/Src/C_BaseLib/ParallelDescriptor.cpp b/Src/Base/AMReX_ParallelDescriptor.cpp similarity index 99% rename from Src/C_BaseLib/ParallelDescriptor.cpp rename to Src/Base/AMReX_ParallelDescriptor.cpp index 102e31029..d196ef51d 100644 --- a/Src/C_BaseLib/ParallelDescriptor.cpp +++ b/Src/Base/AMReX_ParallelDescriptor.cpp @@ -8,9 +8,9 @@ #include #include -#include -#include -#include +#include +#include +#include #ifdef BL_USE_FORTRAN_MPI extern "C" { @@ -30,7 +30,7 @@ extern "C" { #endif #ifndef BL_AMRPROF -#include +#include #endif #ifdef _OPENMP @@ -160,7 +160,7 @@ ParallelDescriptor::AddSignalHandler (PTR_TO_SIGNAL_HANDLER fp) #ifdef BL_USE_MPI -#include +#include namespace { @@ -2144,7 +2144,7 @@ ParallelDescriptor::SubSeqNum (int getsetinc, int newvalue) } -#include +#include BL_FORT_PROC_DECL(BL_PD_BARRIER,bl_pd_barrier)() { diff --git a/Src/C_BaseLib/ParmParse.H b/Src/Base/AMReX_ParmParse.H similarity index 100% rename from Src/C_BaseLib/ParmParse.H rename to Src/Base/AMReX_ParmParse.H diff --git a/Src/C_BaseLib/ParmParse.cpp b/Src/Base/AMReX_ParmParse.cpp similarity index 99% rename from Src/C_BaseLib/ParmParse.cpp rename to Src/Base/AMReX_ParmParse.cpp index 86ccf3467..b1a7a06c9 100644 --- a/Src/C_BaseLib/ParmParse.cpp +++ b/Src/Base/AMReX_ParmParse.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include @@ -12,11 +12,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include static bool finalize_verbose = true; @@ -1824,7 +1824,7 @@ ParmParse::Record::operator* () const // // FOrtran Interface routines // -#include +#include #include namespace diff --git a/Src/C_BaseLib/Periodicity.H b/Src/Base/AMReX_Periodicity.H similarity index 95% rename from Src/C_BaseLib/Periodicity.H rename to Src/Base/AMReX_Periodicity.H index 9775162fc..f27d029d7 100644 --- a/Src/C_BaseLib/Periodicity.H +++ b/Src/Base/AMReX_Periodicity.H @@ -1,8 +1,8 @@ #ifndef _PERIODICITY_H_ #define _PERIODICITY_H_ -#include -#include +#include +#include #include // This provides length of period for periodic domains. 0 means it is diff --git a/Src/C_BaseLib/Periodicity.cpp b/Src/Base/AMReX_Periodicity.cpp similarity index 97% rename from Src/C_BaseLib/Periodicity.cpp rename to Src/Base/AMReX_Periodicity.cpp index 3276d5621..74acc4430 100644 --- a/Src/C_BaseLib/Periodicity.cpp +++ b/Src/Base/AMReX_Periodicity.cpp @@ -1,6 +1,6 @@ #include -#include +#include std::vector Periodicity::shiftIntVect () const diff --git a/Src/C_BaseLib/PhysBCFunct.H b/Src/Base/AMReX_PhysBCFunct.H similarity index 94% rename from Src/C_BaseLib/PhysBCFunct.H rename to Src/Base/AMReX_PhysBCFunct.H index 8bf72d899..01c083a0c 100644 --- a/Src/C_BaseLib/PhysBCFunct.H +++ b/Src/Base/AMReX_PhysBCFunct.H @@ -1,11 +1,11 @@ #ifndef _PhysBCFunct_H_ #define _PhysBCFunct_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include extern "C" { diff --git a/Src/C_BaseLib/PhysBCFunct.cpp b/Src/Base/AMReX_PhysBCFunct.cpp similarity index 98% rename from Src/C_BaseLib/PhysBCFunct.cpp rename to Src/Base/AMReX_PhysBCFunct.cpp index 6c0624654..0106ceceb 100644 --- a/Src/C_BaseLib/PhysBCFunct.cpp +++ b/Src/Base/AMReX_PhysBCFunct.cpp @@ -1,5 +1,5 @@ -#include +#include BndryFunctBase::BndryFunctBase () : diff --git a/Src/C_BaseLib/PlotFileUtil.H b/Src/Base/AMReX_PlotFileUtil.H similarity index 90% rename from Src/C_BaseLib/PlotFileUtil.H rename to Src/Base/AMReX_PlotFileUtil.H index 99750db6b..f5add6143 100644 --- a/Src/C_BaseLib/PlotFileUtil.H +++ b/Src/Base/AMReX_PlotFileUtil.H @@ -3,8 +3,8 @@ #include -#include -#include +#include +#include namespace BoxLib { diff --git a/Src/C_BaseLib/PlotFileUtil.cpp b/Src/Base/AMReX_PlotFileUtil.cpp similarity index 98% rename from Src/C_BaseLib/PlotFileUtil.cpp rename to Src/Base/AMReX_PlotFileUtil.cpp index e98c6c9ed..edc729aa1 100644 --- a/Src/C_BaseLib/PlotFileUtil.cpp +++ b/Src/Base/AMReX_PlotFileUtil.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include static std::string LevelPath (int level) { diff --git a/Src/C_BaseLib/Pointers.H b/Src/Base/AMReX_Pointers.H similarity index 99% rename from Src/C_BaseLib/Pointers.H rename to Src/Base/AMReX_Pointers.H index 8fa6146a3..7015ee07b 100644 --- a/Src/C_BaseLib/Pointers.H +++ b/Src/Base/AMReX_Pointers.H @@ -2,9 +2,9 @@ #ifndef BL_POINTERS_H #define BL_POINTERS_H -#include -#include -#include +#include +#include +#include /* A Smart Pointer for Intrinsic or User-Defined Types diff --git a/Src/C_BaseLib/REAL.H b/Src/Base/AMReX_REAL.H similarity index 100% rename from Src/C_BaseLib/REAL.H rename to Src/Base/AMReX_REAL.H diff --git a/Src/C_BaseLib/RealBox.H b/Src/Base/AMReX_RealBox.H similarity index 97% rename from Src/C_BaseLib/RealBox.H rename to Src/Base/AMReX_RealBox.H index fcc7c00ec..a1a3d75ed 100644 --- a/Src/C_BaseLib/RealBox.H +++ b/Src/Base/AMReX_RealBox.H @@ -4,9 +4,9 @@ #include -#include -#include -#include +#include +#include +#include // // A Real Box diff --git a/Src/C_BaseLib/RealBox.cpp b/Src/Base/AMReX_RealBox.cpp similarity index 98% rename from Src/C_BaseLib/RealBox.cpp rename to Src/Base/AMReX_RealBox.cpp index facb22858..b0c03fe20 100644 --- a/Src/C_BaseLib/RealBox.cpp +++ b/Src/Base/AMReX_RealBox.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include // // The definition of lone static data member. // diff --git a/Src/C_BaseLib/SPACE.H b/Src/Base/AMReX_SPACE.H similarity index 100% rename from Src/C_BaseLib/SPACE.H rename to Src/Base/AMReX_SPACE.H diff --git a/Src/C_BaseLib/SPACE_F.H b/Src/Base/AMReX_SPACE_F.H similarity index 97% rename from Src/C_BaseLib/SPACE_F.H rename to Src/Base/AMReX_SPACE_F.H index d943362a7..b53266843 100644 --- a/Src/C_BaseLib/SPACE_F.H +++ b/Src/Base/AMReX_SPACE_F.H @@ -2,7 +2,7 @@ #ifndef BL_SPACE_F_H #define BL_SPACE_F_H -#include +#include #ifdef BL_LANG_FORT # if (BL_SPACEDIM == 1) diff --git a/Src/C_BaseLib/TinyProfiler.H b/Src/Base/AMReX_TinyProfiler.H similarity index 98% rename from Src/C_BaseLib/TinyProfiler.H rename to Src/Base/AMReX_TinyProfiler.H index 1ee792f28..58c870e6a 100644 --- a/Src/C_BaseLib/TinyProfiler.H +++ b/Src/Base/AMReX_TinyProfiler.H @@ -7,7 +7,7 @@ #include #include -#include +#include class TinyProfiler { diff --git a/Src/C_BaseLib/TinyProfiler.cpp b/Src/Base/AMReX_TinyProfiler.cpp similarity index 98% rename from Src/C_BaseLib/TinyProfiler.cpp rename to Src/Base/AMReX_TinyProfiler.cpp index 8caea4923..26417c30a 100644 --- a/Src/C_BaseLib/TinyProfiler.cpp +++ b/Src/Base/AMReX_TinyProfiler.cpp @@ -7,9 +7,9 @@ #include #include -#include -#include -#include +#include +#include +#include #ifdef _OPENMP #include diff --git a/Src/C_BaseLib/Tuple.H b/Src/Base/AMReX_Tuple.H similarity index 98% rename from Src/C_BaseLib/Tuple.H rename to Src/Base/AMReX_Tuple.H index 082719773..48b029301 100644 --- a/Src/C_BaseLib/Tuple.H +++ b/Src/Base/AMReX_Tuple.H @@ -4,7 +4,7 @@ #include -#include +#include // // Ordered Tuples for Types T diff --git a/Src/C_BaseLib/UseCount.H b/Src/Base/AMReX_UseCount.H similarity index 95% rename from Src/C_BaseLib/UseCount.H rename to Src/Base/AMReX_UseCount.H index c8d1f69ac..7954fd1e9 100644 --- a/Src/C_BaseLib/UseCount.H +++ b/Src/Base/AMReX_UseCount.H @@ -2,8 +2,8 @@ #ifndef BL_USECOUNT_H #define BL_USECOUNT_H -#include -#include +#include +#include // // A Class Encapsulating Reference Counts diff --git a/Src/C_BaseLib/UseCount.cpp b/Src/Base/AMReX_UseCount.cpp similarity index 94% rename from Src/C_BaseLib/UseCount.cpp rename to Src/Base/AMReX_UseCount.cpp index 9d85cda13..510291cd0 100644 --- a/Src/C_BaseLib/UseCount.cpp +++ b/Src/Base/AMReX_UseCount.cpp @@ -1,5 +1,5 @@ -#include +#include UseCount::UseCount () : diff --git a/Src/C_BaseLib/Utility.H b/Src/Base/AMReX_Utility.H similarity index 98% rename from Src/C_BaseLib/Utility.H rename to Src/Base/AMReX_Utility.H index 9a4027a7f..d555a0921 100644 --- a/Src/C_BaseLib/Utility.H +++ b/Src/Base/AMReX_Utility.H @@ -2,7 +2,7 @@ #ifndef BL_UTILITY_H #define BL_UTILITY_H -#include +#include #include #include @@ -16,13 +16,13 @@ #endif #endif -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // // Useful C++ Utility Functions diff --git a/Src/C_BaseLib/Utility.cpp b/Src/Base/AMReX_Utility.cpp similarity index 99% rename from Src/C_BaseLib/Utility.cpp rename to Src/Base/AMReX_Utility.cpp index d862b2ce2..77533c4e4 100644 --- a/Src/C_BaseLib/Utility.cpp +++ b/Src/Base/AMReX_Utility.cpp @@ -14,15 +14,15 @@ #include #include -#include -#include -#include -#include -#include -#include - -#include -#include +#include +#include +#include +#include +#include +#include + +#include +#include #ifdef _OPENMP #include diff --git a/Src/C_BaseLib/VisMF.H b/Src/Base/AMReX_VisMF.H similarity index 99% rename from Src/C_BaseLib/VisMF.H rename to Src/Base/AMReX_VisMF.H index ecab8279f..8c09a7fd1 100644 --- a/Src/C_BaseLib/VisMF.H +++ b/Src/Base/AMReX_VisMF.H @@ -6,10 +6,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class NFilesIter; diff --git a/Src/C_BaseLib/VisMF.cpp b/Src/Base/AMReX_VisMF.cpp similarity index 99% rename from Src/C_BaseLib/VisMF.cpp rename to Src/Base/AMReX_VisMF.cpp index c5d879656..162598098 100644 --- a/Src/C_BaseLib/VisMF.cpp +++ b/Src/Base/AMReX_VisMF.cpp @@ -1,6 +1,6 @@ // TODO: need to work on read for upc++ -#include +#include #include #include #include @@ -14,12 +14,12 @@ #define pubsetbuf setbuf #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static const char *TheMultiFabHdrFileSuffix = "_H"; static const char *FabFileSuffix = "_D_"; diff --git a/Src/C_BaseLib/bc_types.fi b/Src/Base/AMReX_bc_types.fi similarity index 100% rename from Src/C_BaseLib/bc_types.fi rename to Src/Base/AMReX_bc_types.fi diff --git a/Src/C_BaseLib/bl_flush.f b/Src/Base/AMReX_bl_flush.f similarity index 100% rename from Src/C_BaseLib/bl_flush.f rename to Src/Base/AMReX_bl_flush.f diff --git a/Src/C_BaseLib/bl_fort_module.F90 b/Src/Base/AMReX_bl_fort_module.F90 similarity index 100% rename from Src/C_BaseLib/bl_fort_module.F90 rename to Src/Base/AMReX_bl_fort_module.F90 diff --git a/Src/C_BaseLib/ccse-mpi.H b/Src/Base/AMReX_ccse-mpi.H similarity index 98% rename from Src/C_BaseLib/ccse-mpi.H rename to Src/Base/AMReX_ccse-mpi.H index b096194bf..13f517955 100644 --- a/Src/C_BaseLib/ccse-mpi.H +++ b/Src/Base/AMReX_ccse-mpi.H @@ -9,7 +9,7 @@ // #ifdef BL_USE_MPI -#include +#include #include diff --git a/Src/C_BaseLib/iMultiFab.H b/Src/Base/AMReX_iMultiFab.H similarity index 99% rename from Src/C_BaseLib/iMultiFab.H rename to Src/Base/AMReX_iMultiFab.H index dc3ed1736..7ad0f5817 100644 --- a/Src/C_BaseLib/iMultiFab.H +++ b/Src/Base/AMReX_iMultiFab.H @@ -2,10 +2,10 @@ #ifndef BL_IMULTIFAB_H #define BL_IMULTIFAB_H -#include -#include -#include -#include +#include +#include +#include +#include // // A Collection of IArrayBoxes diff --git a/Src/C_BaseLib/iMultiFab.cpp b/Src/Base/AMReX_iMultiFab.cpp similarity index 99% rename from Src/C_BaseLib/iMultiFab.cpp rename to Src/Base/AMReX_iMultiFab.cpp index 486947b0e..81de028f3 100644 --- a/Src/C_BaseLib/iMultiFab.cpp +++ b/Src/Base/AMReX_iMultiFab.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include @@ -7,12 +7,11 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace { diff --git a/Src/C_BaseLib/mempool_f.f90 b/Src/Base/AMReX_mempool_f.f90 similarity index 100% rename from Src/C_BaseLib/mempool_f.f90 rename to Src/Base/AMReX_mempool_f.f90 diff --git a/Src/C_BaseLib/threadbox.f90 b/Src/Base/AMReX_threadbox.f90 similarity index 100% rename from Src/C_BaseLib/threadbox.f90 rename to Src/Base/AMReX_threadbox.f90 diff --git a/Src/C_BaseLib/winstd.H b/Src/Base/AMReX_winstd.H similarity index 100% rename from Src/C_BaseLib/winstd.H rename to Src/Base/AMReX_winstd.H diff --git a/Src/C_BaseLib/CMakeLists.txt b/Src/Base/CMakeLists.txt similarity index 50% rename from Src/C_BaseLib/CMakeLists.txt rename to Src/Base/CMakeLists.txt index a40b208b8..6cbe73bc5 100644 --- a/Src/C_BaseLib/CMakeLists.txt +++ b/Src/Base/CMakeLists.txt @@ -13,17 +13,17 @@ project(CBOXLIB) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files Arena.cpp BArena.cpp BaseFab.cpp BCRec.cpp BLBackTrace.cpp BoxArray.cpp Box.cpp BoxDomain.cpp BoxLib.cpp BoxList.cpp CArena.cpp CoordSys.cpp DistributionMapping.cpp FabArray.cpp FabConv.cpp FArrayBox.cpp FPC.cpp Geometry.cpp MultiFabUtil.cpp IArrayBox.cpp IndexType.cpp IntVect.cpp iMultiFab.cpp MemPool.cpp MultiFab.cpp NFiles.cpp Orientation.cpp ParallelDescriptor.cpp ParmParse.cpp Periodicity.cpp PhysBCFunct.cpp PlotFileUtil.cpp RealBox.cpp UseCount.cpp Utility.cpp VisMF.cpp) +set(CXX_source_files AMReX_Arena.cpp AMReX_BArena.cpp AMReX_BaseFab.cpp AMReX_BCRec.cpp AMReX_BLBackTrace.cpp AMReX_BoxArray.cpp AMReX_Box.cpp AMReX_BoxDomain.cpp AMReX_BoxLib.cpp AMReX_BoxList.cpp AMReX_CArena.cpp AMReX_CoordSys.cpp AMReX_DistributionMapping.cpp AMReX_FabArray.cpp AMReX_FabConv.cpp AMReX_FArrayBox.cpp AMReX_FPC.cpp AMReX_Geometry.cpp AMReX_MultiFabUtil.cpp AMReX_IArrayBox.cpp AMReX_IndexType.cpp AMReX_IntVect.cpp AMReX_iMultiFab.cpp AMReX_MemPool.cpp AMReX_MultiFab.cpp AMReX_NFiles.cpp AMReX_Orientation.cpp AMReX_ParallelDescriptor.cpp AMReX_ParmParse.cpp AMReX_Periodicity.cpp AMReX_PhysBCFunct.cpp AMReX_PlotFileUtil.cpp AMReX_RealBox.cpp AMReX_UseCount.cpp AMReX_Utility.cpp AMReX_VisMF.cpp) -set(F77_source_files BLBoxLib_F.f bl_flush.f BLParmParse_F.f BLutil_F.f) -set(FPP_source_files COORDSYS_${BL_SPACEDIM}D.F FILCC_${BL_SPACEDIM}D.F) -set(F90PP_source_files bl_fort_module.F90) -set(F90_source_files mempool_f.f90 threadbox.f90 MultiFabUtil_${BL_SPACEDIM}d.f90 BaseFab_nd.f90) +set(F77_source_files AMReX_BLBoxLib_F.f AMReX_bl_flush.f AMReX_BLParmParse_F.f AMReX_BLutil_F.f) +set(FPP_source_files AMReX_COORDSYS_${BL_SPACEDIM}D.F AMReX_FILCC_${BL_SPACEDIM}D.F) +set(F90PP_source_files AMReX_bl_fort_module.F90) +set(F90_source_files AMReX_mempool_f.f90 AMReX_threadbox.f90 AMReX_MultiFabUtil_${BL_SPACEDIM}d.f90 AMReX_BaseFab_nd.f90) -set(CXX_header_files Arena.H Array.H ArrayLim.H BArena.H BaseFab.H BCRec.H BC_TYPES.H BLassert.H BLBackTrace.H BLFort.H BLProfiler.H BoxArray.H BoxDomain.H Box.H BoxLib.H BoxList.H CArena.H ccse-mpi.H CONSTANTS.H CoordSys.H DistributionMapping.H FabArray.H FabConv.H FArrayBox.H FPC.H Geometry.H MultiFabUtil.H IArrayBox.H IndexType.H IntVect.H Looping.H iMultiFab.H MemPool.H MultiFab.H NFiles.H Orientation.H ParallelDescriptor.H ParmParse.H PArray.H Periodicity.H PList.H PlotFileUtil.H Pointers.H RealBox.H REAL.H SPACE.H Tuple.H UseCount.H Utility.H VisMF.H winstd.H PhysBCFunct.H) +set(CXX_header_files AMReX_Arena.H AMReX_Array.H AMReX_ArrayLim.H AMReX_BArena.H AMReX_BaseFab.H AMReX_BCRec.H AMReX_BC_TYPES.H AMReX_BLassert.H AMReX_BLBackTrace.H AMReX_BLFort.H AMReX_BLProfiler.H AMReX_BoxArray.H AMReX_BoxDomain.H AMReX_Box.H AMReX_BoxLib.H AMReX_BoxList.H AMReX_CArena.H AMReX_ccse-mpi.H AMReX_CONSTANTS.H AMReX_CoordSys.H AMReX_DistributionMapping.H AMReX_FabArray.H AMReX_FabConv.H AMReX_FArrayBox.H AMReX_FPC.H AMReX_Geometry.H AMReX_MultiFabUtil.H AMReX_IArrayBox.H AMReX_IndexType.H AMReX_IntVect.H AMReX_Looping.H AMReX_iMultiFab.H AMReX_MemPool.H AMReX_MultiFab.H AMReX_NFiles.H AMReX_Orientation.H AMReX_ParallelDescriptor.H AMReX_ParmParse.H AMReX_PArray.H AMReX_Periodicity.H AMReX_PList.H AMReX_PlotFileUtil.H AMReX_Pointers.H AMReX_RealBox.H AMReX_REAL.H AMReX_SPACE.H AMReX_Tuple.H AMReX_UseCount.H AMReX_Utility.H AMReX_VisMF.H AMReX_winstd.H AMReX_PhysBCFunct.H) -set(F77_header_files bc_types.fi) -set(FPP_header_files COORDSYS_F.H SPACE_F.H BaseFab_f.H) +set(F77_header_files AMReX_bc_types.fi) +set(FPP_header_files AMReX_COORDSYS_F.H AMReX_SPACE_F.H AMReX_BaseFab_f.H) set(F90_header_files) preprocess_boxlib_fortran(FPP_out_files ${FPP_source_files}) diff --git a/Src/C_BaseLib/GNUmakefile b/Src/Base/GNUmakefile similarity index 96% rename from Src/C_BaseLib/GNUmakefile rename to Src/Base/GNUmakefile index 4c54ece56..db144546d 100644 --- a/Src/C_BaseLib/GNUmakefile +++ b/Src/Base/GNUmakefile @@ -79,11 +79,7 @@ ifeq ($(BL_MANGLE_SYMBOLS_WITH_DIM),TRUE) endif endif -include $(TOP)/Tools/C_mk/Make.defs ./Make.package - -ifeq ($(KCC_VERSION),3.3) -CXXFLAGS += --one_instantiation_per_object -endif +include $(TOP)/Tools/GNUMake/Make.defs ./Make.package all: $(optionsLib) # @@ -93,7 +89,7 @@ all: $(optionsLib) # install: all -include $(TOP)/Tools/C_mk/Make.rules +include $(TOP)/Tools/GNUMake/Make.rules # # Temp stuff for doing html docs. diff --git a/Src/Base/GPackage.mak b/Src/Base/GPackage.mak new file mode 100644 index 000000000..b9d21a16a --- /dev/null +++ b/Src/Base/GPackage.mak @@ -0,0 +1,5 @@ +cxxsources += AMReX_MemPool.cpp +cxxsources += AMReX_CArena.cpp +cxxsources += AMReX_Arena.cpp + +f90sources += AMReX_mempool_f.f90 diff --git a/Src/Base/Make.package b/Src/Base/Make.package new file mode 100644 index 000000000..00b36e01d --- /dev/null +++ b/Src/Base/Make.package @@ -0,0 +1,163 @@ + +BOXLIB_BASE=EXE +ifeq ($(LBASE),box) + BOXLIB_BASE=LIB +endif + +# +# Utility classes. +# +C$(BOXLIB_BASE)_headers += AMReX_BoxLib.H +C$(BOXLIB_BASE)_sources += AMReX_BoxLib.cpp + +C$(BOXLIB_BASE)_sources += AMReX_ParmParse.cpp AMReX_Utility.cpp +C$(BOXLIB_BASE)_headers += AMReX_ParmParse.H AMReX_Utility.H AMReX_BLassert.H AMReX_ArrayLim.H + +C$(BOXLIB_BASE)_headers += AMReX_REAL.H AMReX_CONSTANTS.H AMReX_SPACE.H AMReX_SPACE_F.H + +C$(BOXLIB_BASE)_sources += AMReX_UseCount.cpp +C$(BOXLIB_BASE)_headers += AMReX_UseCount.H + +C$(BOXLIB_BASE)_sources += AMReX_DistributionMapping.cpp AMReX_ParallelDescriptor.cpp +C$(BOXLIB_BASE)_headers += AMReX_DistributionMapping.H AMReX_ParallelDescriptor.H + +C$(BOXLIB_BASE)_sources += AMReX_VisMF.cpp AMReX_Arena.cpp AMReX_BArena.cpp AMReX_CArena.cpp +C$(BOXLIB_BASE)_headers += AMReX_VisMF.H AMReX_Arena.H AMReX_BArena.H AMReX_CArena.H + +C$(BOXLIB_BASE)_headers += AMReX_BLProfiler.H + +C$(BOXLIB_BASE)_headers += AMReX_BLBackTrace.H + +C$(BOXLIB_BASE)_headers += AMReX_BLFort.H + +C$(BOXLIB_BASE)_sources += AMReX_NFiles.cpp +C$(BOXLIB_BASE)_headers += AMReX_NFiles.H + +# +# FAB I/O stuff. +# +C${BOXLIB_BASE}_headers += AMReX_FabConv.H AMReX_FPC.H +C${BOXLIB_BASE}_sources += AMReX_FabConv.cpp AMReX_FPC.cpp + +# +# Index space. +# +C$(BOXLIB_BASE)_sources += AMReX_Box.cpp AMReX_IntVect.cpp AMReX_IndexType.cpp AMReX_Orientation.cpp AMReX_Periodicity.cpp +C$(BOXLIB_BASE)_headers += AMReX_Box.H AMReX_IntVect.H AMReX_IndexType.H AMReX_Orientation.H AMReX_Periodicity.H + +# +# Real space. +# +C$(BOXLIB_BASE)_sources += AMReX_RealBox.cpp +C$(BOXLIB_BASE)_headers += AMReX_RealBox.H + +# +# Unions of rectangles. +# +C$(BOXLIB_BASE)_sources += AMReX_BoxList.cpp AMReX_BoxArray.cpp AMReX_BoxDomain.cpp +C$(BOXLIB_BASE)_headers += AMReX_BoxList.H AMReX_BoxArray.H AMReX_BoxDomain.H + +# +# FORTRAN array data. +# +C$(BOXLIB_BASE)_sources += AMReX_FArrayBox.cpp +C$(BOXLIB_BASE)_headers += AMReX_FArrayBox.H + +C$(BOXLIB_BASE)_sources += AMReX_IArrayBox.cpp +C$(BOXLIB_BASE)_headers += AMReX_IArrayBox.H + +C$(BOXLIB_BASE)_headers += AMReX_Looping.H + +C$(BOXLIB_BASE)_sources += AMReX_BaseFab.cpp + +# +# FORTRAN data defined on unions of rectangles. +# +C$(BOXLIB_BASE)_sources += AMReX_MultiFab.cpp +C$(BOXLIB_BASE)_headers += AMReX_MultiFab.H + +C$(BOXLIB_BASE)_sources += AMReX_iMultiFab.cpp +C$(BOXLIB_BASE)_headers += AMReX_iMultiFab.H + +C$(BOXLIB_BASE)_sources += AMReX_FabArray.cpp + +# +# Geometry / Coordinate system routines. +# +ifneq ($(BL_NO_FORT),TRUE) + C$(BOXLIB_BASE)_sources += AMReX_CoordSys.cpp AMReX_Geometry.cpp AMReX_MultiFabUtil.cpp + C$(BOXLIB_BASE)_headers += AMReX_CoordSys.H AMReX_Geometry.H AMReX_MultiFabUtil.H +endif + +# +# Boundary-related +# +C$(BOXLIB_BASE)_sources += AMReX_BCRec.cpp AMReX_PhysBCFunct.cpp +C$(BOXLIB_BASE)_headers += AMReX_BCRec.H AMReX_PhysBCFunct.H +C$(BOXLIB_BASE)_headers += AMReX_BC_TYPES.H + +# +# Plotfile +# +C$(BOXLIB_BASE)_sources += AMReX_PlotFileUtil.cpp +C$(BOXLIB_BASE)_headers += AMReX_PlotFileUtil.H + +# +# Fortran interface routines. +# +ifneq ($(BL_NO_FORT),TRUE) + F$(BOXLIB_BASE)_sources += AMReX_COORDSYS_$(DIM)D.F + F$(BOXLIB_BASE)_headers += AMReX_COORDSYS_F.H + F$(BOXLIB_BASE)_sources += AMReX_FILCC_${DIM}D.F + + f$(BOXLIB_BASE)_sources += AMReX_BLutil_F.f + f$(BOXLIB_BASE)_sources += AMReX_BLParmParse_F.f + f$(BOXLIB_BASE)_sources += AMReX_BLBoxLib_F.f + f$(BOXLIB_BASE)_sources += AMReX_BLProfiler_F.f + + f90$(BOXLIB_BASE)_sources += AMReX_BaseFab_nd.f90 + f90(BOXLIB_BASE)_headers += AMReX_BaseFab_f.H + + f90$(BOXLIB_BASE)_sources += AMReX_threadbox.f90 + + f90$(BOXLIB_BASE)_sources += AMReX_MultiFabUtil_$(DIM)d.f90 + + F90$(BOXLIB_BASE)_sources += AMReX_bl_fort_module.F90 +endif + +C$(BOXLIB_BASE)_sources += AMReX_BLProfiler.cpp +C$(BOXLIB_BASE)_sources += AMReX_BLBackTrace.cpp + +ifeq ($(LAZY),TRUE) + C$(BOXLIB_BASE)_sources += AMReX_Lazy.cpp + C$(BOXLIB_BASE)_headers += AMReX_Lazy.H +endif + +# Memory pool +C$(BOXLIB_BASE)_headers += AMReX_MemPool.H +C$(BOXLIB_BASE)_sources += AMReX_MemPool.cpp +ifneq ($(BL_NO_FORT),TRUE) + f90$(BOXLIB_BASE)_sources += AMReX_mempool_f.f90 +endif + +# UPCXX +ifeq ($(USE_UPCXX),TRUE) + C$(BOXLIB_BASE)_sources += AMReX_BLPgas.cpp + C$(BOXLIB_BASE)_headers += AMReX_BLPgas.H +endif + +# Memory Profiler +ifeq ($(MEM_PROFILE),TRUE) + C$(BOXLIB_BASE)_sources += AMReX_MemProfiler.cpp + C$(BOXLIB_BASE)_headers += AMReX_MemProfiler.H +endif + +# Basic Profiler +ifeq ($(TINY_PROFILE),TRUE) + C$(BOXLIB_BASE)_headers += AMReX_TinyProfiler.H + C$(BOXLIB_BASE)_sources += AMReX_TinyProfiler.cpp +endif + +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Base +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base + diff --git a/Src/C_BaseLib/OpenSource.txt b/Src/Base/OpenSource.txt similarity index 100% rename from Src/C_BaseLib/OpenSource.txt rename to Src/Base/OpenSource.txt diff --git a/Src/C_BoundaryLib/BndryData.H b/Src/Boundary/AMReX_BndryData.H similarity index 94% rename from Src/C_BoundaryLib/BndryData.H rename to Src/Boundary/AMReX_BndryData.H index a6ffd26e1..9cc60104e 100644 --- a/Src/C_BoundaryLib/BndryData.H +++ b/Src/Boundary/AMReX_BndryData.H @@ -2,16 +2,17 @@ #ifndef _BNDRYDATA_H_ #define _BNDRYDATA_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include // @@ -91,7 +92,7 @@ public: const Geometry& geom, ParallelDescriptor::Color color = ParallelDescriptor::DefaultColor()); // - const MultiMask& bndryMasks (Orientation face) const { return masks[face]; } + const MultiMask& bndryMasks (Orientation face) const { return *masks[face]; } // // Return FabSet on given face. // @@ -186,7 +187,7 @@ protected: // // Boundary condition mask // - PArray masks; + Array> masks; // // Domain used for mask definitions. // diff --git a/Src/C_BoundaryLib/BndryData.cpp b/Src/Boundary/AMReX_BndryData.cpp similarity index 88% rename from Src/C_BoundaryLib/BndryData.cpp rename to Src/Boundary/AMReX_BndryData.cpp index a9a9b5eb2..f36a3b080 100644 --- a/Src/C_BoundaryLib/BndryData.cpp +++ b/Src/Boundary/AMReX_BndryData.cpp @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // // Mask info required for this many cells past grid edge @@ -70,12 +70,12 @@ BndryData::init (const BndryData& src) bcond = src.bcond; masks.clear(); - masks.resize(2*BL_SPACEDIM, PArrayManage); + masks.resize(2*BL_SPACEDIM); for (int i = 0; i < 2*BL_SPACEDIM; i++) { - const MultiMask& smasks = src.masks[i]; - masks.set(i, new MultiMask(smasks.boxArray(), smasks.DistributionMap(), smasks.nComp())); - MultiMask::Copy(masks[i], smasks); + const MultiMask& smasks = *src.masks[i]; + masks[i].reset(new MultiMask(smasks.boxArray(), smasks.DistributionMap(), smasks.nComp())); + MultiMask::Copy(*masks[i], smasks); } } @@ -131,16 +131,14 @@ BndryData::define (const BoxArray& _grids, BndryRegister::setBoxes(_grids); masks.clear(); - masks.resize(2*BL_SPACEDIM, PArrayManage); + masks.resize(2*BL_SPACEDIM); for (OrientationIter fi; fi; ++fi) { Orientation face = fi(); - BndryRegister::define(face,IndexType::TheCellType(),0,1,1,_ncomp,color); - - masks.set(face, new MultiMask(grids, bndry[face].DistributionMap(), geom, - face, 0, 2, NTangHalfWidth, 1, true)); + masks[face].reset(new MultiMask(grids, bndry[face].DistributionMap(), + geom, face, 0, 2, NTangHalfWidth, 1, true)); } // // Define "bcond" and "bcloc". diff --git a/Src/C_BoundaryLib/BndryRegister.H b/Src/Boundary/AMReX_BndryRegister.H similarity index 99% rename from Src/C_BoundaryLib/BndryRegister.H rename to Src/Boundary/AMReX_BndryRegister.H index 2072fbe93..1389e1aec 100644 --- a/Src/C_BoundaryLib/BndryRegister.H +++ b/Src/Boundary/AMReX_BndryRegister.H @@ -2,8 +2,8 @@ #ifndef _BNDRYREGISTER_H_ #define _BNDRYREGISTER_H_ -#include -#include +#include +#include class Orientation; diff --git a/Src/C_BoundaryLib/BndryRegister.cpp b/Src/Boundary/AMReX_BndryRegister.cpp similarity index 98% rename from Src/C_BoundaryLib/BndryRegister.cpp rename to Src/Boundary/AMReX_BndryRegister.cpp index 4e6087b34..17bb22e97 100644 --- a/Src/C_BoundaryLib/BndryRegister.cpp +++ b/Src/Boundary/AMReX_BndryRegister.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include namespace { diff --git a/Src/C_BoundaryLib/BoundCond.H b/Src/Boundary/AMReX_BoundCond.H similarity index 97% rename from Src/C_BoundaryLib/BoundCond.H rename to Src/Boundary/AMReX_BoundCond.H index d5358a647..8201cf534 100644 --- a/Src/C_BoundaryLib/BoundCond.H +++ b/Src/Boundary/AMReX_BoundCond.H @@ -2,7 +2,7 @@ #ifndef _BOUNDCOND_H_ #define _BOUNDCOND_H_ -#include +#include /* Maintain an identifier for boundary condition types. diff --git a/Src/C_BoundaryLib/FabSet.H b/Src/Boundary/AMReX_FabSet.H similarity index 98% rename from Src/C_BoundaryLib/FabSet.H rename to Src/Boundary/AMReX_FabSet.H index 95080f11c..ae2ebb860 100644 --- a/Src/C_BoundaryLib/FabSet.H +++ b/Src/Boundary/AMReX_FabSet.H @@ -2,8 +2,8 @@ #ifndef _FABSET_H_ #define _FABSET_H_ -#include -#include +#include +#include /* A FabSet is a group of FArrayBox's. The grouping is designed diff --git a/Src/C_BoundaryLib/FabSet.cpp b/Src/Boundary/AMReX_FabSet.cpp similarity index 97% rename from Src/C_BoundaryLib/FabSet.cpp rename to Src/Boundary/AMReX_FabSet.cpp index 821495318..5c9df4cc5 100644 --- a/Src/C_BoundaryLib/FabSet.cpp +++ b/Src/Boundary/AMReX_FabSet.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include #ifdef _OPENMP #include diff --git a/Src/C_BoundaryLib/INTERPBNDRYDATA_1D.F b/Src/Boundary/AMReX_INTERPBNDRYDATA_1D.F similarity index 95% rename from Src/C_BoundaryLib/INTERPBNDRYDATA_1D.F rename to Src/Boundary/AMReX_INTERPBNDRYDATA_1D.F index d6132d946..d6429963d 100644 --- a/Src/C_BoundaryLib/INTERPBNDRYDATA_1D.F +++ b/Src/Boundary/AMReX_INTERPBNDRYDATA_1D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include "BC_TYPES.H" -#include "REAL.H" -#include "CONSTANTS.H" -#include "INTERPBNDRYDATA_F.H" -#include "ArrayLim.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_INTERPBNDRYDATA_F.H" +#include "AMReX_ArrayLim.H" #define USE_REORG_VERSION diff --git a/Src/C_BoundaryLib/INTERPBNDRYDATA_2D.F b/Src/Boundary/AMReX_INTERPBNDRYDATA_2D.F similarity index 99% rename from Src/C_BoundaryLib/INTERPBNDRYDATA_2D.F rename to Src/Boundary/AMReX_INTERPBNDRYDATA_2D.F index 502682eb5..9b0bb2a33 100644 --- a/Src/C_BoundaryLib/INTERPBNDRYDATA_2D.F +++ b/Src/Boundary/AMReX_INTERPBNDRYDATA_2D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "BC_TYPES.H" -#include "REAL.H" -#include "CONSTANTS.H" -#include "INTERPBNDRYDATA_F.H" -#include "ArrayLim.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_INTERPBNDRYDATA_F.H" +#include "AMReX_ArrayLim.H" #define USE_REORG_VERSION diff --git a/Src/C_BoundaryLib/INTERPBNDRYDATA_3D.F b/Src/Boundary/AMReX_INTERPBNDRYDATA_3D.F similarity index 99% rename from Src/C_BoundaryLib/INTERPBNDRYDATA_3D.F rename to Src/Boundary/AMReX_INTERPBNDRYDATA_3D.F index 9bb7a276b..c718bb9b8 100644 --- a/Src/C_BoundaryLib/INTERPBNDRYDATA_3D.F +++ b/Src/Boundary/AMReX_INTERPBNDRYDATA_3D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "BC_TYPES.H" -#include "REAL.H" -#include "CONSTANTS.H" -#include "INTERPBNDRYDATA_F.H" -#include "ArrayLim.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_INTERPBNDRYDATA_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 #define NUMDERIV 5 diff --git a/Src/C_BoundaryLib/INTERPBNDRYDATA_F.H b/Src/Boundary/AMReX_INTERPBNDRYDATA_F.H similarity index 98% rename from Src/C_BoundaryLib/INTERPBNDRYDATA_F.H rename to Src/Boundary/AMReX_INTERPBNDRYDATA_F.H index 26e8eb95b..f0e49ab39 100644 --- a/Src/C_BoundaryLib/INTERPBNDRYDATA_F.H +++ b/Src/Boundary/AMReX_INTERPBNDRYDATA_F.H @@ -49,7 +49,7 @@ # endif #endif -#include +#include typedef void BDInterpFunc(Real* bndr, ARLIM_P(blo), ARLIM_P(bhi), const int* lo, const int* hi, diff --git a/Src/C_BoundaryLib/InterpBndryData.H b/Src/Boundary/AMReX_InterpBndryData.H similarity index 95% rename from Src/C_BoundaryLib/InterpBndryData.H rename to Src/Boundary/AMReX_InterpBndryData.H index 1a2fd0834..cf8d99a65 100644 --- a/Src/C_BoundaryLib/InterpBndryData.H +++ b/Src/Boundary/AMReX_InterpBndryData.H @@ -2,13 +2,13 @@ #ifndef _INTERPBNDRYDATA_H_ #define _INTERPBNDRYDATA_H_ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include /* An InterpBndryData object adds to a BndryData object the ability to diff --git a/Src/C_BoundaryLib/InterpBndryData.cpp b/Src/Boundary/AMReX_InterpBndryData.cpp similarity index 97% rename from Src/C_BoundaryLib/InterpBndryData.cpp rename to Src/Boundary/AMReX_InterpBndryData.cpp index 217a6b829..b16da6f85 100644 --- a/Src/C_BoundaryLib/InterpBndryData.cpp +++ b/Src/Boundary/AMReX_InterpBndryData.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include #if (BL_SPACEDIM == 1) #define NUMDERIV 2 @@ -218,7 +218,7 @@ InterpBndryData::setBndryValues (::BndryRegister& crse, // Array derives(D_TERM(1,*mxlen,*mxlen)*NUMDERIV); - const Mask& mask = masks[face][fine_mfi]; + const Mask& mask = (*masks[face])[fine_mfi]; const int* mlo = mask.loVect(); const int* mhi = mask.hiVect(); const int* mdat = mask.dataPtr(); diff --git a/Src/C_BoundaryLib/LO_BCTYPES.H b/Src/Boundary/AMReX_LO_BCTYPES.H similarity index 100% rename from Src/C_BoundaryLib/LO_BCTYPES.H rename to Src/Boundary/AMReX_LO_BCTYPES.H diff --git a/Src/C_BoundaryLib/LO_UTIL.F b/Src/Boundary/AMReX_LO_UTIL.F similarity index 97% rename from Src/C_BoundaryLib/LO_UTIL.F rename to Src/Boundary/AMReX_LO_UTIL.F index b282c4354..8e10a81e2 100644 --- a/Src/C_BoundaryLib/LO_UTIL.F +++ b/Src/Boundary/AMReX_LO_UTIL.F @@ -11,8 +11,8 @@ #define zero 0.d0 #define one 1.d0 #else -#include -#include +#include +#include #endif diff --git a/Src/C_BoundaryLib/MacBndry.H b/Src/Boundary/AMReX_MacBndry.H similarity index 96% rename from Src/C_BoundaryLib/MacBndry.H rename to Src/Boundary/AMReX_MacBndry.H index 5bcbff2b8..b259d80fd 100644 --- a/Src/C_BoundaryLib/MacBndry.H +++ b/Src/Boundary/AMReX_MacBndry.H @@ -2,7 +2,7 @@ #ifndef _MACBNDRYDATA_H_ #define _MACBNDRYDATA_H_ -#include +#include class MacBndry : diff --git a/Src/C_BoundaryLib/MacBndry.cpp b/Src/Boundary/AMReX_MacBndry.cpp similarity index 96% rename from Src/C_BoundaryLib/MacBndry.cpp rename to Src/Boundary/AMReX_MacBndry.cpp index ee08fef0b..5748ee8a5 100644 --- a/Src/C_BoundaryLib/MacBndry.cpp +++ b/Src/Boundary/AMReX_MacBndry.cpp @@ -1,7 +1,7 @@ -#include -#include -#include +#include +#include +#include MacBndry::MacBndry () : diff --git a/Src/C_BoundaryLib/Mask.H b/Src/Boundary/AMReX_Mask.H similarity index 98% rename from Src/C_BoundaryLib/Mask.H rename to Src/Boundary/AMReX_Mask.H index cd031f28d..45a3d688f 100644 --- a/Src/C_BoundaryLib/Mask.H +++ b/Src/Boundary/AMReX_Mask.H @@ -2,8 +2,8 @@ #ifndef _MASK_H_ #define _MASK_H_ -#include -#include +#include +#include /* A Mask is a derived Fab class whose elements maintain a logical diff --git a/Src/C_BoundaryLib/Mask.cpp b/Src/Boundary/AMReX_Mask.cpp similarity index 98% rename from Src/C_BoundaryLib/Mask.cpp rename to Src/Boundary/AMReX_Mask.cpp index b03ff74a2..a69c4e469 100644 --- a/Src/C_BoundaryLib/Mask.cpp +++ b/Src/Boundary/AMReX_Mask.cpp @@ -1,8 +1,8 @@ #include -#include -#include -#include +#include +#include +#include const char NL = '\n'; const char SP = ' '; diff --git a/Src/C_BoundaryLib/MultiMask.H b/Src/Boundary/AMReX_MultiMask.H similarity index 93% rename from Src/C_BoundaryLib/MultiMask.H rename to Src/Boundary/AMReX_MultiMask.H index 26253cc2e..43a9a1692 100644 --- a/Src/C_BoundaryLib/MultiMask.H +++ b/Src/Boundary/AMReX_MultiMask.H @@ -1,9 +1,9 @@ #ifndef _MULTIMASK_H_ #define _MULTIMASK_H_ -#include -#include -#include +#include +#include +#include #ifdef _OPENMP #include diff --git a/Src/C_BoundaryLib/MultiMask.cpp b/Src/Boundary/AMReX_MultiMask.cpp similarity index 97% rename from Src/C_BoundaryLib/MultiMask.cpp rename to Src/Boundary/AMReX_MultiMask.cpp index 36f9c4648..15e63e6fd 100644 --- a/Src/C_BoundaryLib/MultiMask.cpp +++ b/Src/Boundary/AMReX_MultiMask.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include MultiMask::MultiMask (const BoxArray& ba, const DistributionMapping& dm, int ncomp) : m_fa(ba, ncomp, 0, dm) diff --git a/Src/C_BoundaryLib/CMakeLists.txt b/Src/Boundary/CMakeLists.txt similarity index 64% rename from Src/C_BoundaryLib/CMakeLists.txt rename to Src/Boundary/CMakeLists.txt index 377e942d6..5b8a8369a 100644 --- a/Src/C_BoundaryLib/CMakeLists.txt +++ b/Src/Boundary/CMakeLists.txt @@ -14,13 +14,13 @@ project(CBNDRYLIB) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files BndryData.cpp BndryRegister.cpp FabSet.cpp InterpBndryData.cpp MacBndry.cpp Mask.cpp MultiMask.cpp) -set(FPP_source_files INTERPBNDRYDATA_${BL_SPACEDIM}D.F LO_UTIL.F ) +set(CXX_source_files AMReX_BndryData.cpp AMReX_BndryRegister.cpp AMReX_FabSet.cpp AMReX_InterpBndryData.cpp AMReX_MacBndry.cpp AMReX_Mask.cpp AMReX_MultiMask.cpp) +set(FPP_source_files AMReX_INTERPBNDRYDATA_${BL_SPACEDIM}D.F AMReX_LO_UTIL.F ) set(F77_source_files) set(F90_source_files) -set(CXX_header_files BndryData.H BndryRegister.H BoundCond.H FabSet.H InterpBndryData.H LO_BCTYPES.H MacBndry.H Mask.H MultiMask.H) -set(FPP_header_files INTERPBNDRYDATA_F.H) +set(CXX_header_files AMReX_BndryData.H AMReX_BndryRegister.H AMReX_BoundCond.H AMReX_FabSet.H AMReX_InterpBndryData.H AMReX_LO_BCTYPES.H AMReX_MacBndry.H AMReX_Mask.H AMReX_MultiMask.H) +set(FPP_header_files AMReX_INTERPBNDRYDATA_F.H) set(F77_header_files) set(F90_header_files) diff --git a/Src/Boundary/Make.package b/Src/Boundary/Make.package new file mode 100644 index 000000000..ee6624b1b --- /dev/null +++ b/Src/Boundary/Make.package @@ -0,0 +1,19 @@ +BNDRYLIB_BASE=EXE +ifeq ($(LBASE),bndry) + BNDRYLIB_BASE=LIB +endif + +C$(BNDRYLIB_BASE)_sources += AMReX_FabSet.cpp AMReX_BndryRegister.cpp AMReX_Mask.cpp AMReX_MultiMask.cpp\ + AMReX_BndryData.cpp AMReX_InterpBndryData.cpp AMReX_MacBndry.cpp + +C$(BNDRYLIB_BASE)_headers += AMReX_FabSet.H AMReX_BndryRegister.H AMReX_Mask.H AMReX_MultiMask.H\ + AMReX_BndryData.H AMReX_BoundCond.H AMReX_InterpBndryData.H \ + AMReX_LO_BCTYPES.H AMReX_MacBndry.H + +F$(BNDRYLIB_BASE)_headers += AMReX_INTERPBNDRYDATA_F.H + +F$(BNDRYLIB_BASE)_sources += AMReX_INTERPBNDRYDATA_$(DIM)D.F AMReX_LO_UTIL.F + +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary + diff --git a/Src/C_BoundaryLib/OpenSource.txt b/Src/Boundary/OpenSource.txt similarity index 100% rename from Src/C_BoundaryLib/OpenSource.txt rename to Src/Boundary/OpenSource.txt diff --git a/Src/CMakeLists.txt b/Src/CMakeLists.txt index fe853dcab..8fdd42dda 100644 --- a/Src/CMakeLists.txt +++ b/Src/CMakeLists.txt @@ -1,10 +1,10 @@ -set(CBOXDIR C_BaseLib) +set(CBOXDIR Base) set(FBOXDIR F_BaseLib) -set(CBNDRYDIR C_BoundaryLib) -set(CPARTDIR C_ParticleLib) -set(CAMRCOREDIR C_AmrCoreLib) -set(CAMRDIR C_AMRLib) +set(CBNDRYDIR Boundary) +set(CPARTDIR Particle) +set(CAMRCOREDIR AmrCore) +set(CAMRDIR Amr) set(CMGDIR LinearSolvers/C_CellMG) set(CTMGDIR LinearSolvers/C_TensorMG) set(CFMGDIR LinearSolvers/C_to_F_MG) @@ -47,5 +47,5 @@ SET_TARGET_PROPERTIES(fboxlib PROPERTIES LINKER_LANGUAGE C) add_subdirectory(${CAMRDATADIR}) -add_subdirectory(Extern/gslib) + diff --git a/Src/C_AMRLib/MLSDCAmr.H b/Src/C_AMRLib/MLSDCAmr.H deleted file mode 100644 index a91cf31d8..000000000 --- a/Src/C_AMRLib/MLSDCAmr.H +++ /dev/null @@ -1,108 +0,0 @@ - -#ifndef _MLSDCAMR_H_ -#define _MLSDCAMR_H_ - -#include -#include -#include -#include -#include - -using namespace std; - -#define BEGIN_EXTERN_C extern "C" { -#define END_EXTERN_C } - - -/* - * Multilevel SDC+AMR level class. - */ - -class MLSDCAmr; -class MLSDCAmrLevel; - -/* - * MultiFab encapsulation context for SDCLib. - */ - -typedef struct { - const BoxArray *ba; - IntVect crse_ratio; - int ncomp, ngrow, level, finest; - MLSDCAmrLevel *amrlevel; -} MLSDCAmrEncapCtx; - -typedef struct { - MultiFab* U; // solution or function eval - FluxRegister* fine_flux; // current levels flux register - FluxRegister* crse_flux; // coarse levels flux register - MLSDCAmrLevel* amrlevel; - int type; -} MLSDCAmrEncap; - -/* - * Multilevel SDC+AMR level class. - */ - -class MLSDCAmrLevel : public AmrLevel -{ -public: - - MLSDCAmrLevel () : AmrLevel() { }; - - MLSDCAmrLevel (Amr& papa, - int lev, - const Geometry& level_geom, - const BoxArray& bl, - Real time) : AmrLevel(papa, lev, level_geom, bl, time) { }; - - MLSDCAmr* getMLSDCAmr() - { - return (MLSDCAmr*) parent; - } - - virtual void Restrict(MLSDCAmrEncap& F, MLSDCAmrEncap& G, Real t, MLSDCAmrLevel& levelG) = 0; - virtual void Interpolate(MLSDCAmrEncap& F, MLSDCAmrEncap& G, Real t, bool correction, bool evaluation, MLSDCAmrLevel& levelG) = 0; -}; - -/* - * Multilevel SDC+AMR class. - */ - -class MLSDCAmr : public Amr -{ -public: - - int max_iters; // maximum number of sdc iterations - int max_trefs; // maximum number of time refinements - int nnodes0; // number of nodes on the coarsest level - int trat; // time refinement ratio - int first_refinement_level; // first amr level that has time refinement - - sdc_mg mg; - vector sweepers; - vector encaps; - vector nsweeps; - - MLSDCAmr(); - ~MLSDCAmr(); - - virtual sdc_encap* BuildEncap(int lev); - virtual sdc_sweeper* BuildLevel(int lev) = 0; - virtual void InitializeMLSDC(); - virtual void RebuildMLSDC(); - virtual void DestroyMLSDC(); - virtual void FinalIntegrate(double t, double dt, int niter); - - virtual void coarseTimeStep (Real stop_time) = 0; - - virtual void timeStep(int level, - Real time, - int iteration, - int niter , - Real stop_time) override - { BL_ASSERT(false); } - -}; - -#endif diff --git a/Src/C_AMRLib/MLSDCAmr.cpp b/Src/C_AMRLib/MLSDCAmr.cpp deleted file mode 100644 index 5e4080f14..000000000 --- a/Src/C_AMRLib/MLSDCAmr.cpp +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Multilevel SDC + AMR controller. - * - * When RNS is compiled with USE_SDCLIB=TRUE, the time-stepping is - * done using the multi-level SDC (MLSDC) algorithm, with IMEX - * sweepers on each level (hydrodynamics are explicit, chemistry is - * implicit). The MLSDC algorithm is implemented in C in SDCLib (in - * SDCLib multi-level SDC is called multi-grid SDC). - * - * The interface between SDCLib and RNS is (mostly) contained in - * SDCAmr (derived from Amr) and SDCAmrEncap. - * - * Note that in MLSDC, there is no concept of "sub-cycling" fine - * levels. As such, the "timeStep" method defined in SDCAmr is only - * called on the coarsest level, and it essentially passes control to - * SDCLib to advance the solution. - * - * SDCLib handles interpolation and restriction in time. SDCLib also - * takes care of allocating multifabs at each SDC node. As such the - * traditional Amr concepts of "old data", "new data", and defining an - * "advance" routine no longer apply. In order to reuse as much of - * the existing Amr code as possible, SDCAmr puts the solution - * obtained from SDCLib into the "new data" state (this means all the - * logic to write plotfiles etc still works), but never defines "old - * data" or any "mid data". - * - * Some notes: - * - * 1. Since we never use 'old data', any calls to fill patch iterator - * will always use 'new data', regardless of any 'time' information - * set on the state data. - * - * 2. The 'n_factor' and 'n_cycle' logic in computeNewDt dictates - * that: if n_cycles is set to 1, 2, 2, ..., then dt_level stores - * the cfl timestep that each level wants to take. - * - * Known issues: - * - * 1. The SDC hierarchy is currently not depth limited. - * - * 2. We're using Gauss-Lobatto nodes, but Gauss-Radau would probably - * be better for chemistry. - * - * 3. mlsdc_amr_interpolate won't work for correcton at wall boundary. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef USE_COLOROUTPUT -// only works on some systems -#define RESETCOLOR "\033[0m" -#define BOLDFONT "\033[1m" -#define REDCOLOR "\033[31m" /* Red */ -#define GREENCOLOR "\033[32m" /* Green */ -#define YELLOWCOLOR "\033[33m" /* Yellow */ -#define BLUECOLOR "\033[34m" /* Blue */ -#define MAGENTACOLOR "\033[35m" /* Magenta */ -#define CYANCOLOR "\033[36m" /* Cyan */ -#else -#define RESETCOLOR "" -#define BOLDFONT "" -#define REDCOLOR "" -#define GREENCOLOR "" -#define YELLOWCOLOR "" -#define BLUECOLOR "" -#define MAGENTACOLOR "" -#define CYANCOLOR "" -#endif - -using namespace std; - -BEGIN_EXTERN_C - -/* - * Spatial interpolation between MultiFabs. Called by SDCLib. - */ -void mlsdc_amr_interpolate(void *Fp, void *Gp, sdc_state *state, void *ctxF, void *ctxG) -{ - BL_PROFILE("MLSDC_AMR_INTERPOLATE()"); - - bool correction = state->flags & SDC_CORRECTION; - bool evaluation = state->flags & SDC_FEVAL; - - MLSDCAmrEncap& F = *((MLSDCAmrEncap*) Fp); - MLSDCAmrEncap& G = *((MLSDCAmrEncap*) Gp); - MLSDCAmrLevel& levelF = *((MLSDCAmrLevel*) ctxF); - MLSDCAmrLevel& levelG = *((MLSDCAmrLevel*) ctxG); - - levelF.Interpolate(F, G, state->t, correction, evaluation, levelG); -} - -/* - * Spatial restriction between solutions and integrals of function - * evals. Called by SDCLib. - */ -void mlsdc_amr_restrict(void *Fp, void *Gp, sdc_state *state, void *ctxF, void *ctxG) -{ - BL_PROFILE("mlsdc_amr_restrict()"); - - MLSDCAmrEncap& F = *((MLSDCAmrEncap*) Fp); - MLSDCAmrEncap& G = *((MLSDCAmrEncap*) Gp); - MLSDCAmrLevel& levelF = *((MLSDCAmrLevel*) ctxF); - MLSDCAmrLevel& levelG = *((MLSDCAmrLevel*) ctxG); - - BL_ASSERT(G.type==SDC_SOLUTION || G.type==SDC_TAU); - - levelF.Restrict(F, G, state->t, levelG); -} - -END_EXTERN_C - - -void MLSDCAmr::FinalIntegrate(double t, double dt, int niter) -{ - int nlevs = mg.nlevels; - for (int l=0; lsweep(swp, t, dt, niter, SDC_SWEEP_NOEVAL); - } -} - -/* - * Rebuild MLSDC hierarchy. - */ -void MLSDCAmr::RebuildMLSDC() -{ - BL_PROFILE("MLSDCAmr::RebuildMLSDC()"); - - // reset previous and clear sweepers etc - sdc_mg_reset(&mg); - DestroyMLSDC(); - - // rebuild - for (int lev=0; lev<=finest_level; lev++) { - encaps[lev] = BuildEncap(lev); - sweepers[lev] = BuildLevel(lev); - sweepers[lev]->nset->ctx = &getLevel(lev); - sweepers[lev]->nset->encap = encaps[lev]; - sdc_mg_add_level(&mg, sweepers[lev], mlsdc_amr_interpolate, mlsdc_amr_restrict); - } - - sdc_mg_setup(&mg, 0); - sdc_mg_allocate(&mg); - - n_cycle[0] = 1; - for (int lev=1; lev<=finest_level; lev++) - n_cycle[lev] = 2; // see notes - - if (verbose > 0 && ParallelDescriptor::IOProcessor()) { - cout << "Rebuilt MLSDC: " << mg.nlevels << ", nnodes: "; - for (int lev=0; lev<=finest_level; lev++) - cout << sweepers[lev]->nset->nnodes << " "; - cout << endl; - if (verbose > 2) - sdc_mg_print(&mg, 2); - } -} - -/* - * Initialize SDC multilevel sweeper, set parameters. - */ -MLSDCAmr::MLSDCAmr () -{ - InitializeMLSDC(); -} - -void MLSDCAmr::InitializeMLSDC () -{ - ParmParse ppsdc("mlsdc"); - if (!ppsdc.query("max_iters", max_iters)) max_iters = 4; - if (!ppsdc.query("max_trefs", max_trefs)) max_trefs = 2; - if (!ppsdc.query("nnodes0", nnodes0)) nnodes0 = 3; - if (!ppsdc.query("trat", trat)) trat = 2; - - if (verbose > 2) - sdc_log_set_stdout(SDC_LOG_DEBUG); - else if (verbose > 1) - sdc_log_set_stdout(SDC_LOG_INFO); - - sdc_mg_build(&mg, max_level+1); - - sweepers.resize(max_level+1); - encaps.resize(max_level+1); - nsweeps.resize(max_trefs+1); - - if (!ppsdc.queryarr("nsweeps", nsweeps)) { - nsweeps[0] = (max_level > 0) ? 2 : 1; - for (int l=1; ldestroy(sweepers[lev]); - sweepers[lev] = NULL; - delete (MLSDCAmrEncapCtx*) encaps[lev]->ctx; - delete encaps[lev]; - } - } -} diff --git a/Src/C_AMRLib/MLSDCAmrEncap.cpp b/Src/C_AMRLib/MLSDCAmrEncap.cpp deleted file mode 100644 index be33b1b74..000000000 --- a/Src/C_AMRLib/MLSDCAmrEncap.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* - * MLSDCAmrEncap encapsulation for SDCLib. - * - * Notes: - * - State/solution encaps are created with grow/ghost cells. - * - Function evaluation encaps are created without grow/ghost cells. - * - Integral encaps are created without grow/ghost cells. - * - * XXX: Note that the FEVAL encapsulations have flux registers, and - * since we're using the IMEX sweeper, both the "explicit" feval and - * "implicit" feval will have flux registers, but this isn't - * necessary. Matt should clean this up sometime. - */ - -#include -#include -#include -#include - -#include - -BEGIN_EXTERN_C - -void mf_encap_setval(void *Qptr, sdc_dtype val, const int flags); - -void *mf_encap_create(int type, void *encap_ctx) -{ - MLSDCAmrEncapCtx* ctx = (MLSDCAmrEncapCtx*) encap_ctx; - MLSDCAmrEncap* encap = new MLSDCAmrEncap; - - encap->amrlevel = ctx->amrlevel; - encap->type = type; - encap->fine_flux = 0; - encap->crse_flux = 0; - - switch (type) { - case SDC_SOLUTION: - case SDC_WORK: - encap->U = new MultiFab(*ctx->ba, ctx->ncomp, ctx->ngrow); - break; - case SDC_FEVAL: - case SDC_INTEGRAL: - case SDC_TAU: - encap->U = new MultiFab(*ctx->ba, ctx->ncomp, 0); - if (ctx->level > 0) - encap->fine_flux = new FluxRegister(*ctx->ba, ctx->crse_ratio, ctx->level, ctx->ncomp); - if (ctx->level < ctx->finest) { - MLSDCAmr& amr = *encap->amrlevel->getMLSDCAmr(); - AmrLevel& lvl = amr.getLevel(ctx->level+1); - encap->crse_flux = new FluxRegister(lvl.boxArray(), amr.refRatio(ctx->level), lvl.Level(), ctx->ncomp); - } - break; - } - - mf_encap_setval(encap, 0.0, SDC_ENCAP_ALL); - return encap; -} - -void mf_encap_destroy(void *Qptr) -{ - MLSDCAmrEncap* Q = (MLSDCAmrEncap*) Qptr; - delete Q->U; - if (Q->fine_flux != NULL) delete Q->fine_flux; - if (Q->crse_flux != NULL) delete Q->crse_flux; - delete Q; -} - -void mf_encap_setval_flux(FluxRegister& dst, sdc_dtype val) -{ - for (OrientationIter face; face; ++face) - for (FabSetIter bfsi(dst[face()]); bfsi.isValid(); ++bfsi) - dst[face()][bfsi].setVal(val); -} - -void mf_encap_setval(void *Qptr, sdc_dtype val, const int flags) -{ - MLSDCAmrEncap& Q = *((MLSDCAmrEncap*) Qptr); - MultiFab& U = *Q.U; - - if ((flags & SDC_ENCAP_INTERIOR) && (flags & SDC_ENCAP_GHOST)) - U.setVal(val, U.nGrow()); - else - U.setVal(val, 0); - - if (Q.fine_flux) mf_encap_setval_flux(*Q.fine_flux, val); - if (Q.crse_flux) mf_encap_setval_flux(*Q.crse_flux, val); -} - -void mf_encap_copy_flux(FluxRegister& dst, FluxRegister& src) -{ - for (OrientationIter face; face; ++face) - for (FabSetIter bfsi(dst[face()]); bfsi.isValid(); ++bfsi) - dst[face()][bfsi].copy(src[face()][bfsi]); -} - -void mf_encap_copy(void *dstp, const void *srcp, int flags) -{ - MLSDCAmrEncap& Qdst = *((MLSDCAmrEncap*) dstp); - MLSDCAmrEncap& Qsrc = *((MLSDCAmrEncap*) srcp); - MultiFab& Udst = *Qdst.U; - MultiFab& Usrc = *Qsrc.U; - - if ((flags & SDC_ENCAP_INTERIOR) && (flags & SDC_ENCAP_GHOST)) { - int ngsrc = Usrc.nGrow(); - int ngdst = Udst.nGrow(); - int nghost = (ngdst < ngsrc) ? ngdst : ngsrc; - MultiFab::Copy(Udst, Usrc, 0, 0, Usrc.nComp(), nghost); - } else { - MultiFab::Copy(Udst, Usrc, 0, 0, Usrc.nComp(), 0); - } - - if (Qdst.fine_flux && Qsrc.fine_flux) mf_encap_copy_flux(*Qdst.fine_flux, *Qsrc.fine_flux); - if (Qdst.crse_flux && Qsrc.crse_flux) mf_encap_copy_flux(*Qdst.crse_flux, *Qsrc.crse_flux); - -#ifndef NDEBUG - BL_ASSERT(Usrc.contains_nan() == false); - BL_ASSERT(Udst.contains_nan() == false); -#endif -} - -void mf_encap_saxpy_flux(FluxRegister& y, sdc_dtype a, FluxRegister& x) -{ - for (OrientationIter face; face; ++face) -#ifdef _OPENMP -#pragma omp parallel -#endif - for (FabSetIter bfsi(y[face()]); bfsi.isValid(); ++bfsi) - y[face()][bfsi].saxpy(a, x[face()][bfsi]); -} - -void mf_encap_saxpy(void *yp, sdc_dtype a, void *xp, int flags) -{ - MLSDCAmrEncap& Qy = *((MLSDCAmrEncap*) yp); - MLSDCAmrEncap& Qx = *((MLSDCAmrEncap*) xp); - MultiFab& Uy = *Qy.U; - MultiFab& Ux = *Qx.U; - int ncomp = Uy.nComp(); - int ngrow = std::min(Ux.nGrow(), Uy.nGrow()); - - BL_ASSERT(Uy.boxArray() == Ux.boxArray()); - -#ifdef _OPENMP -#pragma omp parallel -#endif - for (MFIter mfi(Uy,true); mfi.isValid(); ++mfi) { - const Box& bx = mfi.growntilebox(ngrow); - Uy[mfi].saxpy(a, Ux[mfi], bx, bx, 0, 0, ncomp); - } - - if ((Qy.type==SDC_TAU) && (Qx.fine_flux!=NULL)) mf_encap_saxpy_flux(*Qy.fine_flux, a, *Qx.fine_flux); - if ((Qy.type==SDC_TAU) && (Qx.crse_flux!=NULL)) mf_encap_saxpy_flux(*Qy.crse_flux, a, *Qx.crse_flux); -} - -void mf_encap_norm(void *qp, double *n) -{ - MLSDCAmrEncap& Q = *((MLSDCAmrEncap*) qp); - MultiFab& U = *Q.U; - - double m = 0.0; - for (int c=0; clevel = lev; - ctx->ba = &boxArray(lev); - ctx->amrlevel = dynamic_cast(&getLevel(lev)); - ctx->finest = finest_level; - ctx->ncomp = dl[0].nComp(); - ctx->ngrow = dl[0].nExtra(); - if (lev > 0) - ctx->crse_ratio = refRatio(lev-1); - - sdc_encap* encap = new sdc_encap; - encap->create = mf_encap_create; - encap->destroy = mf_encap_destroy; - encap->setval = mf_encap_setval; - encap->copy = mf_encap_copy; - encap->saxpy = mf_encap_saxpy; - encap->norm = mf_encap_norm; - encap->ctx = ctx; - - return encap; -} diff --git a/Src/C_AMRLib/Make.package b/Src/C_AMRLib/Make.package deleted file mode 100644 index 7c9e2ee4e..000000000 --- a/Src/C_AMRLib/Make.package +++ /dev/null @@ -1,47 +0,0 @@ - -AMRLIB_BASE=EXE -ifeq ($(LBASE),amr) - AMRLIB_BASE=LIB -endif - -C$(AMRLIB_BASE)_sources += Amr.cpp AmrLevel.cpp Derive.cpp StateData.cpp \ - StateDescriptor.cpp AuxBoundaryData.cpp Extrapolater.cpp - -C$(AMRLIB_BASE)_headers += Amr.H AmrLevel.H Derive.H LevelBld.H StateData.H \ - StateDescriptor.H PROB_AMR_F.H AuxBoundaryData.H Extrapolater.H - -f90$(AMRLIB_BASE)_sources += extrapolater_$(DIM)d.f90 - -F$(AMRLIB_BASE)_sources += ARRAYLIM_$(DIM)D.F - -ifeq ($(DIM),3) - F$(AMRLIB_BASE)_sources += MAKESLICE_$(DIM)D.F -endif - -ifeq ($(USE_SLABSTAT), TRUE) - DEFINES += -DUSE_SLABSTAT - C$(AMRLIB_BASE)_sources += SlabStat.cpp - C$(AMRLIB_BASE)_headers += SlabState.H - F$(AMRLIB_BASE)_sources += SLABSTAT_$(DIM)D.F - F$(AMRLIB_BASE)_headers += SLABSTAT_F.H MAKESLICE_F.H -endif - -ifeq ($(USE_STATIONDATA), TRUE) - DEFINES += -DUSE_STATIONDATA - C$(AMRLIB_BASE)_sources += StationData.cpp - C$(AMRLIB_BASE)_headers += StationData.H -endif - -ifeq ($(USE_ARRAYVIEW),TRUE) - C$(AMRLIB_BASE)_headers += DatasetClient.H - C$(AMRLIB_BASE)_sources += DatasetClient.cpp -endif - -ifeq ($(USE_SDCLIB), TRUE) - CEXE_sources += MLSDCAmr.cpp MLSDCAmrEncap.cpp - CEXE_headers += MLSDCAmr.H -endif - -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib - diff --git a/Src/C_AmrCoreLib/Make.package b/Src/C_AmrCoreLib/Make.package deleted file mode 100644 index 4181379d5..000000000 --- a/Src/C_AmrCoreLib/Make.package +++ /dev/null @@ -1,15 +0,0 @@ - -CEXE_headers += AmrCore.H Cluster.H ErrorList.H FillPatchUtil.H FluxRegister.H \ - Interpolater.H TagBox.H -CEXE_sources += AmrCore.cpp Cluster.cpp ErrorList.cpp FillPatchUtil.cpp FluxRegister.cpp \ - Interpolater.cpp TagBox.cpp - -FEXE_headers += FLUXREG_F.H INTERP_F.H -FEXE_sources += FLUXREG_$(DIM)D.F INTERP_$(DIM)D.F - -ifeq ($(USE_PARTICLES), TRUE) - CEXE_headers += AmrParGDB.H AmrParticles.H -endif - -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_AmrCoreLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AmrCoreLib diff --git a/Src/C_BaseLib/GPackage.mak b/Src/C_BaseLib/GPackage.mak deleted file mode 100644 index a686b35f1..000000000 --- a/Src/C_BaseLib/GPackage.mak +++ /dev/null @@ -1,5 +0,0 @@ -cxxsources += MemPool.cpp -cxxsources += CArena.cpp -cxxsources += Arena.cpp - -f90sources += mempool_f.f90 diff --git a/Src/C_BaseLib/Make.package b/Src/C_BaseLib/Make.package deleted file mode 100644 index 2a0b0de80..000000000 --- a/Src/C_BaseLib/Make.package +++ /dev/null @@ -1,172 +0,0 @@ - -BOXLIB_BASE=EXE -ifeq ($(LBASE),box) - BOXLIB_BASE=LIB -endif - -# -# Utility classes. -# -C$(BOXLIB_BASE)_headers += BoxLib.H -C$(BOXLIB_BASE)_sources += BoxLib.cpp - -C$(BOXLIB_BASE)_sources += ParmParse.cpp Utility.cpp -C$(BOXLIB_BASE)_headers += ParmParse.H Utility.H BLassert.H ArrayLim.H - -C$(BOXLIB_BASE)_headers += REAL.H CONSTANTS.H SPACE.H SPACE_F.H - -C$(BOXLIB_BASE)_sources += UseCount.cpp -C$(BOXLIB_BASE)_headers += UseCount.H - -C$(BOXLIB_BASE)_sources += DistributionMapping.cpp ParallelDescriptor.cpp -C$(BOXLIB_BASE)_headers += DistributionMapping.H ParallelDescriptor.H - -C$(BOXLIB_BASE)_sources += VisMF.cpp Arena.cpp BArena.cpp CArena.cpp -C$(BOXLIB_BASE)_headers += VisMF.H Arena.H BArena.H CArena.H - -C$(BOXLIB_BASE)_headers += BLProfiler.H - -C$(BOXLIB_BASE)_headers += BLBackTrace.H - -C$(BOXLIB_BASE)_headers += BLFort.H - -C$(BOXLIB_BASE)_sources += NFiles.cpp -C$(BOXLIB_BASE)_headers += NFiles.H - -# -# Container classes. -# -T_headers += Array.H PArray.H PList.H Pointers.H Tuple.H - -# -# FAB I/O stuff. -# -C${BOXLIB_BASE}_headers += FabConv.H FPC.H -C${BOXLIB_BASE}_sources += FabConv.cpp FPC.cpp - -# -# Index space. -# -C$(BOXLIB_BASE)_sources += Box.cpp IntVect.cpp IndexType.cpp Orientation.cpp Periodicity.cpp -C$(BOXLIB_BASE)_headers += Box.H IntVect.H IndexType.H Orientation.H Periodicity.H - -# -# Real space. -# -C$(BOXLIB_BASE)_sources += RealBox.cpp -C$(BOXLIB_BASE)_headers += RealBox.H - -# -# Unions of rectangles. -# -C$(BOXLIB_BASE)_sources += BoxList.cpp BoxArray.cpp BoxDomain.cpp -C$(BOXLIB_BASE)_headers += BoxList.H BoxArray.H BoxDomain.H - -# -# FORTRAN array data. -# -C$(BOXLIB_BASE)_sources += FArrayBox.cpp -C$(BOXLIB_BASE)_headers += FArrayBox.H - -C$(BOXLIB_BASE)_sources += IArrayBox.cpp -C$(BOXLIB_BASE)_headers += IArrayBox.H - -C$(BOXLIB_BASE)_headers += Looping.H - -T_headers += BaseFab.H -C$(BOXLIB_BASE)_sources += BaseFab.cpp - -# -# FORTRAN data defined on unions of rectangles. -# -C$(BOXLIB_BASE)_sources += MultiFab.cpp -C$(BOXLIB_BASE)_headers += MultiFab.H - -C$(BOXLIB_BASE)_sources += iMultiFab.cpp -C$(BOXLIB_BASE)_headers += iMultiFab.H - -T_headers += FabArray.H -C$(BOXLIB_BASE)_sources += FabArray.cpp - -T_headers += ccse-mpi.H - -# -# Geometry / Coordinate system routines. -# -ifneq ($(BL_NO_FORT),TRUE) - C$(BOXLIB_BASE)_sources += CoordSys.cpp Geometry.cpp MultiFabUtil.cpp - C$(BOXLIB_BASE)_headers += CoordSys.H Geometry.H MultiFabUtil.H -endif - -# -# Boundary-related -# -C$(BOXLIB_BASE)_sources += BCRec.cpp PhysBCFunct.cpp -C$(BOXLIB_BASE)_headers += BCRec.H PhysBCFunct.H -C$(BOXLIB_BASE)_headers += BC_TYPES.H - -# -# Plotfile -# -C$(BOXLIB_BASE)_sources += PlotFileUtil.cpp -C$(BOXLIB_BASE)_headers += PlotFileUtil.H - -# -# Fortran interface routines. -# -ifneq ($(BL_NO_FORT),TRUE) - F$(BOXLIB_BASE)_sources += COORDSYS_$(DIM)D.F - F$(BOXLIB_BASE)_headers += COORDSYS_F.H - F$(BOXLIB_BASE)_sources += FILCC_${DIM}D.F - - f$(BOXLIB_BASE)_sources += BLutil_F.f - f$(BOXLIB_BASE)_sources += BLParmParse_F.f - f$(BOXLIB_BASE)_sources += BLBoxLib_F.f - f$(BOXLIB_BASE)_sources += BLProfiler_F.f - - f90$(BOXLIB_BASE)_sources += BaseFab_nd.f90 - f90(BOXLIB_BASE)_headers += BaseFab_f.H - - f90$(BOXLIB_BASE)_sources += threadbox.f90 - - f90$(BOXLIB_BASE)_sources += MultiFabUtil_$(DIM)d.f90 - - F90$(BOXLIB_BASE)_sources += bl_fort_module.F90 -endif - -C$(BOXLIB_BASE)_sources += BLProfiler.cpp -C$(BOXLIB_BASE)_sources += BLBackTrace.cpp - -ifeq ($(LAZY),TRUE) - C$(BOXLIB_BASE)_sources += Lazy.cpp - C$(BOXLIB_BASE)_headers += Lazy.H -endif - -# Memory pool -C$(BOXLIB_BASE)_headers += MemPool.H -C$(BOXLIB_BASE)_sources += MemPool.cpp -ifneq ($(BL_NO_FORT),TRUE) - f90$(BOXLIB_BASE)_sources += mempool_f.f90 -endif - -# UPCXX -ifeq ($(USE_UPCXX),TRUE) - C$(BOXLIB_BASE)_sources += BLPgas.cpp - C$(BOXLIB_BASE)_headers += BLPgas.H -endif - -# Memory Profiler -ifeq ($(MEM_PROFILE),TRUE) - C$(BOXLIB_BASE)_sources += MemProfiler.cpp - C$(BOXLIB_BASE)_headers += MemProfiler.H -endif - -# Basic Profiler -ifeq ($(TINY_PROFILE),TRUE) - C$(BOXLIB_BASE)_headers += TinyProfiler.H - C$(BOXLIB_BASE)_sources += TinyProfiler.cpp -endif - -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib - diff --git a/Src/C_BaseLib/PArray.H b/Src/C_BaseLib/PArray.H deleted file mode 100644 index 79b0b67f7..000000000 --- a/Src/C_BaseLib/PArray.H +++ /dev/null @@ -1,288 +0,0 @@ - -#ifndef BL_PARRAY_H -#define BL_PARRAY_H - -#include - -// -// An enum that controls whether or not class PArray -// manages the pointed to objects, as well as the pointer itself. -// Valid values are PArrayNoManage and PArrayManage. -// -enum PArrayPolicy -{ - PArrayNoManage = 0, - PArrayManage = 1 -}; - -/* - An Array of Pointers to Objects of Type T - - The PArray class is similar to the Array class except that it - implements an array of pointers to objects of type T rather than an array - of the objects themselves. As with Array objects, PArray objects - know about their length, can be dynamically resized and have built-in - automatic bounds checking. - - When a PArray object is destructed, should only the pointers be - destructed or should the objects to which they point also be deleted? - The PArray class allows for both scenarios. By default, it will - only remove the pointers. If the array is constructed with the - PArrayManage argument it will also delete all the objects pointed to - in the array. - - This is a concrete class, not a polymorphic one. - - PArrays do NOT provide a copy constructor or an assignment operator. -*/ - -template -class PArray -{ -public: - // - // Constructs a PArray with no elements. The default memory - // management policy is not to delete the underlying objects - // upon destruction. - // - explicit PArray (PArrayPolicy _managed = PArrayNoManage); - // - // Constructs a PArray of length len of null pointers. - // The default memory management policy is not to delete the - // underlying objects upon destruction. - // - explicit PArray (int len, - PArrayPolicy _managed = PArrayNoManage); - // - // The destructor. If the memory management policy was - // set to Manage upon construction, this destructor will - // also delete all objects referenced by the pointers in - // this array. - // - ~PArray (); - // - // Returns true if the i'th element is not the null pointer. - // - bool defined (int i) const { return i < vp.size() && vp[i] != 0; } - // - // Returns a constant reference to the object pointed to by the - // i'th element in this PArray. Performs bounds checking - // when the library is compiled in debug mode. - // - const T& operator[] (int i) const { BL_ASSERT(vp[i] != 0); return *((T*)(vp[i])); } - // - // Returns a reference to the object pointed to by the - // i'th element in this PArray. Performs bounds checking - // when the library is compiled in debug mode. - // - T& operator[] (int i) { BL_ASSERT(vp[i] != 0); return *((T*)(vp[i])); } - // - // Returns a constant reference to the object pointed to by the - // i'th element in the PArray. It is an error if the i'th element - // is the null pointer. - // - const T& get (int i) const { BL_ASSERT(vp[i] != 0); return *((T*)(vp[i])); } - // - // Returns a reference to the object pointed to by the i'th - // element in the PArray. It is an error if the i'th element - // is the null pointer. - // - T& get (int i) { BL_ASSERT(vp[i] != 0); return *((T*)(vp[i])); } - // - // Defines the i'th element of this PArray to the pointer - // value elem. It is an error if the i'th element previously - // had a value. - // - void set (int i, T* elem) { BL_ASSERT(vp[i] == 0 || managed == PArrayNoManage); vp[i] = elem; } - // !!!!! Be careful! This function removes 'const'. - void set (int i, const T* elem) { BL_ASSERT(vp[i] == 0 || managed == PArrayNoManage); vp[i] = (T*) elem; } - // - // Returns the number of elements. - // - int size () const { return vp.size(); } - // - // This function sets each pointer in this PArray to null. - // If the memory management policy was set to Manage - // upon construction, this function will also delete all objects - // referenced by the pointers in this array. - // - void clear (); - // - // The i'th element in this PArray is set to null. - // If the memory management policy was set to Manage - // upon construction, this function will also delete the object - // referenced by that pointer. - // - void clear (int i); - // - // This function changes the size of the array to newsize - // while preserving the value of as many array elements as - // possible. If newsize is greater than the current length, - // the array is grown and the new elements are null pointers. - // If newsize is less than the current length the array is - // cropped with the remaining elements retaining their - // original pointer values. If the memory management policy - // was set to Manage, any cropped pointers are deleted. - // - void resize (int newsize); - // - // This function does a resize and changes the PArrayPolicy. - // (Especially for arrays of PArray where the user wants - // the default policy to be managed--the default constructor - // makes the default unmanaged). If the new managed policy is - // different from the old one, none of the elements of the - // original are retained. - // - void resize (int newsize, - PArrayPolicy newmanagedpolicy); - // - // Removes the i'th element from the PArray and returns the - // pointer to the calling function. Nulls out the pointer - // in the PArray. - // - T* remove (int i); - // - // Pushes a pointer to the back of the array. - // This also returns the pushed pointer. - // - T* push_back(T* p); - -private: - // - // The underlying representation. - // - Array vp; - // - // The memory management policy. - // - PArrayPolicy managed; - -public: - // - // Disallow these. FIXME - // - PArray (const PArray&); - // PArray operator= (const PArray&); -}; - -template -PArray::PArray (const PArray& c) -{ - BL_ASSERT(c.size()==0); - managed = c.managed; -} - -template -PArray::PArray (PArrayPolicy _managed) - : - managed(_managed) -{} - -template -T* -PArray::remove (int i) -{ - BL_ASSERT(vp[i] != 0); - void* tmp = vp[i]; - vp[i] = 0; - return (T*) tmp; -} - -template -T* -PArray::push_back (T* p) -{ - vp.push_back((void*) p); - return p; -} - -template -void -PArray::clear (int n) -{ - if (managed) - delete ((T*)(vp[n])); - vp[n] = 0; -} - -template -PArray::PArray (int len, - PArrayPolicy _managed) - : - vp(len), - managed(_managed) -{ - for (int i = 0, N = size(); i < N; i++) - { - vp[i] = 0; - } -} - -template -void -PArray::clear () -{ - if (managed) - { - for (int i = 0, N = size(); i < N; ++i) - { - delete ((T*)(vp[i])); - vp[i] = 0; - } - } - else - { - for (int i = 0, N = size(); i < N; ++i) - { - vp[i] = 0; - } - } -} - -template -PArray::~PArray () -{ - clear(); -} - -template -void -PArray::resize (int newlen) -{ - void** ovp = vp.size() ? &vp[0] : 0; - - int oldlen = vp.size(); - - vp.resize(newlen); - - for (int i = oldlen; i < newlen; ++i) - vp[i] = 0; - - if (managed) - { - for (int i = newlen; i < oldlen; i++) - { - delete ((T*)(ovp[i])); - ovp[i] = 0; - } - } -} - -template -void -PArray::resize (int newlen, - PArrayPolicy newmanagedpolicy) -{ - if (newmanagedpolicy == managed) - { - resize(newlen); - } - else - { - clear(); - resize(newlen); - managed = newmanagedpolicy; - } -} - -#endif /*BL_PARRAY_H*/ diff --git a/Src/C_BoundaryLib/Make.package b/Src/C_BoundaryLib/Make.package deleted file mode 100644 index 8d1fa6267..000000000 --- a/Src/C_BoundaryLib/Make.package +++ /dev/null @@ -1,19 +0,0 @@ -BNDRYLIB_BASE=EXE -ifeq ($(LBASE),bndry) - BNDRYLIB_BASE=LIB -endif - -C$(BNDRYLIB_BASE)_sources += FabSet.cpp BndryRegister.cpp Mask.cpp MultiMask.cpp\ - BndryData.cpp InterpBndryData.cpp MacBndry.cpp - -C$(BNDRYLIB_BASE)_headers += FabSet.H BndryRegister.H Mask.H MultiMask.H\ - BndryData.H BoundCond.H InterpBndryData.H \ - LO_BCTYPES.H MacBndry.H - -F$(BNDRYLIB_BASE)_headers += INTERPBNDRYDATA_F.H - -F$(BNDRYLIB_BASE)_sources += INTERPBNDRYDATA_$(DIM)D.F LO_UTIL.F - -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib - diff --git a/Src/C_ParticleLib/Make.package b/Src/C_ParticleLib/Make.package deleted file mode 100644 index f64740f34..000000000 --- a/Src/C_ParticleLib/Make.package +++ /dev/null @@ -1,13 +0,0 @@ - -BOXLIB_BASE=EXE -ifeq ($(LBASE),box) - BOXLIB_BASE=LIB -endif - -C$(BOXLIB_BASE)_sources += Particles.cpp TracerParticles.cpp -C$(BOXLIB_BASE)_headers += Particles.H ParticleInit.H ParGDB.H TracerParticles.H -F$(BOXLIB_BASE)_headers += Particles_F.H -F$(BOXLIB_BASE)_sources += Particles_$(DIM)D.F - -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_ParticleLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_ParticleLib diff --git a/Src/Extern/amrdata/AmrData.H b/Src/Extern/amrdata/AMReX_AmrData.H similarity index 98% rename from Src/Extern/amrdata/AmrData.H rename to Src/Extern/amrdata/AMReX_AmrData.H index 67a32c8ff..93948ac46 100644 --- a/Src/Extern/amrdata/AmrData.H +++ b/Src/Extern/amrdata/AMReX_AmrData.H @@ -4,10 +4,10 @@ #ifndef _AMRDATA_H_ #define _AMRDATA_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/Src/Extern/amrdata/AmrData.cpp b/Src/Extern/amrdata/AMReX_AmrData.cpp similarity index 99% rename from Src/Extern/amrdata/AmrData.cpp rename to Src/Extern/amrdata/AMReX_AmrData.cpp index 409d5e23d..16b089681 100644 --- a/Src/Extern/amrdata/AmrData.cpp +++ b/Src/Extern/amrdata/AMReX_AmrData.cpp @@ -1,11 +1,11 @@ // --------------------------------------------------------------- // AmrData.cpp // --------------------------------------------------------------- -#include +#include -#include -#include -#include +#include +#include +#include #include #include diff --git a/Src/Extern/amrdata/AmrvisConstants.H b/Src/Extern/amrdata/AMReX_AmrvisConstants.H similarity index 98% rename from Src/Extern/amrdata/AmrvisConstants.H rename to Src/Extern/amrdata/AMReX_AmrvisConstants.H index 67392149d..5cd9931a7 100644 --- a/Src/Extern/amrdata/AmrvisConstants.H +++ b/Src/Extern/amrdata/AMReX_AmrvisConstants.H @@ -5,7 +5,7 @@ #ifndef _AMRVISCONSTANTS_H #define _AMRVISCONSTANTS_H -#include +#include #include #include diff --git a/Src/Extern/amrdata/DataServices.H b/Src/Extern/amrdata/AMReX_DataServices.H similarity index 98% rename from Src/Extern/amrdata/DataServices.H rename to Src/Extern/amrdata/AMReX_DataServices.H index 26090dfbd..e934aaff1 100644 --- a/Src/Extern/amrdata/DataServices.H +++ b/Src/Extern/amrdata/AMReX_DataServices.H @@ -5,8 +5,8 @@ #ifndef _DATASERVICES_H_ #define _DATASERVICES_H_ -#include -#include +#include +#include #include #include diff --git a/Src/Extern/amrdata/DataServices.cpp b/Src/Extern/amrdata/AMReX_DataServices.cpp similarity index 99% rename from Src/Extern/amrdata/DataServices.cpp rename to Src/Extern/amrdata/AMReX_DataServices.cpp index fb60f4fff..1b1c39083 100644 --- a/Src/Extern/amrdata/DataServices.cpp +++ b/Src/Extern/amrdata/AMReX_DataServices.cpp @@ -2,11 +2,11 @@ // --------------------------------------------------------------- // DataServices.cpp // --------------------------------------------------------------- -#include +#include -#include -#include -#include +#include +#include +#include #ifndef BL_NOLINEVALUES # include diff --git a/Src/Extern/amrdata/FABUTIL_1D.F b/Src/Extern/amrdata/AMReX_FABUTIL_1D.F similarity index 99% rename from Src/Extern/amrdata/FABUTIL_1D.F rename to Src/Extern/amrdata/AMReX_FABUTIL_1D.F index 8d306f183..bcd5dc602 100644 --- a/Src/Extern/amrdata/FABUTIL_1D.F +++ b/Src/Extern/amrdata/AMReX_FABUTIL_1D.F @@ -3,8 +3,8 @@ #define FORT_CINTERP cinterp1d #define FORT_PCINTERP pcinterp1d -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" c ::: -------------------------------------------------------------- subroutine FORT_CINTERP (fine,floi1,floi2,fhii1,fhii2, fblo,fbhi, diff --git a/Src/Extern/amrdata/FABUTIL_2D.F b/Src/Extern/amrdata/AMReX_FABUTIL_2D.F similarity index 99% rename from Src/Extern/amrdata/FABUTIL_2D.F rename to Src/Extern/amrdata/AMReX_FABUTIL_2D.F index ae1a9de2b..2e50918f0 100644 --- a/Src/Extern/amrdata/FABUTIL_2D.F +++ b/Src/Extern/amrdata/AMReX_FABUTIL_2D.F @@ -3,8 +3,8 @@ #define FORT_CINTERP cinterp2d #define FORT_PCINTERP pcinterp2d -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" c ::: -------------------------------------------------------------- subroutine FORT_CINTERP (fine,floi1,floi2,fhii1,fhii2, fblo,fbhi, diff --git a/Src/Extern/amrdata/FABUTIL_3D.F b/Src/Extern/amrdata/AMReX_FABUTIL_3D.F similarity index 99% rename from Src/Extern/amrdata/FABUTIL_3D.F rename to Src/Extern/amrdata/AMReX_FABUTIL_3D.F index 582816108..a7e120330 100644 --- a/Src/Extern/amrdata/FABUTIL_3D.F +++ b/Src/Extern/amrdata/AMReX_FABUTIL_3D.F @@ -5,8 +5,8 @@ #define FORT_VCINTERP vcinterp3d #define FORT_CARTGRIDMINMAX cartgridminmax3d -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" #define IX_PROJ(A,B) (A+B*iabs(A))/B-iabs(A) diff --git a/Src/Extern/amrdata/CMakeLists.txt b/Src/Extern/amrdata/CMakeLists.txt index cb6df8904..78b0544c8 100644 --- a/Src/Extern/amrdata/CMakeLists.txt +++ b/Src/Extern/amrdata/CMakeLists.txt @@ -14,12 +14,12 @@ project(AMRDATALIB) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files AmrData.cpp DataServices.cpp) -set(FPP_source_files FABUTIL_${BL_SPACEDIM}D.F) +set(CXX_source_files AMReX_AmrData.cpp AMReX_DataServices.cpp) +set(FPP_source_files AMReX_FABUTIL_${BL_SPACEDIM}D.F) set(F77_source_files) set(F90_source_files) -set(CXX_header_files AmrData.H AmrvisConstants.H DataServices.H) +set(CXX_header_files AMReX_AmrData.H AMReX_AmrvisConstants.H AMReX_DataServices.H) set(FPP_header_files) set(F77_header_files) set(F90_header_files) diff --git a/Src/Extern/amrdata/Make.package b/Src/Extern/amrdata/Make.package index 38af2b86d..0a8d0136c 100644 --- a/Src/Extern/amrdata/Make.package +++ b/Src/Extern/amrdata/Make.package @@ -1,7 +1,6 @@ -CEXE_sources += AmrData.cpp DataServices.cpp -CEXE_headers += AmrData.H AmrvisConstants.H DataServices.H -FEXE_headers += -FEXE_sources += FABUTIL_${DIM}D.F +CEXE_sources += AMReX_AmrData.cpp AMReX_DataServices.cpp +CEXE_headers += AMReX_AmrData.H AMReX_AmrvisConstants.H AMReX_DataServices.H +FEXE_sources += AMReX_FABUTIL_${DIM}D.F VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata diff --git a/Src/Extern/gslib/CMakeLists.txt b/Src/Extern/gslib/CMakeLists.txt deleted file mode 100644 index cdcdd7325..000000000 --- a/Src/Extern/gslib/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- mode: cmake -*------------------------------------------- -project(GSLIB) - -set(F77_source_files acorni.f backtr.f beyond.f blue.f chknam.f chktitle.f CMakeLists.txt cova3.f dlocate.f dpowint.f dsortem.f gauinv.f gcum.f getindx.f getz.f green.f hexa.f ksol.f ktsol.f locate.f nscore.f numtext.f ordrel.f picksupr.f powint.f psfill.f psline.f pstext.f rand.f red.f resc.f scal.f setrot.f setsupr.f sortem.f sqdist.f srchsupr.f strlen.f) - -add_library(gslib ${F77_source_files}) -set_target_properties(gslib PROPERTIES LINKER_LANGUAGE Fortran) - -add_install_library(gslib) - -if (BUILD_TESTS) -endif() - diff --git a/Src/Extern/gslib/acorni.f b/Src/Extern/gslib/acorni.f deleted file mode 100644 index 3303d7196..000000000 --- a/Src/Extern/gslib/acorni.f +++ /dev/null @@ -1,56 +0,0 @@ - double precision function acorni(idum) -c----------------------------------------------------------------------- -c -c Fortran implementation of ACORN random number generator of order less -c than or equal to 12 (higher orders can be obtained by increasing the -c parameter value MAXORD). -c -c -c NOTES: 1. The variable idum is a dummy variable. The common block -c IACO is used to transfer data into the function. -c -c 2. Before the first call to ACORN the common block IACO must -c be initialised by the user, as follows. The values of -c variables in the common block must not subsequently be -c changed by the user. -c -c KORDEI - order of generator required ( must be =< MAXORD) -c -c MAXINT - modulus for generator, must be chosen small -c enough that 2*MAXINT does not overflow -c -c ixv(1) - seed for random number generator -c require 0 < ixv(1) < MAXINT -c -c (ixv(I+1),I=1,KORDEI) -c - KORDEI initial values for generator -c require 0 =< ixv(I+1) < MAXINT -c -c 3. After initialisation, each call to ACORN generates a single -c random number between 0 and 1. -c -c 4. An example of suitable values for parameters is -c -c KORDEI = 10 -c MAXINT = 2**30 -c ixv(1) = an odd integer in the (approximate) range -c (0.001 * MAXINT) to (0.999 * MAXINT) -c ixv(I+1) = 0, I=1,KORDEI -c -c -c -c Author: R.S.Wikramaratna, Date: October 1990 -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter (KORDEI=12,MAXOP1=KORDEI+1,MAXINT=2**30) - common/iaco/ ixv(MAXOP1) - - do i=1,KORDEI - ixv(i+1)=(ixv(i+1)+ixv(i)) - if(ixv(i+1).ge.MAXINT) ixv(i+1)=ixv(i+1)-MAXINT - end do - acorni=dble(ixv(KORDEI+1))/MAXINT - return - end diff --git a/Src/Extern/gslib/backtr.f b/Src/Extern/gslib/backtr.f deleted file mode 100644 index ce45cd85d..000000000 --- a/Src/Extern/gslib/backtr.f +++ /dev/null @@ -1,76 +0,0 @@ - real function backtr(vrgs,nt,vr,vrg,zmin,zmax,ltail,ltpar, - + utail,utpar) -c----------------------------------------------------------------------- -c -c Back Transform Univariate Data from Normal Scores -c ************************************************* -c -c This subroutine backtransforms a standard normal deviate from a -c specified back transform table and option for the tails of the -c distribution. Call once with "first" set to true then set to false -c unless one of the options for the tail changes. -c -c -c -c INPUT VARIABLES: -c -c vrgs normal score value to be back transformed -c nt number of values in the back transform tbale -c vr(nt) original data values that were transformed -c vrg(nt) the corresponding transformed values -c zmin,zmax limits possibly used for linear or power model -c ltail option to handle values less than vrg(1): -c ltpar parameter required for option ltail -c utail option to handle values greater than vrg(nt): -c utpar parameter required for option utail -c -c -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(EPSLON=1.0e-20) - dimension vr(nt),vrg(nt) - real*8 ltpar,utpar,lambda - integer ltail,utail -c -c Value in the lower tail? 1=linear, 2=power, (3 and 4 are invalid): -c - if(vrgs.le.vrg(1)) then - backtr = vr(1) - cdflo = gcum(vrg(1)) - cdfbt = gcum(vrgs) - if(ltail.eq.1) then - backtr = powint(0.d0,cdflo,zmin,vr(1),cdfbt,1.0) - else if(ltail.eq.2) then - cpow = 1.0 / ltpar - backtr = powint(0.d0,cdflo,zmin,vr(1),cdfbt,cpow) - endif -c -c Value in the upper tail? 1=linear, 2=power, 4=hyperbolic: -c - else if(vrgs.ge.vrg(nt)) then - backtr = vr(nt) - cdfhi = gcum(vrg(nt)) - cdfbt = gcum(vrgs) - if(utail.eq.1) then - backtr = powint(cdfhi,1.0,vr(nt),zmax,cdfbt,1.0) - else if(utail.eq.2) then - cpow = 1.0 / utpar - backtr = powint(cdfhi,1.0,vr(nt),zmax,cdfbt,cpow) - else if(utail.eq.4) then - lambda = (vr(nt)**utpar)*(1.0-gcum(vrg(nt))) - backtr = (lambda/(1.0-gcum(vrgs)))**(1.0/utpar) - endif - else -c -c Value within the transformation table: -c - call locate(vrg,nt,1,nt,vrgs,j) - j = max(min((nt-1),j),1) - backtr = powint(vrg(j),vrg(j+1),vr(j),vr(j+1),vrgs,1.0) - endif - return - end diff --git a/Src/Extern/gslib/beyond.f b/Src/Extern/gslib/beyond.f deleted file mode 100644 index 0f85ca61d..000000000 --- a/Src/Extern/gslib/beyond.f +++ /dev/null @@ -1,367 +0,0 @@ - subroutine beyond(ivtype,nccut,ccut,ccdf,ncut,cut,cdf,zmin,zmax, - + ltail,ltpar,middle,mpar,utail,utpar,zval,cdfval,ierr) -c----------------------------------------------------------------------- -c -c Go Beyond a Discrete CDF -c ************************ -c -c This subroutine is a general purpose subroutine to interpolate within -c and extrapolate beyond discrete points on a conditional CDF. If the -c Z value "zval" is specified then the corresponding CDF value "cdfval" -c will be computed, if the CDF value "cdfval" is specified the -c corresponding Z value "zval" will be computed. -c -c -c -c INPUT/OUTPUT VARIABLES: -c -c ivtype variable type (1=continuous, 0=categorical) -c nccut number of cutoffs defining the conditional CDF -c ccut() real array of the nccut cutoffs -c ccdf() real array of the conditional cdf values -c ncut number of cutoffs defining the global CDF -c cut() real array of the ncut cutoffs -c cdf() real array of the global cdf values -c -c zmin,zmax minimum and maximum allowable data values -c ltail option to handle values in lower tail -c ltpar parameter required for option ltail -c middle option to handle values in the middle -c mpar parameter required for option middle -c utail option to handle values in upper tail -c utpar parameter required for option utail -c -c zval interesting cutoff (if -1 then it is calculated) -c cdfval interesting CDF (if -1 then it is calculated) -c -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(EPSLON=1.0e-20,UNEST=-1.0) - dimension ccut(nccut),ccdf(nccut),cut(1),cdf(1) - real*8 utpar,mpar,ltpar,lambda - integer ltail,utail,middle,cclow,cchigh -c -c Check for both "zval" and "cdfval" defined or undefined: -c - ierr = 1 - if(zval.gt.UNEST.and.cdfval.gt.UNEST) return - if(zval.le.UNEST.and.cdfval.le.UNEST) return -c -c Handle the case of a categorical variable: -c - if(ivtype.eq.0) then - cum = 0 - do i=1,nccut - cum = cum + ccdf(i) - if(cdfval.le.cum) then - zval = ccut(i) - return - endif - end do - return - end if -c -c Figure out what part of distribution: ipart = 0 - lower tail -c ipart = 1 - middle -c ipart = 2 - upper tail - ierr = 0 - ipart = 1 - if(zval.gt.UNEST) then - if(zval.le.ccut(1)) ipart = 0 - if(zval.ge.ccut(nccut)) ipart = 2 - else - if(cdfval.le.ccdf(1)) ipart = 0 - if(cdfval.ge.ccdf(nccut)) ipart = 2 - endif -c -c ARE WE IN THE LOWER TAIL? -c - if(ipart.eq.0) then - if(ltail.eq.1) then -c -c Straight Linear Interpolation: -c - powr = 1.0 - if(zval.gt.UNEST) then - cdfval = powint(zmin,ccut(1),0.d0,ccdf(1), - + zval,powr) - else - zval = powint(0.d0,ccdf(1),zmin,ccut(1), - + cdfval,powr) - endif - else if(ltail.eq.2) then -c -c Power Model interpolation to lower limit "zmin"? -c - if(zval.gt.UNEST) then - cdfval = powint(zmin,ccut(1),0.d0,ccdf(1), - + zval,ltpar) - else - powr = 1.0 / ltpar - zval = powint(0.d0,ccdf(1),zmin,ccut(1), - + cdfval,powr) - endif -c -c Linear interpolation between the rescaled global cdf? -c - else if(ltail.eq.3) then - if(zval.gt.UNEST) then -c -c Computing the cdf value. Locate the point and the class bound: -c - call locate(cut,ncut,1,ncut,zval,idat) - call locate(cut,ncut,1,ncut,ccut(1),iupp) -c -c Straight linear interpolation if no data; otherwise, linear: -c - if(idat.le.0.or.idat.ge.ncut.or. - + iupp.le.0.or.iupp.ge.ncut) then - cdfval = powint(zmin,cut(1),0.d0,cdf(1), - + zval,1.) - else - temp = powint(cut(idat),cut(idat+1), - + cdf(idat),cdf(idat+1),zval,1.) - cdfval = temp*ccdf(1)/cdf(iupp) - endif - else -c -c Computing Z value: Are there any data out in the tail? -c - call locate(cut,ncut,1,ncut,ccut(1),iupp) -c -c Straight linear interpolation if no data; otherwise, local linear -c interpolation: -c - if(iupp.le.0.or.iupp.ge.ncut) then - zval = powint(0.d0,cdf(1),zmin,cut(1), - + cdfval,1.) - else - temp = cdfval*cdf(iupp)/ccdf(1) - call locate(cdf,ncut,1,ncut,temp,idat) - if(idat.le.0.or.idat.ge.ncut) then - zval = powint(0.d0,cdf(1),zmin, - + cut(1),cdfval,1.) - else - zval = powint(cdf(idat),cdf(idat+1), - + cut(idat),cut(idat+1),temp,1.) - end if - endif - endif - else -c -c Error situation - unacceptable option: -c - ierr = 2 - return - endif - endif -c -c FINISHED THE LOWER TAIL, ARE WE IN THE MIDDLE? -c - if(ipart.eq.1) then -c -c Establish the lower and upper limits: -c - if(zval.gt.UNEST) then - call locate(ccut,nccut,1,nccut,zval,cclow) - else - call locate(ccdf,nccut,1,nccut,cdfval,cclow) - endif - cchigh = cclow + 1 - if(middle.eq.1) then -c -c Straight Linear Interpolation: -c - powr = 1.0 - if(zval.gt.UNEST) then - cdfval = powint(ccut(cclow),ccut(cchigh), - + ccdf(cclow),ccdf(cchigh),zval,powr) - else - zval = powint(ccdf(cclow),ccdf(cchigh), - + ccut(cclow),ccut(cchigh),cdfval,powr) - endif -c -c Power interpolation between class bounds? -c - else if(middle.eq.2) then - if(zval.gt.UNEST) then - cdfval = powint(ccut(cclow),ccut(cchigh), - + ccdf(cclow),ccdf(cchigh),zval,mpar) - else - powr = 1.0 / mpar - zval = powint(ccdf(cclow),ccdf(cchigh), - + ccut(cclow),ccut(cchigh),cdfval,powr) - endif -c -c Linear interpolation between the rescaled global cdf? -c - else if(middle.eq.3) then - call locate(cut,ncut,1,ncut,ccut(cclow),ilow) - call locate(cut,ncut,1,ncut,ccut(cchigh),iupp) - if(cut(ilow).lt.ccut(cclow)) ilow = ilow + 1 - if(cut(iupp).gt.ccut(cchigh)) iupp = iupp - 1 - if(zval.gt.UNEST) then - call locate(cut,ncut,1,ncut,zval,idat) -c -c Straight linear interpolation if no data; otherwise, local linear -c interpolation: -c - if(idat.le.0.or.idat.ge.ncut.or. - + ilow.le.0.or.ilow.ge.ncut.or. - + iupp.le.0.or.iupp.ge.ncut.or. - + iupp.le.ilow) then - cdfval=powint(ccut(cclow),ccut(cchigh), - + ccdf(cclow),ccdf(cchigh),zval,1.) - else - temp = powint(cut(idat),cut(idat+1), - + cdf(idat),cdf(idat+1),zval,1.) - cdfval=powint(cdf(ilow),cdf(iupp), - + ccdf(cclow),ccdf(cchigh),temp,1.) - endif - else -c -c Straight linear interpolation if no data; otherwise, local linear -c interpolation: -c - if(ilow.le.0.or.ilow.ge.ncut.or. - + iupp.le.0.or.iupp.ge.ncut.or. - + iupp.le.ilow) then - zval=powint(ccdf(cclow),ccdf(cchigh), - + ccut(cclow),ccut(cchigh),cdfval,1.) - else - temp=powint(ccdf(cclow),ccdf(cchigh), - + cdf(ilow),cdf(iupp),cdfval,1.) - call locate(cdf,ncut,1,ncut,temp,idat) - if(cut(idat).lt.ccut(cclow)) idat=idat+1 - if(idat.le.0.or.idat.ge.ncut.or. - + cut(idat+1).gt.ccut(cchigh)) then - zval = powint(ccdf(cclow), - + ccdf(cchigh),ccut(cclow), - + ccut(cchigh),cdfval,1.) - else - zval = powint(cdf(idat),cdf(idat+1), - + cut(idat),cut(idat+1),temp,1.) - end if - zval = powint(cdf(idat),cdf(idat+1), - + cut(idat),cut(idat+1),temp,1.) - endif - endif - else -c -c Error situation - unacceptable option: -c - ierr = 2 - return - endif - endif -c -c FINISHED THE MIDDLE, ARE WE IN THE UPPER TAIL? -c - if(ipart.eq.2) then - if(utail.eq.1) then - powr = 1.0 - if(zval.gt.UNEST) then - cdfval = powint(ccut(nccut),zmax,ccdf(nccut), - + 1.0,zval,powr) - else - zval = powint(ccdf(nccut),1.0,ccut(nccut), - + zmax,cdfval,powr) - endif - - else if(utail.eq.2) then -c -c Power interpolation to upper limit "utpar"? -c - if(zval.gt.UNEST) then - cdfval = powint(ccut(nccut),zmax,ccdf(nccut), - + 1.0,zval,utpar) - else - powr = 1.0 / utpar - zval = powint(ccdf(nccut),1.0,ccut(nccut), - + zmax,cdfval,powr) - endif -c -c Linear interpolation between the rescaled global cdf? -c - else if(utail.eq.3) then - if(zval.gt.UNEST) then -c -c Approximately Locate the point and the class bound: -c - call locate(cut,ncut,1,ncut,zval,idat) - call locate(cut,ncut,1,ncut,ccut(nccut),ilow) - if(cut(idat).lt.zval) idat = idat + 1 - if(cut(ilow).lt.ccut(nccut)) ilow = ilow + 1 -c -c Straight linear interpolation if no data; otherwise, local linear -c interpolation: -c - if(idat.le.0.or.idat.ge.ncut.or. - + ilow.le.0.or.ilow.ge.ncut) then - cdfval = powint(ccut(nccut),zmax, - + ccdf(nccut),1.0,zval,1.) - else - temp = powint(cut(idat),cut(idat+1), - + cdf(idat),cdf(idat+1),zval,1.) - cdfval = powint(cdf(ilow),1.0, - + ccdf(nccut),1.0,temp,1.) - endif - else -c -c Computing Z value: Are there any data out in the tail? -c - call locate(cut,ncut,1,ncut,ccut(nccut),ilow) - if(cut(ilow).lt.ccut(nccut)) ilow = ilow + 1 -c -c Straight linear interpolation if no data; otherwise, local linear -c interpolation: -c - if(ilow.le.0.or.ilow.ge.ncut) then - zval = powint(ccdf(nccut),1.0, - + ccut(nccut),zmax,cdfval,1.) - else - temp = powint(ccdf(nccut),1.0, - + cdf(ilow),1.0,cdfval,1.) - call locate(cdf,ncut,1,ncut,temp,idat) - if(cut(idat).lt.ccut(nccut)) idat=idat+1 - if(idat.ge.ncut) then - zval = powint(ccdf(nccut),1.0, - + ccut(nccut),zmax,cdfval,1.) - else - zval = powint(cdf(idat),cdf(idat+1), - + cut(idat),cut(idat+1),temp,1.) - endif - endif - endif -c -c Fit a Hyperbolic Distribution? -c - else if(utail.eq.4) then -c -c Figure out "lambda" and required info: -c - lambda = (ccut(nccut)**utpar)*(1.0-ccdf(nccut)) - if(zval.gt.UNEST) then - cdfval = 1.0 - (lambda/(zval**utpar)) - else - zval = (lambda/(1.0-cdfval))**(1.0/utpar) - endif - else -c -c Error situation - unacceptable option: -c - ierr = 2 - return - endif - endif - if(zval.lt.zmin) zval = zmin - if(zval.gt.zmax) zval = zmax -c -c All finished - return: -c - return - end diff --git a/Src/Extern/gslib/blue.f b/Src/Extern/gslib/blue.f deleted file mode 100644 index dc7eafa90..000000000 --- a/Src/Extern/gslib/blue.f +++ /dev/null @@ -1,38 +0,0 @@ - subroutine blue(value,hexrep,bfrac) -c----------------------------------------------------------------------- -c -c Provided with a real value ``value'' this subroutine returns the blue -c portion of the color specification. -c -c Note common block "color" and call to "hexa" -c -c----------------------------------------------------------------------- - real*8 value - character hexrep*2,hexa*2 - common /color/ cmin,cmax,cint(4),cscl - hexrep = '00' - if(value.lt.cint(2))then -c -c Scale it between (255,255): -c - integ = 255 - else if((value.ge.cint(2)).and.(value.lt.cint(3)))then -c -c Scale it between (255,0): -c - integ = int((cint(3)-value)/(cint(3)-cint(2))*255.) - if(integ.gt.255) integ = 255 - if(integ.lt.0) integ = 0 - else if(value.ge.cint(3))then -c -c Scale it between (0,0): -c - integ = 0 - end if -c -c Establish coding and return: -c - bfrac = real(integ) / 255. - hexrep = hexa(integ) - return - end diff --git a/Src/Extern/gslib/chknam.f b/Src/Extern/gslib/chknam.f deleted file mode 100644 index 30c6729d0..000000000 --- a/Src/Extern/gslib/chknam.f +++ /dev/null @@ -1,61 +0,0 @@ - subroutine chknam(str,len) -c----------------------------------------------------------------------- -c -c Check for a Valid File Name -c *************************** -c -c This subroutine takes the character string "str" of length "len" and -c removes all leading blanks and blanks out all characters after the -c first blank found in the string (leading blanks are removed first). -c -c -c -c----------------------------------------------------------------------- - parameter (MAXLEN=512) - character str(MAXLEN)*1 -c -c Find first two blanks and blank out remaining characters: -c - do i=1,len-1 - if(str(i) .eq.' '.and. - + str(i+1).eq.' ') then - do j=i+1,len - str(j) = ' ' - end do - go to 2 - end if - end do - 2 continue -c -c Look for "-fi" for file -c - do i=1,len-2 - if(str(i) .eq.'-'.and. - + str(i+1).eq.'f'.and. - + str(i+2).eq.'i') then - do j=i+1,len - str(j) = ' ' - end do - go to 3 - end if - end do - 3 continue -c -c Look for "\fi" for file -c - do i=1,len-2 - if((str(i) .eq. '\\').and. - + (str(i+1).eq. 'f').and. - + (str(i+2).eq. 'i')) then - do j=i+1,len - str(j) = ' ' - end do - go to 4 - end if - end do - 4 continue -c -c Return with modified file name: -c - return - end diff --git a/Src/Extern/gslib/chktitle.f b/Src/Extern/gslib/chktitle.f deleted file mode 100644 index b8d4af243..000000000 --- a/Src/Extern/gslib/chktitle.f +++ /dev/null @@ -1,70 +0,0 @@ - subroutine chktitle(str,len) -c----------------------------------------------------------------------- -c -c Check for a Valid Title -c *********************** -c -c This subroutine takes the character string "str" of length "len" and -c blanks out all characters after the first back slash -c -c -c -c----------------------------------------------------------------------- - parameter (MAXLEN=132) - character str(MAXLEN)*1,strl*132 -c -c Remove leading blanks: -c - do i=1,len-1 - if(str(i).ne.' ') then - if(i.eq.1) go to 1 - do j=1,len-i+1 - k = j + i - 1 - str(j) = str(k) - end do - do j=len,len-i+2,-1 - str(j) = ' ' - end do - go to 1 - end if - end do - 1 continue -c -c Find first back slash and blank out the remaining characters: -c - do i=1,len-1 - if(str(i).eq.'\\') then - do j=i,len - str(j) = ' ' - end do - go to 2 - end if - end do - 2 continue -c -c Although inefficient, copy the string: -c - do i=1,len - strl(i:i) = str(i) - end do -c -c Look for a five character pattern with -Titl... -c - do i=1,len-5 - if(strl(i:i+4).eq.'-Titl'.or. - + strl(i:i+4).eq.'-titl'.or. - + strl(i:i+4).eq.'-TITL'.or. - + strl(i:i+4).eq.'-X la'.or. - + strl(i:i+4).eq.'-Y la') then - do j=i,len - str(j) = ' ' - end do - go to 3 - end if - end do - 3 continue -c -c Return with modified character string: -c - return - end diff --git a/Src/Extern/gslib/cova3.f b/Src/Extern/gslib/cova3.f deleted file mode 100644 index d67ad8d0f..000000000 --- a/Src/Extern/gslib/cova3.f +++ /dev/null @@ -1,131 +0,0 @@ - subroutine cova3(x1,y1,z1,x2,y2,z2,ivarg,nst,MAXNST,c0,it,cc,aa, - + irot,MAXROT,rotmat,cmax,cova) -c----------------------------------------------------------------------- -c -c Covariance Between Two Points -c ***************************** -c -c This subroutine calculated the covariance associated with a variogram -c model specified by a nugget effect and nested varigoram structures. -c The anisotropy definition can be different for each nested structure. -c -c -c -c INPUT VARIABLES: -c -c x1,y1,z1 coordinates of first point -c x2,y2,z2 coordinates of second point -c nst(ivarg) number of nested structures (maximum of 4) -c ivarg variogram number (set to 1 unless doing cokriging -c or indicator kriging) -c MAXNST size of variogram parameter arrays -c c0(ivarg) isotropic nugget constant -c it(i) type of each nested structure: -c 1. spherical model of range a; -c 2. exponential model of parameter a; -c i.e. practical range is 3a -c 3. gaussian model of parameter a; -c i.e. practical range is a*sqrt(3) -c 4. power model of power a (a must be gt. 0 and -c lt. 2). if linear model, a=1,c=slope. -c 5. hole effect model -c cc(i) multiplicative factor of each nested structure. -c (sill-c0) for spherical, exponential,and gaussian -c slope for linear model. -c aa(i) parameter "a" of each nested structure. -c irot index of the rotation matrix for the first nested -c structure (the second nested structure will use -c irot+1, the third irot+2, and so on) -c MAXROT size of rotation matrix arrays -c rotmat rotation matrices -c -c -c OUTPUT VARIABLES: -c -c cmax maximum covariance -c cova covariance between (x1,y1,z1) and (x2,y2,z2) -c -c -c -c EXTERNAL REFERENCES: sqdist computes anisotropic squared distance -c rotmat computes rotation matrix for distance -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(PI=3.14159265,PMX=999.,EPSLON=1.e-5) - integer nst(*),it(*) - real*8 c0(*),cc(*),aa(*) - real*8 rotmat(MAXROT,3,3),hsqd,sqdist -c -c Calculate the maximum covariance value (used for zero distances and -c for power model covariance): -c - istart = 1 + (ivarg-1)*MAXNST - cmax = c0(ivarg) - do is=1,nst(ivarg) - ist = istart + is - 1 - if(it(ist).eq.4) then - cmax = cmax + PMX - else - cmax = cmax + cc(ist) - endif - end do -c -c Check for "zero" distance, return with cmax if so: -c - hsqd = sqdist(x1,y1,z1,x2,y2,z2,irot,MAXROT,rotmat) - if(real(hsqd).lt.EPSLON) then - cova = cmax - return - endif -c -c Loop over all the structures: -c - cova = 0.d0 - do is=1,nst(ivarg) - ist = istart + is - 1 -c -c Compute the appropriate distance: -c - if(ist.ne.1) then - ir = min((irot+is-1),MAXROT) - hsqd=sqdist(x1,y1,z1,x2,y2,z2,ir,MAXROT,rotmat) - end if - h = real(dsqrt(hsqd)) -c -c Spherical Variogram Model? -c - if(it(ist).eq.1) then - hr = h/aa(ist) - if(hr.lt.1.) cova=cova+cc(ist)*(1.-hr*(1.5-.5*hr*hr)) -c -c Exponential Variogram Model? -c - else if(it(ist).eq.2) then - cova = cova + cc(ist)*exp(-3.0*h/aa(ist)) -c -c Gaussian Variogram Model? -c - else if(it(ist).eq.3) then - cova = cova + cc(ist)*exp(-3.*(h/aa(ist))*(h/aa(ist))) -c -c Power Variogram Model? -c - else if(it(ist).eq.4) then - cova = cova + cmax - cc(ist)*(h**aa(ist)) -c -c Hole Effect Model? -c - else if(it(ist).eq.5) then -c d = 10.0 * aa(ist) -c cova = cova + cc(ist)*exp(-3.0*h/d)*cos(h/aa(ist)*PI) - cova = cova + cc(ist)*cos(h/aa(ist)*PI) - endif - end do -c -c Finished: -c - return - end diff --git a/Src/Extern/gslib/dlocate.f b/Src/Extern/gslib/dlocate.f deleted file mode 100644 index c3f82cb30..000000000 --- a/Src/Extern/gslib/dlocate.f +++ /dev/null @@ -1,43 +0,0 @@ - subroutine dlocate(xx,n,is,ie,x,j) -c----------------------------------------------------------------------- -c -c Given an array "xx" of length "n", and given a value "x", this routine -c returns a value "j" such that "x" is between xx(j) and xx(j+1). xx -c must be monotonic, either increasing or decreasing. j=0 or j=n is -c returned to indicate that x is out of range. -c -c Modified to set the start and end points by "is" and "ie" -c -c Bisection Concept From "Numerical Recipes", Press et. al. 1986 pp 90. -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - dimension xx(n) -c -c Initialize lower and upper methods: -c - jl = is-1 - ju = ie -c -c If we are not done then compute a midpoint: -c - 10 if(ju-jl.gt.1) then - jm = (ju+jl)/2 -c -c Replace the lower or upper limit with the midpoint: -c - if((xx(ie).gt.xx(is)).eqv.(x.gt.xx(jm))) then - jl = jm - else - ju = jm - endif - go to 10 - endif -c -c Return with the array index: -c - j = jl - return - end diff --git a/Src/Extern/gslib/dpowint.f b/Src/Extern/gslib/dpowint.f deleted file mode 100644 index 934417772..000000000 --- a/Src/Extern/gslib/dpowint.f +++ /dev/null @@ -1,22 +0,0 @@ - double precision function dpowint(xlow,xhigh,ylow,yhigh,xval,pow) -c----------------------------------------------------------------------- -c -c Power interpolate the value of y between (xlow,ylow) and (xhigh,yhigh) -c for a value of x and a power pow. -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(EPSLON=1.0e-20) - - if((xhigh-xlow).lt.EPSLON) then - dpowint = (yhigh+ylow)/2.0 - else - dpowint = ylow + (yhigh-ylow)* - + (((xval-xlow)/(xhigh-xlow))**pow) - end if - - return - end diff --git a/Src/Extern/gslib/dsortem.f b/Src/Extern/gslib/dsortem.f deleted file mode 100644 index eb5a26444..000000000 --- a/Src/Extern/gslib/dsortem.f +++ /dev/null @@ -1,226 +0,0 @@ - subroutine dsortem(ib,ie,a,iperm,b,c,d,e,f,g,h) -c----------------------------------------------------------------------- -c -c Quickersort Subroutine -c ********************** -c -c This is a subroutine for sorting a real array in ascending order. This -c is a Fortran translation of algorithm 271, quickersort, by R.S. Scowen -c in collected algorithms of the ACM. -c -c The method used is that of continually splitting the array into parts -c such that all elements of one part are less than all elements of the -c other, with a third part in the middle consisting of one element. An -c element with value t is chosen arbitrarily (here we choose the middle -c element). i and j give the lower and upper limits of the segment being -c split. After the split a value q will have been found such that -c a(q)=t and a(l)<=t<=a(m) for all i<=l7 no other array is permuted. -c -c b,c,d,e,f,g,h arrays to be permuted according to array a. -c -c OUTPUT PARAMETERS: -c -c a = the array, a portion of which has been sorted. -c -c b,c,d,e,f,g,h =arrays permuted according to array a (see iperm) -c -c NO EXTERNAL ROUTINES REQUIRED: -c -c----------------------------------------------------------------------- - implicit real*8 (a-h,o-z) - dimension a(*),b(*),c(*),d(*),e(*),f(*),g(*),h(*) -c -c The dimensions for lt and ut have to be at least log (base 2) n -c - integer lt(64),ut(64),i,j,k,m,p,q -c -c Initialize: -c - j = ie - m = 1 - i = ib - iring = iperm+1 - if (iperm.gt.7) iring=1 -c -c If this segment has more than two elements we split it -c - 10 if (j-i-1) 100,90,15 -c -c p is the position of an arbitrary element in the segment we choose the -c middle element. Under certain circumstances it may be advantageous -c to choose p at random. -c - 15 p = (j+i)/2 - ta = a(p) - a(p) = a(i) - go to (21,19,18,17,16,161,162,163),iring - 163 th = h(p) - h(p) = h(i) - 162 tg = g(p) - g(p) = g(i) - 161 tf = f(p) - f(p) = f(i) - 16 te = e(p) - e(p) = e(i) - 17 td = d(p) - d(p) = d(i) - 18 tc = c(p) - c(p) = c(i) - 19 tb = b(p) - b(p) = b(i) - 21 continue -c -c Start at the beginning of the segment, search for k such that a(k)>t -c - q = j - k = i - 20 k = k+1 - if(k.gt.q) go to 60 - if(a(k).le.ta) go to 20 -c -c Such an element has now been found now search for a q such that a(q) 0 then transformation table will be written -c -c -c -c OUTPUT VARIABLES: -c -c vrg(nd) normal scores -c ierror error flag (0=error free,1=problem) -c -c -c -c EXTERNAL REFERENCES: -c -c gauinv Calculates the inverse of a Gaussian cdf -c sortem sorts a number of arrays according to a key array -c -c -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(EPSLON=1.0e-20) - real*8 vr(nd),wt(nd),vrg(nd),tmp(nd) - real*8 pd -c -c Sort the data in ascending order and calculate total weight: -c - ierror = 0 - twt = 0.d0 - do i=1,nd - tmp(i) = real(i) - if(vr(i).ge.tmin.and.vr(i).lt.tmax) then - if(iwt.eq.0) then - twt = twt + 1. - else - twt = twt + wt(i) - end if - end if - end do - if(nd.lt.1.or.twt.lt.EPSLON) then - ierror = 1 - return - end if - call sortem(1,nd,vr,2,wt,tmp,d,e,f,g,h) -c -c Compute the cumulative probabilities: -c - oldcp = 0.d0 - cp = 0.d0 - do i=1,nd - cp = cp + wt(i) / twt - wt(i) = (cp + oldcp)/ 2.0 - oldcp = cp - call gauinv(dble(wt(i)),vrg(i),ierr) - if(lout.gt.0) write(lout,'(f12.5,1x,f12.5)') vr(i),vrg(i) - end do -c -c Get the arrays back in original order: -c - call sortem(1,nd,tmp,3,wt,vr,vrg,e,f,g,h) -c -c Finished: -c - return - end diff --git a/Src/Extern/gslib/numtext.f b/Src/Extern/gslib/numtext.f deleted file mode 100644 index fe99017a5..000000000 --- a/Src/Extern/gslib/numtext.f +++ /dev/null @@ -1,32 +0,0 @@ - subroutine numtext(value,str) -c----------------------------------------------------------------------- -c -c This subroutine will write a value into the string so that the label -c of the value can be written on the postscript file with the gramma -c of string. -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - character str*12 - real*8 test -c -c Write the number to a text string: -c - test = abs(value) - write(str,'(f12.0)') value - if(test.le.999999.0) write(str,'(f12.2)') value - if(test.le. 999.0) write(str,'(f12.3)') value - if(test.le. 0.9) write(str,'(f12.4)') value - if(test.le. 0.09) write(str,'(f12.5)') value - if(test.le. 0.009) write(str,'(f12.6)') value - if(test.le. 0.0009) write(str,'(f12.7)') value - if(test.le. 0.00009) write(str,'(f12.8)') value - if(test.le.0.000009) write(str,'(f12.9)') value - if(test.eq. 0.0) write(str,'(f12.1)') value -c -c Return with the text string containing the number: -c - return - end diff --git a/Src/Extern/gslib/ordrel.f b/Src/Extern/gslib/ordrel.f deleted file mode 100644 index 680084f64..000000000 --- a/Src/Extern/gslib/ordrel.f +++ /dev/null @@ -1,110 +0,0 @@ - subroutine ordrel(ivtype,ncut,ccdf,ccdfo,nviol,aviol,xviol) -c----------------------------------------------------------------------- -c -c Correct Order Relation Problems -c ******************************* -c -c This subroutine identifies and corrects order relation problems in a -c conditional distribution known at a specified number of cutoffs. -c -c -c -c INPUT VARIABLES: -c -c ivtype variable type (0=categorical, 1=continuous) -c ncut number of cutoffs -c ccdf(i) input ccdf values -c -c -c OUTPUT VARIABLES: -c -c ccdfo corrected ccdf values -c nviol() number of order relation violations -c aviol() average magnitude of the order relation violations -c xviol() maximum magnitude of the order relation violations -c -c -c -c PROGRAMMING NOTES: -c -c 1. the arrays ccdf1 and ccdf2 are used for temporary storage of the -c ccdf corrected sequentially upwards and downwards. The program -c execution will be stopped if the memory allocation of these two -c arrays is not sufficient. -c -c -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - - parameter(MAXCUT=100) - real*8 ccdf(*),ccdfo(*),aviol(*),xviol(*) - real*8 ccdf1(MAXCUT),ccdf2(MAXCUT) - integer nviol(*) -c -c Make sure there is enough temporary storage: -c - if(ncut.gt.MAXCUT) then - write(*,100) MAXCUT,ncut - 100 format('There is not enough temporary storage allocated' - + ,/,'in subroutine ordrel: increase and recompile' - + ,/,' available = ',i3 - + ,/,' required = ',i3) - stop - endif -c -c Make sure conditional cdf is within [0,1]: -c - do i=1,ncut - if(ccdf(i).lt.0.d0) then - ccdf1(i) = 0.d0 - ccdf2(i) = 0.d0 - else if(ccdf(i).gt.1.0) then - ccdf1(i) = 1.0 - ccdf2(i) = 1.0 - else - ccdf1(i) = ccdf(i) - ccdf2(i) = ccdf(i) - endif - end do -c -c Correct sequentially up, then down, and then average: -c - if(ivtype.eq.0) then - sumcdf = 0.d0 - do i=1,ncut - sumcdf = sumcdf + ccdf1(i) - end do - if(sumcdf.le.0.d0) sumcdf = 1.0 - do i=1,ncut - ccdfo(i) = ccdf1(i) / sumcdf - end do - else - do i=2,ncut - if(ccdf1(i).lt.ccdf1(i-1)) ccdf1(i) = ccdf1(i-1) - end do - do i=ncut-1,1,-1 - if(ccdf2(i).gt.ccdf2(i+1)) ccdf2(i) = ccdf2(i+1) - end do - do i=1,ncut - ccdfo(i) = 0.5*(ccdf1(i)+ccdf2(i)) - end do - end if -c -c Accumulate error statistics: -c - do i=1,ncut - if(ccdf(i).ne.ccdfo(i)) then - viol = abs(ccdf(i)-ccdfo(i)) - nviol(i) = nviol(i) + 1 - aviol(i) = aviol(i) + viol - xviol(i) = max(xviol(i),viol) - endif - end do -c -c Return with corrected CDF: -c - return - end diff --git a/Src/Extern/gslib/picksupr.f b/Src/Extern/gslib/picksupr.f deleted file mode 100644 index ddb5956bd..000000000 --- a/Src/Extern/gslib/picksupr.f +++ /dev/null @@ -1,100 +0,0 @@ - subroutine picksup(nxsup,xsizsup,nysup,ysizsup,nzsup,zsizsup, - + irot,MAXROT,rotmat,radsqd,nsbtosr,ixsbtosr, - + iysbtosr,izsbtosr) -c----------------------------------------------------------------------- -c -c Establish Which Super Blocks to Search -c ************************************** -c -c This subroutine establishes which super blocks must be searched given -c that a point being estimated/simulated falls within a super block -c centered at 0,0,0. -c -c -c -c INPUT VARIABLES: -c -c nxsup,xsizsup Definition of the X super block grid -c nysup,ysizsup Definition of the Y super block grid -c nzsup,zsizsup Definition of the Z super block grid -c irot index of the rotation matrix for searching -c MAXROT size of rotation matrix arrays -c rotmat rotation matrices -c radsqd squared search radius -c -c -c -c OUTPUT VARIABLES: -c -c nsbtosr Number of super blocks to search -c ixsbtosr X offsets for super blocks to search -c iysbtosr Y offsets for super blocks to search -c izsbtosr Z offsets for super blocks to search -c -c -c -c EXTERNAL REFERENCES: -c -c sqdist Computes anisotropic squared distance -c -c -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - real*8 rotmat(MAXROT,3,3),hsqd,sqdist,shortest - integer ixsbtosr(*),iysbtosr(*),izsbtosr(*) -c -c MAIN Loop over all possible super blocks: -c - nsbtosr = 0 - do i=-(nxsup-1),(nxsup-1) - do j=-(nysup-1),(nysup-1) - do k=-(nzsup-1),(nzsup-1) - xo = real(i)*xsizsup - yo = real(j)*ysizsup - zo = real(k)*zsizsup -c -c Find the closest distance between the corners of the super blocks: -c - shortest = 1.0e21 - do i1=-1,1 - do j1=-1,1 - do k1=-1,1 - do i2=-1,1 - do j2=-1,1 - do k2=-1,1 - if(i1.ne.0.and.j1.ne.0.and.k1.ne.0.and. - + i2.ne.0.and.j2.ne.0.and.k2.ne.0) then - xdis = real(i1-i2)*0.5*xsizsup + xo - ydis = real(j1-j2)*0.5*ysizsup + yo - zdis = real(k1-k2)*0.5*zsizsup + zo - hsqd = sqdist(0.d0,0.d0,0.d0,xdis,ydis, - + ydis,irot,MAXROT,rotmat) - if(hsqd.lt.shortest) shortest = hsqd - end if - end do - end do - end do - end do - end do - end do -c -c Keep this super block if it is close enoutgh: -c - if(real(shortest).le.radsqd) then - nsbtosr = nsbtosr + 1 - ixsbtosr(nsbtosr) = i - iysbtosr(nsbtosr) = j - izsbtosr(nsbtosr) = k - end if - end do - end do - end do -c -c Finished: -c - return - end diff --git a/Src/Extern/gslib/powint.f b/Src/Extern/gslib/powint.f deleted file mode 100644 index 7f65d42c8..000000000 --- a/Src/Extern/gslib/powint.f +++ /dev/null @@ -1,22 +0,0 @@ - real function powint(xlow,xhigh,ylow,yhigh,xval,pow) -c----------------------------------------------------------------------- -c -c Power interpolate the value of y between (xlow,ylow) and (xhigh,yhigh) -c for a value of x and a power pow. -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(EPSLON=1.0e-20) - - if((xhigh-xlow).lt.EPSLON) then - powint = (yhigh+ylow)/2.0 - else - powint = ylow + (yhigh-ylow)* - + (((xval-xlow)/(xhigh-xlow))**pow) - end if - - return - end diff --git a/Src/Extern/gslib/psfill.f b/Src/Extern/gslib/psfill.f deleted file mode 100644 index 6218a27c4..000000000 --- a/Src/Extern/gslib/psfill.f +++ /dev/null @@ -1,65 +0,0 @@ - subroutine psfill(np,x,y,lwidt,gray) -c----------------------------------------------------------------------- -c -c -c CALLING ARGUMENTS: -c -c x X location of the center of the box -c y Y location of the center of the box -c np number of points -c lwidt The width of the line (1.0 = dark, 0.5 = light) -c gray the grayness of the fill area -c -c NOTES: -c -c 1. The pxmin,pxmax,.. variables are in the standard 1/72 inch -c resolution of the postscript page. If a different scale is -c going to be used in the printing set pscl to the scale. -c -c -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(EPSLON=0.0001) - real*8 lwidt,x(1),y(1) -c -c Common Block for Postscript Output Unit and Scaling: -c - common /psdata/ pscl,pxmin,pxmax,pymin,pymax,xmin, - + xmax,ymin,ymax,lpsout -c -c Change the line width: -c - if(pscl.lt.0.01) pscl = 1.0 - width = lwidt/pscl - write(lpsout,103) width -c -c Start a new path and loop through the points: -c - write(lpsout,100) - do i=1,np - ix = int(resc(xmin,xmax,pxmin,pxmax,x(i))/pscl) - iy = int(resc(ymin,ymax,pymin,pymax,y(i))/pscl) - if(i.eq.1) then - write(lpsout,101) ix,iy - else - write(lpsout,102) ix,iy - endif - end do - if(lwidt.le.EPSLON) then - write(lpsout,104) gray - else - write(lpsout,105) gray - endif - 100 format('n') - 101 format(i5,1x,i5,1x,'m') - 102 format(i5,1x,i5,1x,'l') - 103 format(f6.3,' setlinewidth') - 104 format('c',/,f4.2,' setgray',/,'fill',/,'0.0 setgray') - 105 format('c gsave ',/,f4.2,' setgray',/,'fill',/,'grestore s', - + /,'0.00 setgray') - return - end diff --git a/Src/Extern/gslib/psline.f b/Src/Extern/gslib/psline.f deleted file mode 100644 index 9d2e8b8b0..000000000 --- a/Src/Extern/gslib/psline.f +++ /dev/null @@ -1,86 +0,0 @@ - subroutine psline(np,x,y,lwidt,idsh) -c----------------------------------------------------------------------- -c -c Write Postscript line commands to a file -c **************************************** -c -c -c CALLING ARGUMENTS: -c -c np the number of points in the x and y array to join -c x() array of x values in the range xmin to xmax -c y() array of y values in the range ymin to ymax -c lwidt the width of the line (1.0 = dark, 0.5 = light) -c idsh Dashing Index -c -c NOTES: -c -c 1. The pxmin,pxmax,.. variables are in the standard 1/72 inch -c resolution of the postscript page. If a different scale is -c going to be used in the printing set pscl to the scale. -c -c 2. If "idsh" is zero then no dashing is perfomed -c -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - real*8 x(*),y(*),lwidt,lwold - character dash(10)*24 -c -c Common Block for Postscript Output Unit and Scaling: -c - common /psdata/ pscl,pxmin,pxmax,pymin,pymax,xmin, - + xmax,ymin,ymax,lpsout - save lwold -c -c Dash Patterns: -c - data dash/'[40 20] 0 setdash ', - + '[13 14 13 20] 0 setdash ', - + '[12 21 4 21] 0 setdash ', - + '[10 10] 0 setdash ', - + '[20 20] 0 setdash ', - + '[30 30] 0 setdash ', - + '[40 40] 0 setdash ', - + '[50 50] 0 setdash ', - + '[50 50] 0 setdash ', - + '[50 50] 0 setdash '/ -c -c Change the line width if necessary: -c - if(pscl.lt.0.01) pscl = 1.0 - if(idsh.gt.10) idsh = 10 - if(lwidt.ne.lwold) then - width = lwidt/pscl - write(lpsout,100) width - 100 format(f6.3,' setlinewidth') - lwold = lwidt - endif -c -c Start a new path and loop through the points: -c - if(idsh.gt.0) write(lpsout,'(a24)') dash(idsh) - write(lpsout,101) - 101 format('n') - do i=1,np - ix = int(resc(xmin,xmax,pxmin,pxmax,x(i))/pscl) - iy = int(resc(ymin,ymax,pymin,pymax,y(i))/pscl) - if(i.eq.1) then - write(lpsout,102) ix,iy - 102 format(i5,1x,i5,' m') - else - write(lpsout,103) ix,iy - 103 format(i5,1x,i5,' l') - endif - end do - write(lpsout,104) - 104 format('s') - if(idsh.gt.0) write(lpsout,105) - 105 format('[] 0 setdash') -c -c Finished - Return to calling program: -c - return - end diff --git a/Src/Extern/gslib/pstext.f b/Src/Extern/gslib/pstext.f deleted file mode 100644 index 2281481c4..000000000 --- a/Src/Extern/gslib/pstext.f +++ /dev/null @@ -1,120 +0,0 @@ - subroutine pstext(xs,ys,lostr,str,tsiz,ifont,rot,iadj) -c----------------------------------------------------------------------- -c -c Write Postscript Text commands to a file -c **************************************** -c -c -c CALLING ARGUMENTS: -c -c xs starting value of x in the range xmin to xmax -c ys starting value of y in the range ymin to ymax -c lostr number of characters in str to print -c str the character string -c tsiz Text size in 1/72 of an inch -c ifont Font Number: See font number below -c rot Rotation Angle to post the text (default to 0.0) -c iadj Adjustment: 0=left adjusted, 1=centre, 2=right -c -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - character str*80,fnnt(10)*32,line*132,size*4,part1*1,part2*7 -c -c Common Block for Postscript Output Unit and Scaling: -c - common /psdata/ pscl,pxmin,pxmax,pymin,pymax,xmin, - + xmax,ymin,ymax,lpsout - save fnnt,ifold,tsold,izip -c -c Preset 10 different fonts: -c - data fnnt/'/Helvetica findfont ', - + '/Helvetica-Bold findfont ', - + '/Helvetica-BoldOblique findfont ', - + '/Times-Roman findfont ', - + '/Times-Bold findfont ', - + '/Times-Italic findfont ', - + '/Times-BoldItalic findfont ', - + '/Courier findfont ', - + '/Courier-Bold findfont ', - + '/Courier-BoldOblique findfont '/ - data ifold/0/,tsold/0.0/,izip/0/ - part1 = '(' - part2 = ') text' -c -c Remove leading and trailing blanks: -c - lost = lostr - do i=1,lostr - if(str(1:1).eq.' ') then - lost = lost - 1 - do j=1,lost - k = j + 1 - str(j:j) = str(k:k) - end do - else - go to 1 - endif - end do - 1 k = lost - do i=1,k - ix = k - i + 1 - if(str(ix:ix).ne.' ') go to 2 - lost = lost - 1 - end do - 2 if(lost.le.0) return -c -c Create line to set the text size and type: -c - if(ifont.ne.ifold.or.tsiz.ne.tsold) then - isiz=int(tsiz/pscl) - write(size,'(i4)') isiz - line=fnnt(ifont)//size//' scalefont setfont' - write(lpsout,'(a)')line(1:54) - ifold = ifont - tsold = tsiz - endif -c -c Set the correct adjustment: -c - part2(3:3) = 'l' - if(iadj.eq.1) part2(3:3) = 'c' - if(iadj.eq.2) part2(3:3) = 'r' -c -c Write the lines and position to the Postscript file: -c - ix = int((resc(xmin,xmax,pxmin,pxmax,xs))/pscl) - iy = int((resc(ymin,ymax,pymin,pymax,ys))/pscl) -c -c Rotate if Necessary: -c - line = part1//str(1:lost)//part2 - if(rot.ne.0.0) then - irot = int(rot) - write(lpsout,102) ix,iy - write(lpsout,103) irot - write(lpsout,100) izip,izip - write(lpsout,'(a)') line(1:lost+8) - ix = -1.0 * ix - iy = -1.0 * iy - irot = -1.0 * irot - write(lpsout,103) irot - write(lpsout,102) ix,iy - else -c -c Just write out the text if no rotation: -c - write(lpsout,100) ix,iy - write(lpsout,'(a)') line(1:lost+8) - endif - 100 format(i5,1x,i5,1x,'m') - 102 format(i5,1x,i5,1x,'translate') - 103 format(i5,1x,'rotate') -c -c Finished - Return to calling program: -c - return - end diff --git a/Src/Extern/gslib/rand.f b/Src/Extern/gslib/rand.f deleted file mode 100644 index bd21e1ba8..000000000 --- a/Src/Extern/gslib/rand.f +++ /dev/null @@ -1,52 +0,0 @@ - subroutine rand(seed,n,vector) -c--------------------------------------------------------------------- -c -c This random number generator generates random numbers in ]0,1[ -c Note that if the seed value is zero on the first call, a default -c value of 7931 will be used in a linear congruential generator to -c generate 55 odd integers for the array 'itab()'. These values are -c preserved by a common statement, so that they may be used in sub- -c sequent calls by setting the seed to zero.If the value of 'seed' -c is greater than zero in a call to the subroutine, then the array -c 'itab' will be initialized and a new seed value will be returned -c by the subroutine. Best results are obtained by making the initial -c call with a seed of your choice and then setting the seed to '0' -c for all subsequent calls. -c -c--------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - dimension vector(*) - common /unusual/itab(55),n1,n2,nseed - integer rn1,seed -c -c Test to see if 55 odd integers must be generated. -c - if((seed.gt.0).or.(nseed.lt.1)) then - nseed = seed - if(seed.le.0) nseed = 7931 - do i=1,55 - rn1=mod(nseed*9069,32768) - if(mod(rn1,2).eq.0) rn1 = rn1-1 - itab(i) = rn1 - nseed = rn1 - end do - n1 = 0 - n2 = 24 - endif -c -c Generate "n" random components for the vector "VECTOR" -c - do i=1,n - itab(55-n1) = mod(itab(55-n2)*itab(55-n1),32768) - vector(i) = abs(float(itab(55-n1))/float(32768)) - n1 = mod(n1+1,55) - n2 = mod(n2+1,55) - end do - if(seed.gt.0) seed=nseed -c -c Return with the vector of random numbers: -c - return - end diff --git a/Src/Extern/gslib/red.f b/Src/Extern/gslib/red.f deleted file mode 100644 index 19f18d361..000000000 --- a/Src/Extern/gslib/red.f +++ /dev/null @@ -1,45 +0,0 @@ - subroutine red(value,hexrep,rfrac) -c----------------------------------------------------------------------- -c -c Provided with a real value ``value'' this subroutine returns the red -c portion of the color specification. -c -c Note common block "color" and call to "hexa" -c -c----------------------------------------------------------------------- - real value - character hexrep*2,hexa*2 - common /color/ cmin,cmax,cint(4),cscl - hexrep='00' - if(value.lt.cint(1))then -c -c Scale it between (y0,0): -c - integ=int((cint(1)-value)/(cint(1)-cmin)*cscl) - if(integ.gt.255) integ = 255 - if(integ.lt.0) integ = 0 - else if((value.ge.cint(1)).and.(value.lt.cint(3)))then -c -c Scale it between (0,0): -c - integ = 0 - else if((value.ge.cint(3)).and.(value.lt.cint(4)))then -c -c Scale it between (0,255): -c - integ = int((value-cint(3))/(cint(4)-cint(3))*255.) - if(integ.gt.255) integ = 255 - if(integ.lt.0) integ = 0 - else if(value.ge.cint(4))then -c -c Scale it between (255,255): -c - integ = 255 - end if -c -c Establish coding and return: -c - rfrac = real(integ) / 255. - hexrep = hexa(integ) - return - end diff --git a/Src/Extern/gslib/resc.f b/Src/Extern/gslib/resc.f deleted file mode 100644 index 945247362..000000000 --- a/Src/Extern/gslib/resc.f +++ /dev/null @@ -1,14 +0,0 @@ - real function resc(xmin1,xmax1,xmin2,xmax2,x111) - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - real*8 rsc -c -c Simple linear rescaling (get a value in coordinate system "2" given -c a value in "1"): -c - rsc = dble((xmax2-xmin2)/(xmax1-xmin1)) - resc = xmin2 + real( dble(x111 - xmin1) * rsc ) - return - end diff --git a/Src/Extern/gslib/scal.f b/Src/Extern/gslib/scal.f deleted file mode 100644 index 53806be2f..000000000 --- a/Src/Extern/gslib/scal.f +++ /dev/null @@ -1,306 +0,0 @@ - subroutine scal(xmin,xmax,ymin,ymax,xaxmin,xaxmax,yaxmin, - + yaxmax,ilog,i45) -c----------------------------------------------------------------------- -c -c Draws a reasonable graph axes for a PostScript plot. The appropriate -c labelling and tic mark interval are established. -c -c INPUT VARIABLES: -c xmin - the minimum of the x axis (labeled on axis) -c xmax - the maximum of the x axis (labeled on axis) -c ymin - the minimum of the y axis (labeled on axis) -c ymax - the maximum of the y axis (labeled on axis) -c xaxmin - the minimum of the x axis (on PostScript window) -c xaxmax - the maximum of the x axis (on PostScript window) -c yaxmin - the minimum of the y axis (on PostScript window) -c yaxmax - the maximum of the y axis (on PostScript window) -c ilog - scale option: 0 - both cartesian -c 1 - semi log with x being log scale -c 2 - semi log with y being log scale -c 3 - log log with both being log scale -c i45 - 45 degree line option: 0 - no, 1 - if axes are the same -c -c -c -c----------------------------------------------------------------------- - parameter (EPS=0.001) - real xloc(5),yloc(5) - character label*8,lfmt*8 -c -c Common Block for Postscript Output Unit and Scaling: -c - common /psdata/ psscl,pxmin,pxmax,pymin,pymax,wxmin, - + wxmax,wymin,wymax,lpsout -c -c Check to make sure that the scale can be plotted: -c - if((xmax-xmin).le.0.0001.or.(ymax-ymin).le.0.0001) return -c -c Set up some of the parameters: -c - tlng = 0.013 * ((xaxmax-xaxmin) + (yaxmax-yaxmin)) - tsht = 0.007 * ((xaxmax-xaxmin) + (yaxmax-yaxmin)) - psz = 4.0 + 0.060 * (xaxmax-xaxmin) - pl1 = 0.6 + 0.005 * (xaxmax-xaxmin) - pl2 = 0.3 + 0.003 * (xaxmax-xaxmin) -c -c Draw the axis: -c - xloc(1) = xaxmin - yloc(1) = yaxmax - xloc(2) = xaxmin - yloc(2) = yaxmin - xloc(3) = xaxmax - yloc(3) = yaxmin - call psline(3,xloc,yloc,pl1,0) -c -c Show a 45 degree line? -c - if(i45.eq.1) then - if(abs(xmin-ymin).le.0.0001.and.abs(xmax-ymax).le.0.0001) then - xloc(1) = xaxmin - yloc(1) = yaxmin - xloc(2) = xaxmax - yloc(2) = yaxmax - call psline(2,xloc,yloc,pl1,0) - end if - end if -c -c CONSTRUCT THE X AXIS: -c -c -c Log scale? -c - if(ilog.eq.1.or.ilog.eq.3) then -c -c The start, end, number of log(10) cycles, the tic mark start, -c and the number of points in defining a tic mark: -c - tminx = alog10(xmin) - tmaxx = alog10(xmax) - ncyc = tmaxx - tminx - cbas = xmin/10 - yloc(1) = yaxmin - num = 2 -c -c Loop along the axis drawing the tic marks and labels: -c - do icyc=1,ncyc+1 - cbas = cbas * 10 - do i=1,9 - t1 = alog10(cbas*real(i)) - xloc(1) = resc(tminx,tmaxx,xaxmin,xaxmax,t1) - xloc(2) = xloc(1) - if(i.eq.1) then -c -c First point - long tic mark: -c - yloc(2) = yloc(1) - tlng - call psline(num,xloc,yloc,pl2,0) - yloc(2) = yloc(1) - 2.5*tlng - if(abs(t1+9.).le.EPS) label = '1.0e-9 ' - if(abs(t1+8.).le.EPS) label = '1.0e-8 ' - if(abs(t1+7.).le.EPS) label = '1.0e-7 ' - if(abs(t1+6.).le.EPS) label = '1.0e-6 ' - if(abs(t1+5.).le.EPS) label = '0.00001 ' - if(abs(t1+4.).le.EPS) label = '0.0001 ' - if(abs(t1+3.).le.EPS) label = '0.001 ' - if(abs(t1+2.).le.EPS) label = '0.01 ' - if(abs(t1+1.).le.EPS) label = '0.1 ' - if(abs(t1) .le.EPS) label = '1 ' - if(abs(t1-1.).le.EPS) label = '10 ' - if(abs(t1-2.).le.EPS) label = '100 ' - if(abs(t1-3.).le.EPS) label = '1000 ' - if(abs(t1-4.).le.EPS) label = '10000 ' - if(abs(t1-5.).le.EPS) label = '100000 ' - if(abs(t1-6.).le.EPS) label = '1.0e+6 ' - if(abs(t1-7.).le.EPS) label = '1.0e+7 ' - if(abs(t1-8.).le.EPS) label = '1.0e+8 ' - if(abs(t1-9.).le.EPS) label = '1.0e+9 ' - call pstext(xloc(1),yloc(2),8,label, - + psz,1,0.d0,1) - else -c -c Not first point - short tic mark: -c - if(icyc.le.ncyc) then - yloc(2) = yloc(1) - tsht - call psline(num,xloc,yloc,pl2,0) - endif - endif - end do - end do - else -c -c Arithmetic Scale: -c - do i=1,20 - test = (xmax-xmin)/(10.0**(6-i)) - if(test.gt.0.9) go to 1 - end do - 1 if(test.gt.3.0) zval = 1.0 - if(test.le.3.0.and.test.gt.2.0) zval = 0.5 - if(test.le.2.0.and.test.gt.1.2) zval = 0.4 - if(test.le.1.2) zval = 0.2 - nval = 5 - if(zval.eq.0.4.or.zval.eq.0.2) nval = 4 - zval = zval * 10.0**(6-i) - tval = zval / real(nval) - if(i.ge.12) lfmt = '(f8.8)' - if(i.eq.11) lfmt = '(f8.7)' - if(i.eq.10) lfmt = '(f8.6)' - if(i.eq.9) lfmt = '(f8.5)' - if(i.eq.8) lfmt = '(f8.4)' - if(i.eq.7) lfmt = '(f8.3)' - if(i.eq.6) lfmt = '(f8.2)' - if(i.eq.5) lfmt = '(f8.1)' - if(i.le.4) lfmt = '(f8.0)' -c -c Loop along the axis drawing the tic marks and labels: -c - yloc(1) = yaxmin - pos = xmin - num = 2 - do i=1,100 - yloc(2) = yaxmin - tlng - xloc(1) = resc(xmin,xmax,xaxmin,xaxmax,pos) - xloc(2) = resc(xmin,xmax,xaxmin,xaxmax,pos) - call psline(num,xloc,yloc,pl2,0) - yloc(2) = yloc(1) - 2.5*tlng - write(label,lfmt) pos - call pstext(xloc(1),yloc(2),8,label,psz,1,0.d0,1) - yloc(2) = yaxmin - tsht - do j=1,nval-1 - pos = pos + tval - if(pos.gt.xmax) go to 2 - xloc(1) = resc(xmin,xmax,xaxmin,xaxmax,pos) - xloc(2) = resc(xmin,xmax,xaxmin,xaxmax,pos) - call psline(num,xloc,yloc,pl2,0) - end do - pos = pos + tval - if(pos.gt.xmax) go to 2 - end do - 2 continue - endif -c -c CONSTRUCT THE Y AXIS: -c -c -c Log scale? -c - if(ilog.eq.2.or.ilog.eq.3) then -c -c The start, end, number of log(10) cycles, the tic mark start, -c and the number of points in defining a tic mark: -c - tminy = alog10(ymin) - tmaxy = alog10(ymax) - ncyc = tmaxy - tminy - cbas = ymin/10 - xloc(1) = xaxmin - num = 2 -c -c Loop along the axis drawing the tic marks and labels: -c - do icyc=1,ncyc+1 - cbas = cbas * 10 - do i=1,9 - t1 = alog10(cbas*real(i)) - yloc(1) = resc(tminy,tmaxy,yaxmin,yaxmax,t1) - yloc(2) = yloc(1) - if(i.eq.1) then -c -c First point - long tic mark: -c - xloc(2) = xloc(1) - tlng - call psline(num,xloc,yloc,pl2,0) - xloc(2) = xloc(2) - 0.1*tlng - if(abs(t1+9.).le.EPS) label = '1.0e-9 ' - if(abs(t1+8.).le.EPS) label = '1.0e-8 ' - if(abs(t1+7.).le.EPS) label = '1.0e-7 ' - if(abs(t1+6.).le.EPS) label = '1.0e-6 ' - if(abs(t1+5.).le.EPS) label = '0.00001 ' - if(abs(t1+4.).le.EPS) label = '0.0001 ' - if(abs(t1+3.).le.EPS) label = '0.001 ' - if(abs(t1+2.).le.EPS) label = '0.01 ' - if(abs(t1+1.).le.EPS) label = '0.1 ' - if(abs(t1) .le.EPS) label = '1 ' - if(abs(t1-1.).le.EPS) label = '10 ' - if(abs(t1-2.).le.EPS) label = '100 ' - if(abs(t1-3.).le.EPS) label = '1000 ' - if(abs(t1-4.).le.EPS) label = '10000 ' - if(abs(t1-5.).le.EPS) label = '100000 ' - if(abs(t1-6.).le.EPS) label = '1.0e+6 ' - if(abs(t1-7.).le.EPS) label = '1.0e+7 ' - if(abs(t1-8.).le.EPS) label = '1.0e+8 ' - if(abs(t1-9.).le.EPS) label = '1.0e+9 ' - call pstext(xloc(2),yloc(2),8,label, - + psz,1,0.0,2) - else -c -c Not first point - short tic mark: -c - if(icyc.le.ncyc) then - xloc(2) = xloc(1) - tsht - call psline(num,xloc,yloc,pl2,0) - endif - endif - end do - end do - else -c -c Determine a labelling and tic mark increment: -c - do i=1,20 - test = (ymax-ymin)/(10.0**(6-i)) - if(test.gt.0.9) go to 11 - end do - 11 if(test.ge.3.0) zval = 1.0 - if(test.le.3.0.and.test.gt.2.0) zval = 0.5 - if(test.le.2.0.and.test.gt.1.2) zval = 0.4 - if(test.le.1.2) zval = 0.2 - nval = 5 - if(zval.eq.0.4.or.zval.eq.0.2) nval = 4 - zval = zval * 10.0**(6-i) - tval = zval / real(nval) - if(i.ge.12) lfmt = '(f8.8)' - if(i.eq.11) lfmt = '(f8.7)' - if(i.eq.10) lfmt = '(f8.6)' - if(i.eq.9) lfmt = '(f8.5)' - if(i.eq.8) lfmt = '(f8.4)' - if(i.eq.7) lfmt = '(f8.3)' - if(i.eq.6) lfmt = '(f8.2)' - if(i.eq.5) lfmt = '(f8.1)' - if(i.le.4) lfmt = '(f8.0)' -c -c Loop along the axis drawing the tic marks and labels: -c - xloc(1) = xaxmin - pos = ymin - num = 2 - do i=1,100 - xloc(2) = xaxmin - tlng - yloc(1) = resc(ymin,ymax,yaxmin,yaxmax,pos) - yloc(2) = resc(ymin,ymax,yaxmin,yaxmax,pos) - call psline(num,xloc,yloc,pl2,0) - xloc(2) = xloc(2) - 0.2*tlng - write(label,lfmt) pos - call pstext(xloc(2),yloc(2),8,label,psz,1,0.0,2) - xloc(2) = xaxmin - tsht - do j=1,nval-1 - pos = pos + tval - if(pos.gt.ymax) go to 12 - yloc(1) = resc(ymin,ymax,yaxmin,yaxmax,pos) - yloc(2) = resc(ymin,ymax,yaxmin,yaxmax,pos) - call psline(num,xloc,yloc,pl2,0) - end do - pos = pos + tval - if(pos.gt.ymax) go to 12 - end do - 12 continue - endif -c -c Return to calling program: -c - return - end diff --git a/Src/Extern/gslib/setrot.f b/Src/Extern/gslib/setrot.f deleted file mode 100644 index 35f8b8044..000000000 --- a/Src/Extern/gslib/setrot.f +++ /dev/null @@ -1,79 +0,0 @@ - subroutine setrot(ang1,ang2,ang3,anis1,anis2,ind,MAXROT,rotmat) -c----------------------------------------------------------------------- -c -c Sets up an Anisotropic Rotation Matrix -c ************************************** -c -c Sets up the matrix to transform cartesian coordinates to coordinates -c accounting for angles and anisotropy (see manual for a detailed -c definition): -c -c -c INPUT PARAMETERS: -c -c ang1 Azimuth angle for principal direction -c ang2 Dip angle for principal direction -c ang3 Third rotation angle -c anis1 First anisotropy ratio -c anis2 Second anisotropy ratio -c ind matrix indicator to initialize -c MAXROT maximum number of rotation matrices dimensioned -c rotmat rotation matrices -c -c -c NO EXTERNAL REFERENCES -c -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - parameter(DEG2RAD=3.141592654/180.0,EPSLON=1.e-20) - real*8 rotmat(MAXROT,3,3),afac1,afac2,sina,sinb,sint, - + cosa,cosb,cost -c -c Converts the input angles to three angles which make more -c mathematical sense: -c -c alpha angle between the major axis of anisotropy and the -c E-W axis. Note: Counter clockwise is positive. -c beta angle between major axis and the horizontal plane. -c (The dip of the ellipsoid measured positive down) -c theta Angle of rotation of minor axis about the major axis -c of the ellipsoid. -c - if(ang1.ge.0.d0.and.ang1.lt.270.0) then - alpha = (90.0 - ang1) * DEG2RAD - else - alpha = (450.0 - ang1) * DEG2RAD - endif - beta = -1.0 * ang2 * DEG2RAD - theta = ang3 * DEG2RAD -c -c Get the required sines and cosines: -c - sina = dble(sin(alpha)) - sinb = dble(sin(beta)) - sint = dble(sin(theta)) - cosa = dble(cos(alpha)) - cosb = dble(cos(beta)) - cost = dble(cos(theta)) -c -c Construct the rotation matrix in the required memory: -c - afac1 = 1.0 / dble(max(anis1,EPSLON)) - afac2 = 1.0 / dble(max(anis2,EPSLON)) - rotmat(ind,1,1) = (cosb * cosa) - rotmat(ind,1,2) = (cosb * sina) - rotmat(ind,1,3) = (-sinb) - rotmat(ind,2,1) = afac1*(-cost*sina + sint*sinb*cosa) - rotmat(ind,2,2) = afac1*(cost*cosa + sint*sinb*sina) - rotmat(ind,2,3) = afac1*( sint * cosb) - rotmat(ind,3,1) = afac2*(sint*sina + cost*sinb*cosa) - rotmat(ind,3,2) = afac2*(-sint*cosa + cost*sinb*sina) - rotmat(ind,3,3) = afac2*(cost * cosb) -c -c Return to calling program: -c - return - end diff --git a/Src/Extern/gslib/setsupr.f b/Src/Extern/gslib/setsupr.f deleted file mode 100644 index 28bfc5555..000000000 --- a/Src/Extern/gslib/setsupr.f +++ /dev/null @@ -1,116 +0,0 @@ - subroutine setsupr(nx,xmn,xsiz,ny,ymn,ysiz,nz,zmn,zsiz,nd,x,y,z, - + vr,tmp,nsec,sec1,sec2,sec3,MAXSBX,MAXSBY, - + MAXSBZ,nisb,nxsup,xmnsup,xsizsup,nysup,ymnsup, - + ysizsup,nzsup,zmnsup,zsizsup) -c----------------------------------------------------------------------- -c -c Establish Super Block Search Limits and Sort Data -c ************************************************* -c -c This subroutine sets up a 3-D "super block" model and orders the data -c by super block number. The limits of the super block is set to the -c minimum and maximum limits of the grid; data outside are assigned to -c the nearest edge block. -c -c The idea is to establish a 3-D block network that contains all the -c relevant data. The data are then sorted by their index location in -c the search network, i.e., the index location is given after knowing -c the block index in each coordinate direction (ix,iy,iz): -c ii = (iz-1)*nxsup*nysup + (iy-1)*nxsup + ix -c An array, the same size as the number of super blocks, is constructed -c that contains the cumulative number of data in the model. With this -c array it is easy to quickly check what data are located near any given -c location. -c -c -c -c INPUT VARIABLES: -c -c nx,xmn,xsiz Definition of the X grid being considered -c ny,ymn,ysiz Definition of the Y grid being considered -c nz,zmn,zsiz Definition of the Z grid being considered -c nd Number of data -c x(nd) X coordinates of the data -c y(nd) Y coordinates of the data -c z(nd) Z coordinates of the data -c vr(nd) Variable at each location. -c tmp(nd) Temporary storage to keep track of the super block -c index associated to each data (uses the same -c storage already allocated for the simulation) -c nsec Number of secondary variables to carry with vr -c sec1(nd) First secondary variable (if nsec >= 1) -c sec2(nd) Second secondary variable (if nsec >= 2) -c sec3(nd) Third secondary variable (if nsec = 3) -c MAXSB[X,Y,Z] Maximum size of super block network -c -c -c -c OUTPUT VARIABLES: -c -c nisb() Array with cumulative number of data in each -c super block. -c nxsup,xmnsup,xsizsup Definition of the X super block grid -c nysup,ymnsup,ysizsup Definition of the Y super block grid -c nzsup,zmnsup,zsizsup Definition of the Z super block grid -c -c -c -c EXTERNAL REFERENCES: -c -c sortem Sorting routine to sort the data -c -c -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - real*8 x(*),y(*),z(*),vr(*),tmp(*),sec1(*),sec2(*),sec3(*) - integer nisb(*) - logical inflag -c -c Establish the number and size of the super blocks: -c - nxsup = min(nx,MAXSBX) - nysup = min(ny,MAXSBY) - nzsup = min(nz,MAXSBZ) - xsizsup = real(nx)*xsiz/real(nxsup) - ysizsup = real(ny)*ysiz/real(nysup) - zsizsup = real(nz)*zsiz/real(nzsup) - xmnsup = (xmn-0.5*xsiz)+0.5*xsizsup - ymnsup = (ymn-0.5*ysiz)+0.5*ysizsup - zmnsup = (zmn-0.5*zsiz)+0.5*zsizsup -c -c Initialize the extra super block array to zeros: -c - do i=1,nxsup*nysup*nzsup - nisb(i) = 0 - end do -c -c Loop over all the data assigning the data to a super block and -c accumulating how many data are in each super block: -c - do i=1,nd - call getindx(nxsup,xmnsup,xsizsup,x(i),ix,inflag) - call getindx(nysup,ymnsup,ysizsup,y(i),iy,inflag) - call getindx(nzsup,zmnsup,zsizsup,z(i),iz,inflag) - ii = ix + (iy-1)*nxsup + (iz-1)*nxsup*nysup - tmp(i) = ii - nisb(ii) = nisb(ii) + 1 - end do -c -c Sort the data by ascending super block number: -c - nsort = 4 + nsec - call sortem(1,nd,tmp,nsort,x,y,z,vr,sec1,sec2,sec3) -c -c Set up array nisb with the starting address of the block data: -c - do i=1,(nxsup*nysup*nzsup-1) - nisb(i+1) = nisb(i) + nisb(i+1) - end do -c -c Finished: -c - return - end diff --git a/Src/Extern/gslib/sortem.f b/Src/Extern/gslib/sortem.f deleted file mode 100644 index ce9136bb4..000000000 --- a/Src/Extern/gslib/sortem.f +++ /dev/null @@ -1,229 +0,0 @@ - subroutine sortem(ib,ie,a,iperm,b,c,d,e,f,g,h) -c----------------------------------------------------------------------- -c -c Quickersort Subroutine -c ********************** -c -c This is a subroutine for sorting a real array in ascending order. This -c is a Fortran translation of algorithm 271, quickersort, by R.S. Scowen -c in collected algorithms of the ACM. -c -c The method used is that of continually splitting the array into parts -c such that all elements of one part are less than all elements of the -c other, with a third part in the middle consisting of one element. An -c element with value t is chosen arbitrarily (here we choose the middle -c element). i and j give the lower and upper limits of the segment being -c split. After the split a value q will have been found such that -c a(q)=t and a(l)<=t<=a(m) for all i<=l7 no other array is permuted. -c -c b,c,d,e,f,g,h arrays to be permuted according to array a. -c -c OUTPUT PARAMETERS: -c -c a = the array, a portion of which has been sorted. -c -c b,c,d,e,f,g,h =arrays permuted according to array a (see iperm) -c -c NO EXTERNAL ROUTINES REQUIRED: -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - integer b(*) - dimension a(*),c(*),d(*),e(*),f(*),g(*),h(*) -c -c The dimensions for lt and ut have to be at least log (base 2) n -c - integer lt(64),ut(64),i,j,k,m,p,q -c -c Initialize: -c - j = ie - m = 1 - i = ib - iring = iperm+1 - if (iperm.gt.7) iring=1 -c -c If this segment has more than two elements we split it -c - 10 if (j-i-1) 100,90,15 -c -c p is the position of an arbitrary element in the segment we choose the -c middle element. Under certain circumstances it may be advantageous -c to choose p at random. -c - 15 p = (j+i)/2 - ta = a(p) - a(p) = a(i) - go to (21,19,18,17,16,161,162,163),iring - 163 th = h(p) - h(p) = h(i) - 162 tg = g(p) - g(p) = g(i) - 161 tf = f(p) - f(p) = f(i) - 16 te = e(p) - e(p) = e(i) - 17 td = d(p) - d(p) = d(i) - 18 tc = c(p) - c(p) = c(i) - 19 tb = b(p) - b(p) = b(i) - 21 continue -c -c Start at the beginning of the segment, search for k such that a(k)>t -c - q = j - k = i - 20 k = k+1 - if(k.gt.q) go to 60 - if(a(k).le.ta) go to 20 -c -c Such an element has now been found now search for a q such that a(q)0 then data will be partitioned into octants -c nd Number of data -c x(nd) X coordinates of the data -c y(nd) Y coordinates of the data -c z(nd) Z coordinates of the data -c tmp(nd) Temporary storage to keep track of the squared -c distance associated with each data -c nisb() Array with cumulative number of data in each -c super block. -c nxsup,xmnsup,xsizsup Definition of the X super block grid -c nysup,ymnsup,ysizsup Definition of the X super block grid -c nzsup,zmnsup,zsizsup Definition of the X super block grid -c -c -c -c OUTPUT VARIABLES: -c -c nclose Number of close data -c close() Index of close data -c infoct Number of informed octants (only computes if -c performing an octant search) -c -c -c -c EXTERNAL REFERENCES: -c -c sqdist Computes anisotropic squared distance -c sortem Sorts multiple arrays in ascending order -c -c -c -c----------------------------------------------------------------------- - implicit integer (i-n) - implicit double precision (a-h,o-z) - - real*8 x(*),y(*),z(*),tmp(*),close(*) - real*8 rotmat(MAXROT,3,3),hsqd,sqdist - integer nisb(*),inoct(8) - integer ixsbtosr(*),iysbtosr(*),izsbtosr(*) - logical inflag -c -c Determine the super block location of point being estimated: -c - call getindx(nxsup,xmnsup,xsizsup,xloc,ix,inflag) - call getindx(nysup,ymnsup,ysizsup,yloc,iy,inflag) - call getindx(nzsup,zmnsup,zsizsup,zloc,iz,inflag) -c -c Loop over all the possible Super Blocks: -c - nclose = 0 - do 1 isup=1,nsbtosr -c -c Is this super block within the grid system: -c - ixsup = ix + ixsbtosr(isup) - iysup = iy + iysbtosr(isup) - izsup = iz + izsbtosr(isup) - if(ixsup.le.0.or.ixsup.gt.nxsup.or. - + iysup.le.0.or.iysup.gt.nysup.or. - + izsup.le.0.or.izsup.gt.nzsup) go to 1 -c -c Figure out how many samples in this super block: -c - ii = ixsup + (iysup-1)*nxsup + (izsup-1)*nxsup*nysup - if(ii.eq.1) then - nums = nisb(ii) - i = 0 - else - nums = nisb(ii) - nisb(ii-1) - i = nisb(ii-1) - endif -c -c Loop over all the data in this super block: -c - do 2 ii=1,nums - i = i + 1 -c -c Check squared distance: -c - hsqd = sqdist(xloc,yloc,zloc,x(i),y(i),z(i),irot, - + MAXROT,rotmat) - if(real(hsqd).gt.radsqd) go to 2 -c -c Accept this sample: -c - nclose = nclose + 1 - close(nclose) = real(i) - tmp(nclose) = real(hsqd) - 2 continue - 1 continue -c -c Sort the nearby samples by distance to point being estimated: -c - call sortem(1,nclose,tmp,1,close,c,d,e,f,g,h) -c -c If we aren't doing an octant search then just return: -c - if(noct.le.0) return -c -c PARTITION THE DATA INTO OCTANTS: -c - do i=1,8 - inoct(i) = 0 - end do -c -c Now pick up the closest samples in each octant: -c - nt = 8*noct - na = 0 - do j=1,nclose - i = int(close(j)) - h = tmp(j) - dx = x(i) - xloc - dy = y(i) - yloc - dz = z(i) - zloc - if(dz.lt.0.) go to 5 - iq=4 - if(dx.le.0.d0 .and. dy.gt.0.d0) iq=1 - if(dx.gt.0.d0 .and. dy.ge.0.d0) iq=2 - if(dx.lt.0.d0 .and. dy.le.0.d0) iq=3 - go to 6 - 5 iq=8 - if(dx.le.0.d0 .and. dy.gt.0.d0) iq=5 - if(dx.gt.0.d0 .and. dy.ge.0.d0) iq=6 - if(dx.lt.0.d0 .and. dy.le.0.d0) iq=7 - 6 continue - inoct(iq) = inoct(iq) + 1 -c -c Keep this sample if the maximum has not been exceeded: -c - if(inoct(iq).le.noct) then - na = na + 1 - close(na) = i - tmp(na) = h - if(na.eq.nt) go to 7 - endif - end do -c -c End of data selection. Compute number of informed octants and return: -c - 7 nclose = na - infoct = 0 - do i=1,8 - if(inoct(i).gt.0) infoct = infoct + 1 - end do -c -c Finished: -c - return - end diff --git a/Src/Extern/gslib/strlen.f b/Src/Extern/gslib/strlen.f deleted file mode 100644 index c632cbcde..000000000 --- a/Src/Extern/gslib/strlen.f +++ /dev/null @@ -1,21 +0,0 @@ - subroutine strlen(str,MAXLEN,lostr) -c----------------------------------------------------------------------- -c -c Determine the length of the string minus trailing blanks -c -c -c -c----------------------------------------------------------------------- - - implicit integer (i-n) - implicit double precision (a-h,o-z) - - character str*512 - lostr = MAXLEN - do i=1,MAXLEN - j = MAXLEN - i + 1 - if(str(j:j).ne.' ') return - lostr = lostr - 1 - end do - return - end diff --git a/Src/Extern/hpgmg/BL_HPGMG.H b/Src/Extern/hpgmg/BL_HPGMG.H index aaa4b3774..0591b3270 100644 --- a/Src/Extern/hpgmg/BL_HPGMG.H +++ b/Src/Extern/hpgmg/BL_HPGMG.H @@ -1,7 +1,7 @@ #ifndef BL_HPGMG_H #define BL_HPGMG_H -#include +#include #ifdef USEHPGMG diff --git a/Src/F_BaseLib/FParallelMG.mak b/Src/F_BaseLib/FParallelMG.mak index a81c2104e..04193584f 100644 --- a/Src/F_BaseLib/FParallelMG.mak +++ b/Src/F_BaseLib/FParallelMG.mak @@ -5,7 +5,7 @@ # # Note: you can do a parallel make if you are using this file if you # are using the MODDEP dependency evaluater that is in Tools/C_scripts -# and is used in the default Tools/C_mk/Make.{rules,defs}. Otherwise, +# and is used in the default Tools/GNUMake/Make.{rules,defs}. Otherwise, # you can't since the dependencies for the object/module files can not be # inferred from the names or ordering of thes files. # diff --git a/Src/F_BaseLib/GPackage.mak b/Src/F_BaseLib/GPackage.mak index 7a7278f9b..6c4fe177f 100644 --- a/Src/F_BaseLib/GPackage.mak +++ b/Src/F_BaseLib/GPackage.mak @@ -113,7 +113,7 @@ ifdef CXX11 INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib endif -include $(BOXLIB_HOME)/Src/C_BaseLib/GPackage.mak -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +include $(BOXLIB_HOME)/Src/Base/GPackage.mak +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Base +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base diff --git a/Src/F_BaseLib/MemProfiler_f.cpp b/Src/F_BaseLib/MemProfiler_f.cpp index 0996c1fc3..608e735ee 100644 --- a/Src/F_BaseLib/MemProfiler_f.cpp +++ b/Src/F_BaseLib/MemProfiler_f.cpp @@ -1,5 +1,5 @@ -#include +#include #include extern "C" diff --git a/Src/F_BaseLib/MultiFab_C_F.H b/Src/F_BaseLib/MultiFab_C_F.H index c31e7ff13..e55375dee 100644 --- a/Src/F_BaseLib/MultiFab_C_F.H +++ b/Src/F_BaseLib/MultiFab_C_F.H @@ -2,8 +2,8 @@ #define _MultiFab_C_F_H_ #include -#include -#include +#include +#include extern "C" { void build_layout_from_c (int nb, int dm, const int* lo, const int* hi, diff --git a/Src/F_BaseLib/backtrace_c.cpp b/Src/F_BaseLib/backtrace_c.cpp index a6b2c6d1a..40715fbf6 100644 --- a/Src/F_BaseLib/backtrace_c.cpp +++ b/Src/F_BaseLib/backtrace_c.cpp @@ -20,7 +20,7 @@ #endif #ifndef FORTRAN_BOXLIB -#include +#include #endif extern "C" { diff --git a/Src/F_Interfaces/BaseLib/boxarray_fi.cpp b/Src/F_Interfaces/BaseLib/boxarray_fi.cpp index 5d81c4428..8b738d67a 100644 --- a/Src/F_Interfaces/BaseLib/boxarray_fi.cpp +++ b/Src/F_Interfaces/BaseLib/boxarray_fi.cpp @@ -1,5 +1,5 @@ -#include +#include extern "C" { diff --git a/Src/F_Interfaces/BaseLib/geometry_fi.cpp b/Src/F_Interfaces/BaseLib/geometry_fi.cpp index 2dead3799..8f8989aba 100644 --- a/Src/F_Interfaces/BaseLib/geometry_fi.cpp +++ b/Src/F_Interfaces/BaseLib/geometry_fi.cpp @@ -1,4 +1,4 @@ -#include +#include extern "C" { diff --git a/Src/F_Interfaces/BaseLib/main.cpp b/Src/F_Interfaces/BaseLib/main.cpp index de7c296c7..af3f1cc97 100644 --- a/Src/F_Interfaces/BaseLib/main.cpp +++ b/Src/F_Interfaces/BaseLib/main.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include extern "C" { void fmain(); } diff --git a/Src/F_Interfaces/BaseLib/multifab_fi.cpp b/Src/F_Interfaces/BaseLib/multifab_fi.cpp index 8b4e3b627..f407d544f 100644 --- a/Src/F_Interfaces/BaseLib/multifab_fi.cpp +++ b/Src/F_Interfaces/BaseLib/multifab_fi.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include extern "C" { diff --git a/Src/F_Interfaces/BaseLib/parallel_fi.cpp b/Src/F_Interfaces/BaseLib/parallel_fi.cpp index 153d5f99a..f9f0d92d3 100644 --- a/Src/F_Interfaces/BaseLib/parallel_fi.cpp +++ b/Src/F_Interfaces/BaseLib/parallel_fi.cpp @@ -1,5 +1,5 @@ -#include +#include extern "C" { diff --git a/Src/F_Interfaces/BaseLib/parmparse_fi.cpp b/Src/F_Interfaces/BaseLib/parmparse_fi.cpp index c67661671..76470d227 100644 --- a/Src/F_Interfaces/BaseLib/parmparse_fi.cpp +++ b/Src/F_Interfaces/BaseLib/parmparse_fi.cpp @@ -1,5 +1,5 @@ #include -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_CellMG/ABecLaplacian.H b/Src/LinearSolvers/C_CellMG/AMReX_ABecLaplacian.H similarity index 98% rename from Src/LinearSolvers/C_CellMG/ABecLaplacian.H rename to Src/LinearSolvers/C_CellMG/AMReX_ABecLaplacian.H index 087d06cda..278d368fd 100644 --- a/Src/LinearSolvers/C_CellMG/ABecLaplacian.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_ABecLaplacian.H @@ -2,8 +2,8 @@ #ifndef _ABecLAPLACIAN_H_ #define _ABecLAPLACIAN_H_ -#include -#include +#include +#include /* An ABecLaplacian tailors the description of a linear operator to apply @@ -146,7 +146,7 @@ public: void setCoefficients (const MultiFab& _a, const MultiFab* _b); void setCoefficients (const MultiFab& _a, - const PArray& _b); + const Array& _b); // // allocate/fill internal data for new level // diff --git a/Src/LinearSolvers/C_CellMG/ABecLaplacian.cpp b/Src/LinearSolvers/C_CellMG/AMReX_ABecLaplacian.cpp similarity index 96% rename from Src/LinearSolvers/C_CellMG/ABecLaplacian.cpp rename to Src/LinearSolvers/C_CellMG/AMReX_ABecLaplacian.cpp index 4cf5362a3..ab40f7aec 100644 --- a/Src/LinearSolvers/C_CellMG/ABecLaplacian.cpp +++ b/Src/LinearSolvers/C_CellMG/AMReX_ABecLaplacian.cpp @@ -1,8 +1,8 @@ -#include +#include #include -#include -#include -#include +#include +#include +#include Real ABecLaplacian::a_def = 0.0; Real ABecLaplacian::b_def = 1.0; @@ -284,11 +284,11 @@ ABecLaplacian::setCoefficients (const MultiFab& _a, void ABecLaplacian::setCoefficients (const MultiFab& _a, - const PArray& _b) + const Array& _b) { aCoefficients(_a); for (int n = 0; n < BL_SPACEDIM; ++n) - bCoefficients(_b[n], n); + bCoefficients(*_b[n], n); } void @@ -421,13 +421,13 @@ ABecLaplacian::Fsmooth (MultiFab& solnL, const MultiFab& bZ = bCoefficients(2,level);); oitr.rewind(); - const MultiMask& mm0 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm1 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm2 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm3 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm0 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm1 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm2 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm3 = *maskvals[level][oitr()]; oitr++; #if (BL_SPACEDIM > 2) - const MultiMask& mm4 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm5 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm4 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm5 = *maskvals[level][oitr()]; oitr++; #endif //const int nc = solnL.nComp(); // FIXME: This LinOp only really supports single-component @@ -537,13 +537,13 @@ ABecLaplacian::Fsmooth_jacobi (MultiFab& solnL, const MultiFab& bZ = bCoefficients(2,level);); oitr.rewind(); - const MultiMask& mm0 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm1 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm2 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm3 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm0 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm1 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm2 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm3 = *maskvals[level][oitr()]; oitr++; #if (BL_SPACEDIM > 2) - const MultiMask& mm4 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm5 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm4 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm5 = *maskvals[level][oitr()]; oitr++; #endif //const int nc = solnL.nComp(); // FIXME: This LinOp only really supports single-component diff --git a/Src/LinearSolvers/C_CellMG/ABec_1D.F b/Src/LinearSolvers/C_CellMG/AMReX_ABec_1D.F similarity index 98% rename from Src/LinearSolvers/C_CellMG/ABec_1D.F rename to Src/LinearSolvers/C_CellMG/AMReX_ABec_1D.F index 9a63ebea7..b4c0ed2a2 100644 --- a/Src/LinearSolvers/C_CellMG/ABec_1D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_ABec_1D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include +#include -#include "ABec_F.H" -#include "ArrayLim.H" -#include "CONSTANTS.H" +#include "AMReX_ABec_F.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_CONSTANTS.H" c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG/ABec_2D.F b/Src/LinearSolvers/C_CellMG/AMReX_ABec_2D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG/ABec_2D.F rename to Src/LinearSolvers/C_CellMG/AMReX_ABec_2D.F index 1af155ce0..bb92d83a8 100644 --- a/Src/LinearSolvers/C_CellMG/ABec_2D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_ABec_2D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include +#include -#include "ABec_F.H" -#include "ArrayLim.H" -#include "CONSTANTS.H" +#include "AMReX_ABec_F.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_CONSTANTS.H" c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG/ABec_3D.F b/Src/LinearSolvers/C_CellMG/AMReX_ABec_3D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG/ABec_3D.F rename to Src/LinearSolvers/C_CellMG/AMReX_ABec_3D.F index f3462af72..550d5b446 100644 --- a/Src/LinearSolvers/C_CellMG/ABec_3D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_ABec_3D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include +#include -#include "ABec_F.H" -#include "ArrayLim.H" -#include "CONSTANTS.H" +#include "AMReX_ABec_F.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_CONSTANTS.H" c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG/ABec_F.H b/Src/LinearSolvers/C_CellMG/AMReX_ABec_F.H similarity index 99% rename from Src/LinearSolvers/C_CellMG/ABec_F.H rename to Src/LinearSolvers/C_CellMG/AMReX_ABec_F.H index 9b3495cef..2ba46e057 100644 --- a/Src/LinearSolvers/C_CellMG/ABec_F.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_ABec_F.H @@ -1,7 +1,7 @@ #ifndef _AABBEC_F_H_ #define _AABBEC_F_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -100,7 +100,7 @@ #endif -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_CellMG/ABec_UTIL.F b/Src/LinearSolvers/C_CellMG/AMReX_ABec_UTIL.F similarity index 97% rename from Src/LinearSolvers/C_CellMG/ABec_UTIL.F rename to Src/LinearSolvers/C_CellMG/AMReX_ABec_UTIL.F index 839e97644..7a5f9c9ce 100644 --- a/Src/LinearSolvers/C_CellMG/ABec_UTIL.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_ABec_UTIL.F @@ -3,7 +3,7 @@ #define BL_LANG_FORT #endif -#include +#include c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG/CGSolver.H b/Src/LinearSolvers/C_CellMG/AMReX_CGSolver.H similarity index 98% rename from Src/LinearSolvers/C_CellMG/CGSolver.H rename to Src/LinearSolvers/C_CellMG/AMReX_CGSolver.H index 37470dbf3..4ff139ac8 100644 --- a/Src/LinearSolvers/C_CellMG/CGSolver.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_CGSolver.H @@ -4,11 +4,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class MultiGrid; diff --git a/Src/LinearSolvers/C_CellMG/CGSolver.cpp b/Src/LinearSolvers/C_CellMG/AMReX_CGSolver.cpp similarity index 99% rename from Src/LinearSolvers/C_CellMG/CGSolver.cpp rename to Src/LinearSolvers/C_CellMG/AMReX_CGSolver.cpp index bdafcede1..16eceae64 100644 --- a/Src/LinearSolvers/C_CellMG/CGSolver.cpp +++ b/Src/LinearSolvers/C_CellMG/AMReX_CGSolver.cpp @@ -1,16 +1,16 @@ -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #ifdef _OPENMP #include @@ -766,7 +766,8 @@ BuildGramMatrix (Real* Gg, const int nthreads = 1; #endif const int Ntmp = (Nrows*(Nrows+3))/2; - PArray > tmp(nthreads, PArrayManage); + + Array > tmp(nthreads); #ifdef _OPENMP #pragma omp parallel @@ -777,7 +778,7 @@ BuildGramMatrix (Real* Gg, #else int tid = 0; #endif - tmp.set(tid, new Array(Ntmp,0.0)); + tmp[tid].resize(Ntmp,0.0); for (MFIter mfi(PR,true); mfi.isValid(); ++mfi) { diff --git a/Src/LinearSolvers/C_CellMG/LO_1D.F b/Src/LinearSolvers/C_CellMG/AMReX_LO_1D.F similarity index 98% rename from Src/LinearSolvers/C_CellMG/LO_1D.F rename to Src/LinearSolvers/C_CellMG/AMReX_LO_1D.F index 2f3a2fd63..d767fdd71 100644 --- a/Src/LinearSolvers/C_CellMG/LO_1D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_LO_1D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include -#include -#include "LO_BCTYPES.H" -#include "LO_F.H" -#include "ArrayLim.H" +#include +#include +#include "AMReX_LO_BCTYPES.H" +#include "AMReX_LO_F.H" +#include "AMReX_ArrayLim.H" c----------------------------------------------------------------------- subroutine FORT_HARMONIC_AVERAGEEC ( diff --git a/Src/LinearSolvers/C_CellMG/LO_2D.F b/Src/LinearSolvers/C_CellMG/AMReX_LO_2D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG/LO_2D.F rename to Src/LinearSolvers/C_CellMG/AMReX_LO_2D.F index 3f162cebb..2ad14c0ee 100644 --- a/Src/LinearSolvers/C_CellMG/LO_2D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_LO_2D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include -#include -#include "LO_BCTYPES.H" -#include "LO_F.H" -#include "ArrayLim.H" +#include +#include +#include "AMReX_LO_BCTYPES.H" +#include "AMReX_LO_F.H" +#include "AMReX_ArrayLim.H" c----------------------------------------------------------------------- subroutine FORT_HARMONIC_AVERAGEEC ( diff --git a/Src/LinearSolvers/C_CellMG/LO_3D.F b/Src/LinearSolvers/C_CellMG/AMReX_LO_3D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG/LO_3D.F rename to Src/LinearSolvers/C_CellMG/AMReX_LO_3D.F index e88b61b7d..aa25df778 100644 --- a/Src/LinearSolvers/C_CellMG/LO_3D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_LO_3D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include -#include -#include "LO_BCTYPES.H" -#include "LO_F.H" -#include "ArrayLim.H" +#include +#include +#include "AMReX_LO_BCTYPES.H" +#include "AMReX_LO_F.H" +#include "AMReX_ArrayLim.H" c----------------------------------------------------------------------- subroutine FORT_HARMONIC_AVERAGEEC ( diff --git a/Src/LinearSolvers/C_CellMG/LO_F.H b/Src/LinearSolvers/C_CellMG/AMReX_LO_F.H similarity index 98% rename from Src/LinearSolvers/C_CellMG/LO_F.H rename to Src/LinearSolvers/C_CellMG/AMReX_LO_F.H index b7c416100..3951deeca 100644 --- a/Src/LinearSolvers/C_CellMG/LO_F.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_LO_F.H @@ -1,7 +1,7 @@ #ifndef _LO_F_H_ #define _LO_F_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -85,7 +85,7 @@ #endif #endif -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_CellMG/LP_1D.F b/Src/LinearSolvers/C_CellMG/AMReX_LP_1D.F similarity index 97% rename from Src/LinearSolvers/C_CellMG/LP_1D.F rename to Src/LinearSolvers/C_CellMG/AMReX_LP_1D.F index 8d9467611..52a1255af 100644 --- a/Src/LinearSolvers/C_CellMG/LP_1D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_LP_1D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include -#include +#include +#include -#include "LP_F.H" -#include "ArrayLim.H" +#include "AMReX_LP_F.H" +#include "AMReX_ArrayLim.H" c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG/LP_2D.F b/Src/LinearSolvers/C_CellMG/AMReX_LP_2D.F similarity index 98% rename from Src/LinearSolvers/C_CellMG/LP_2D.F rename to Src/LinearSolvers/C_CellMG/AMReX_LP_2D.F index fad3960fb..a25cf6bcf 100644 --- a/Src/LinearSolvers/C_CellMG/LP_2D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_LP_2D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include -#include +#include +#include -#include "LP_F.H" -#include "ArrayLim.H" +#include "AMReX_LP_F.H" +#include "AMReX_ArrayLim.H" c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG/LP_3D.F b/Src/LinearSolvers/C_CellMG/AMReX_LP_3D.F similarity index 98% rename from Src/LinearSolvers/C_CellMG/LP_3D.F rename to Src/LinearSolvers/C_CellMG/AMReX_LP_3D.F index 81d5526ff..6e802c57f 100644 --- a/Src/LinearSolvers/C_CellMG/LP_3D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_LP_3D.F @@ -3,11 +3,11 @@ #define BL_LANG_FORT #endif -#include -#include +#include +#include -#include "LP_F.H" -#include "ArrayLim.H" +#include "AMReX_LP_F.H" +#include "AMReX_ArrayLim.H" c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG/LP_F.H b/Src/LinearSolvers/C_CellMG/AMReX_LP_F.H similarity index 99% rename from Src/LinearSolvers/C_CellMG/LP_F.H rename to Src/LinearSolvers/C_CellMG/AMReX_LP_F.H index 657e589e3..fd1a02e37 100644 --- a/Src/LinearSolvers/C_CellMG/LP_F.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_LP_F.H @@ -1,7 +1,7 @@ #ifndef _LP_F_H_ #define _LP_F_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -74,7 +74,7 @@ #endif -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_CellMG/Laplacian.H b/Src/LinearSolvers/C_CellMG/AMReX_Laplacian.H similarity index 99% rename from Src/LinearSolvers/C_CellMG/Laplacian.H rename to Src/LinearSolvers/C_CellMG/AMReX_Laplacian.H index c803ff139..9c20bf755 100644 --- a/Src/LinearSolvers/C_CellMG/Laplacian.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_Laplacian.H @@ -2,7 +2,7 @@ #ifndef _LAPLACIAN_H_ #define _LAPLACIAN_H_ -#include +#include /* A Laplacian tailors the description of a linear operator to apply diff --git a/Src/LinearSolvers/C_CellMG/Laplacian.cpp b/Src/LinearSolvers/C_CellMG/AMReX_Laplacian.cpp similarity index 94% rename from Src/LinearSolvers/C_CellMG/Laplacian.cpp rename to Src/LinearSolvers/C_CellMG/AMReX_Laplacian.cpp index 556a0fba4..c62c96305 100644 --- a/Src/LinearSolvers/C_CellMG/Laplacian.cpp +++ b/Src/LinearSolvers/C_CellMG/AMReX_Laplacian.cpp @@ -1,7 +1,7 @@ -#include -#include -#include +#include +#include +#include Laplacian::Laplacian (const BndryData& bd, Real _h) @@ -93,13 +93,13 @@ Laplacian::Fsmooth (MultiFab& solnL, #endif oitr.rewind(); - const MultiMask& mm0 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm1 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm2 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm3 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm0 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm1 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm2 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm3 = *maskvals[level][oitr()]; oitr++; #if (BL_SPACEDIM > 2) - const MultiMask& mm4 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm5 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm4 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm5 = *maskvals[level][oitr()]; oitr++; #endif const int nc = rhsL.nComp(); diff --git a/Src/LinearSolvers/C_CellMG/LinOp.H b/Src/LinearSolvers/C_CellMG/AMReX_LinOp.H similarity index 95% rename from Src/LinearSolvers/C_CellMG/LinOp.H rename to Src/LinearSolvers/C_CellMG/AMReX_LinOp.H index d94f097e8..53332ab79 100644 --- a/Src/LinearSolvers/C_CellMG/LinOp.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_LinOp.H @@ -2,13 +2,15 @@ #ifndef _LINOP_H_ #define _LINOP_H_ -#include -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include /* A LinOp is a virtual base class for general linear operators capable @@ -271,26 +273,26 @@ protected: // // Array (on level) of Tuples (on dimension) of grid spacings // - std::vector< Tuple > h; + Array< Tuple > h; // // Array (on level) of BoxArray's of LinOp's domain // - std::vector< BoxArray > gbox; + Array< BoxArray > gbox; // // Array (on level) of pointers to BndryRegisters along each grid // for scratch data required to modify internal stencil on boundary // - std::vector< LnClassPtr > undrrelxr; + Array< LnClassPtr > undrrelxr; // - // Array (on level) of PArrays (on orientation) of MultiMasks for + // Array (on level) of Arrays (on orientation) of MultiMasks for // whether boundary Fabs are covered, not_covered, outside_domain // - Array > maskvals; + Array > > maskvals; // // Similar to maskvals, but only for level 0. // It's only made if it's needed. Currently used only in applyBC(). // - Array > lmaskvals; + Array > > lmaskvals; // // boundary data class // @@ -299,7 +301,7 @@ protected: // Array (on level) of geometry objects. Needed for determining // whether stuff intersects on periodic domains // - std::vector< Geometry > geomarray; + Array< Geometry > geomarray; // // flag (=1 if use harmonic averaged interpolation for coefficients, // =0 is arithmetic averaging) diff --git a/Src/LinearSolvers/C_CellMG/LinOp.cpp b/Src/LinearSolvers/C_CellMG/AMReX_LinOp.cpp similarity index 92% rename from Src/LinearSolvers/C_CellMG/LinOp.cpp rename to Src/LinearSolvers/C_CellMG/AMReX_LinOp.cpp index ecf085c13..c9be467fe 100644 --- a/Src/LinearSolvers/C_CellMG/LinOp.cpp +++ b/Src/LinearSolvers/C_CellMG/AMReX_LinOp.cpp @@ -1,12 +1,12 @@ -#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace { @@ -139,19 +139,19 @@ LinOp::initConstruct (const Real* _h) undrrelxr[level] = new BndryRegister(gbox[level], 1, 0, 0, 1, color()); maskvals.resize(1); - maskvals[0].resize(2*BL_SPACEDIM, PArrayManage); + maskvals[0].resize(2*BL_SPACEDIM); lmaskvals.resize(1); - lmaskvals[0].resize(2*BL_SPACEDIM, PArrayManage); + lmaskvals[0].resize(2*BL_SPACEDIM); for (OrientationIter oitr; oitr; ++oitr) { const Orientation face = oitr(); const MultiMask& m = bgb->bndryMasks(face); - maskvals[0].set(face, new MultiMask(m.boxArray(), m.DistributionMap(), 1)); - lmaskvals[0].set(face, new MultiMask(m.boxArray(), m.DistributionMap(), 1)); - MultiMask::Copy(maskvals[0][face], m); - MultiMask::Copy(lmaskvals[0][face], m); + maskvals[0][face].reset(new MultiMask(m.boxArray(), m.DistributionMap(), 1)); + lmaskvals[0][face].reset(new MultiMask(m.boxArray(), m.DistributionMap(), 1)); + MultiMask::Copy(*maskvals[0][face], m); + MultiMask::Copy(*lmaskvals[0][face], m); } } @@ -228,7 +228,7 @@ LinOp::applyBC (MultiFab& inout, FabSet& f = (*undrrelxr[level])[o]; int cdr = o; const FabSet& fs = bgb->bndryValues(o); - const Mask& m = local ? lmaskvals[level][o][mfi] : maskvals[level][o][mfi]; + const Mask& m = local ? (*lmaskvals[level][o])[mfi] : (*maskvals[level][o])[mfi]; Real bcl = bdl[o]; BL_ASSERT(bdc[o].size()>bndry_comp); int bct = bdc[o][bndry_comp]; @@ -344,21 +344,21 @@ LinOp::prepareForLevel (int level) maskvals.resize(level+1); lmaskvals.resize(level+1); - maskvals[level].resize(2*BL_SPACEDIM, PArrayManage); - lmaskvals[level].resize(2*BL_SPACEDIM, PArrayManage); + maskvals[level].resize(2*BL_SPACEDIM); + lmaskvals[level].resize(2*BL_SPACEDIM); int nGrow = NumGrow(level); for (OrientationIter fi; fi; ++fi) { Orientation face = fi(); - maskvals[level].set(face, new MultiMask(gbox[level], - bgb->DistributionMap(), - geomarray[level], - face, 0, nGrow, 0, 1, true)); - lmaskvals[level].set(face, new MultiMask(maskvals[level][face].boxArray(), - maskvals[level][face].DistributionMap(), 1)); - MultiMask::Copy(lmaskvals[level][face], maskvals[level][face]); + maskvals[level][face].reset(new MultiMask(gbox[level], + bgb->DistributionMap(), + geomarray[level], + face, 0, nGrow, 0, 1, true)); + lmaskvals[level][face].reset(new MultiMask(maskvals[level][face]->boxArray(), + maskvals[level][face]->DistributionMap(), 1)); + MultiMask::Copy(*lmaskvals[level][face], *maskvals[level][face]); } } @@ -529,9 +529,9 @@ operator<< (std::ostream& os, { const Orientation face = oitr(); - for (MultiMaskIter mmi(lp.maskvals[level][face]); mmi.isValid(); ++mmi) + for (MultiMaskIter mmi(*lp.maskvals[level][face]); mmi.isValid(); ++mmi) { - os << lp.maskvals[level][face][mmi]; + os << (*lp.maskvals[level][face])[mmi]; } } } diff --git a/Src/LinearSolvers/C_CellMG/MG_1D.F b/Src/LinearSolvers/C_CellMG/AMReX_MG_1D.F similarity index 90% rename from Src/LinearSolvers/C_CellMG/MG_1D.F rename to Src/LinearSolvers/C_CellMG/AMReX_MG_1D.F index a0b617be2..8981640bd 100644 --- a/Src/LinearSolvers/C_CellMG/MG_1D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_MG_1D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include -#include -#include "MG_F.H" -#include "ArrayLim.H" +#include +#include +#include "AMReX_MG_F.H" +#include "AMReX_ArrayLim.H" subroutine FORT_AVERAGE ( $ c, DIMS(c), diff --git a/Src/LinearSolvers/C_CellMG/MG_2D.F b/Src/LinearSolvers/C_CellMG/AMReX_MG_2D.F similarity index 94% rename from Src/LinearSolvers/C_CellMG/MG_2D.F rename to Src/LinearSolvers/C_CellMG/AMReX_MG_2D.F index 593e52ca3..f2a6408f6 100644 --- a/Src/LinearSolvers/C_CellMG/MG_2D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_MG_2D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include -#include -#include "MG_F.H" -#include "ArrayLim.H" +#include +#include +#include "AMReX_MG_F.H" +#include "AMReX_ArrayLim.H" subroutine FORT_AVERAGE ( $ c, DIMS(c), diff --git a/Src/LinearSolvers/C_CellMG/MG_3D.F b/Src/LinearSolvers/C_CellMG/AMReX_MG_3D.F similarity index 96% rename from Src/LinearSolvers/C_CellMG/MG_3D.F rename to Src/LinearSolvers/C_CellMG/AMReX_MG_3D.F index e7284fbea..3ff67e8fa 100644 --- a/Src/LinearSolvers/C_CellMG/MG_3D.F +++ b/Src/LinearSolvers/C_CellMG/AMReX_MG_3D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include -#include -#include "MG_F.H" -#include "ArrayLim.H" +#include +#include +#include "AMReX_MG_F.H" +#include "AMReX_ArrayLim.H" subroutine FORT_AVERAGE ( $ c, DIMS(c), diff --git a/Src/LinearSolvers/C_CellMG/MG_F.H b/Src/LinearSolvers/C_CellMG/AMReX_MG_F.H similarity index 97% rename from Src/LinearSolvers/C_CellMG/MG_F.H rename to Src/LinearSolvers/C_CellMG/AMReX_MG_F.H index 8e6a53e00..d5b246824 100644 --- a/Src/LinearSolvers/C_CellMG/MG_F.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_MG_F.H @@ -1,7 +1,7 @@ #ifndef _MG_F_H_ #define _MG_F_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -67,7 +67,7 @@ #endif -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_CellMG/MultiGrid.H b/Src/LinearSolvers/C_CellMG/AMReX_MultiGrid.H similarity index 98% rename from Src/LinearSolvers/C_CellMG/MultiGrid.H rename to Src/LinearSolvers/C_CellMG/AMReX_MultiGrid.H index 003c35ce9..ac777112f 100644 --- a/Src/LinearSolvers/C_CellMG/MultiGrid.H +++ b/Src/LinearSolvers/C_CellMG/AMReX_MultiGrid.H @@ -2,13 +2,12 @@ #ifndef _MULTIGRID_H_ #define _MULTIGRID_H_ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include diff --git a/Src/LinearSolvers/C_CellMG/MultiGrid.cpp b/Src/LinearSolvers/C_CellMG/AMReX_MultiGrid.cpp similarity index 99% rename from Src/LinearSolvers/C_CellMG/MultiGrid.cpp rename to Src/LinearSolvers/C_CellMG/AMReX_MultiGrid.cpp index 43f8cf955..494eb07f9 100644 --- a/Src/LinearSolvers/C_CellMG/MultiGrid.cpp +++ b/Src/LinearSolvers/C_CellMG/AMReX_MultiGrid.cpp @@ -1,14 +1,14 @@ -#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace { diff --git a/Src/LinearSolvers/C_CellMG/lo_bctypes.fi b/Src/LinearSolvers/C_CellMG/AMReX_lo_bctypes.fi similarity index 100% rename from Src/LinearSolvers/C_CellMG/lo_bctypes.fi rename to Src/LinearSolvers/C_CellMG/AMReX_lo_bctypes.fi diff --git a/Src/LinearSolvers/C_CellMG/CMakeLists.txt b/Src/LinearSolvers/C_CellMG/CMakeLists.txt index 100f32470..ded8bb615 100644 --- a/Src/LinearSolvers/C_CellMG/CMakeLists.txt +++ b/Src/LinearSolvers/C_CellMG/CMakeLists.txt @@ -14,14 +14,14 @@ project(CMGLIB) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files ABecLaplacian.cpp CGSolver.cpp Laplacian.cpp LinOp.cpp MultiGrid.cpp) -set(FPP_source_files ABec_${BL_SPACEDIM}D.F ABec_UTIL.F LO_${BL_SPACEDIM}D.F LP_${BL_SPACEDIM}D.F MG_${BL_SPACEDIM}D.F) +set(CXX_source_files AMReX_ABecLaplacian.cpp AMReX_CGSolver.cpp AMReX_Laplacian.cpp AMReX_LinOp.cpp AMReX_MultiGrid.cpp) +set(FPP_source_files AMReX_ABec_${BL_SPACEDIM}D.F AMReX_ABec_UTIL.F AMReX_LO_${BL_SPACEDIM}D.F AMReX_LP_${BL_SPACEDIM}D.F AMReX_MG_${BL_SPACEDIM}D.F) set(F77_source_files) set(F90_source_files) -set(CXX_header_files ABecLaplacian.H CGSolver.H Laplacian.H LinOp.H MultiGrid.H) -set(FPP_header_files ABec_F.H LO_F.H LP_F.H MG_F.H) -set(F77_header_files lo_bctypes.fi) +set(CXX_header_files AMReX_ABecLaplacian.H AMReX_CGSolver.H AMReX_Laplacian.H AMReX_LinOp.H AMReX_MultiGrid.H) +set(FPP_header_files AMReX_ABec_F.H AMReX_LO_F.H AMReX_LP_F.H AMReX_MG_F.H) +set(F77_header_files AMReX_lo_bctypes.fi) set(F90_header_files) diff --git a/Src/LinearSolvers/C_CellMG/Make.package b/Src/LinearSolvers/C_CellMG/Make.package index 6c71d3a16..d8b2799bd 100644 --- a/Src/LinearSolvers/C_CellMG/Make.package +++ b/Src/LinearSolvers/C_CellMG/Make.package @@ -1,14 +1,14 @@ MGLIB_BASE=EXE -CEXE_sources += ABecLaplacian.cpp CGSolver.cpp \ - LinOp.cpp Laplacian.cpp MultiGrid.cpp +CEXE_sources += AMReX_ABecLaplacian.cpp AMReX_CGSolver.cpp \ + AMReX_LinOp.cpp AMReX_Laplacian.cpp AMReX_MultiGrid.cpp -CEXE_headers += ABecLaplacian.H CGSolver.H LinOp.H MultiGrid.H Laplacian.H +CEXE_headers += AMReX_ABecLaplacian.H AMReX_CGSolver.H AMReX_LinOp.H AMReX_MultiGrid.H AMReX_Laplacian.H -FEXE_headers += ABec_F.H LO_F.H LP_F.H MG_F.H +FEXE_headers += AMReX_ABec_F.H AMReX_LO_F.H AMReX_LP_F.H AMReX_MG_F.H -FEXE_sources += ABec_$(DIM)D.F ABec_UTIL.F \ - LO_$(DIM)D.F LP_$(DIM)D.F MG_$(DIM)D.F +FEXE_sources += AMReX_ABec_$(DIM)D.F AMReX_ABec_UTIL.F \ + AMReX_LO_$(DIM)D.F AMReX_LP_$(DIM)D.F AMReX_MG_$(DIM)D.F VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG diff --git a/Src/LinearSolvers/C_CellMG4/ABec2.H b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2.H similarity index 93% rename from Src/LinearSolvers/C_CellMG4/ABec2.H rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec2.H index 487d24dcf..62f3431d9 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec2.H +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2.H @@ -2,9 +2,9 @@ #ifndef _ABec2_H_ #define _ABec2_H_ -#include -#include -#include +#include +#include +#include class ABec2 : public ABecLaplacian diff --git a/Src/LinearSolvers/C_CellMG4/ABec2.cpp b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2.cpp similarity index 88% rename from Src/LinearSolvers/C_CellMG4/ABec2.cpp rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec2.cpp index 86efd53c0..6c7af8afc 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec2.cpp +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2.cpp @@ -1,13 +1,13 @@ -#include +#include #include -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include -#include +#include void ABec2::altApplyBC (int level, @@ -45,7 +45,7 @@ ABec2::altApplyBC (int level, FabSet& f = (*undrrelxr[level])[o]; int cdr = o; - const Mask& m = local ? lmaskvals[level][o][mfi] : maskvals[level][o][mfi]; + const Mask& m = local ? (*lmaskvals[level][o])[mfi] : (*maskvals[level][o])[mfi]; Real bcl = bdl[o]; BL_ASSERT(bdc[o].size()>bndry_comp); int bct = bdc[o][bndry_comp]; @@ -89,13 +89,13 @@ ABec2::Fsmooth (MultiFab& solnL, const MultiFab& bZ = bCoefficients(2,level);); oitr.rewind(); - const MultiMask& mm0 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm1 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm2 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm3 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm0 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm1 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm2 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm3 = *maskvals[level][oitr()]; oitr++; #if (BL_SPACEDIM > 2) - const MultiMask& mm4 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm5 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm4 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm5 = *maskvals[level][oitr()]; oitr++; #endif const int nc = 1; @@ -185,13 +185,13 @@ ABec2::Fsmooth_jacobi (MultiFab& solnL, const MultiFab& bZ = bCoefficients(2,level);); oitr.rewind(); - const MultiMask& mm0 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm1 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm2 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm3 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm0 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm1 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm2 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm3 = *maskvals[level][oitr()]; oitr++; #if (BL_SPACEDIM > 2) - const MultiMask& mm4 = maskvals[level][oitr()]; oitr++; - const MultiMask& mm5 = maskvals[level][oitr()]; oitr++; + const MultiMask& mm4 = *maskvals[level][oitr()]; oitr++; + const MultiMask& mm5 = *maskvals[level][oitr()]; oitr++; #endif //const int nc = solnL.nComp(); // FIXME: This LinOp only really supports single-component diff --git a/Src/LinearSolvers/C_CellMG4/ABec2_2D.F b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2_2D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG4/ABec2_2D.F rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec2_2D.F index 94ee29e91..ad281b0ea 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec2_2D.F +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2_2D.F @@ -1,7 +1,7 @@ -#include -#include "ArrayLim.H" -#include "CONSTANTS.H" -#include "LO_BCTYPES.H" +#include +#include "AMReX_ArrayLim.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_LO_BCTYPES.H" subroutine ab2_gsrb (lo, hi, blo, bhi, & phi, phi_l1, phi_l2, phi_h1, phi_h2, diff --git a/Src/LinearSolvers/C_CellMG4/ABec2_3D.F b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2_3D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG4/ABec2_3D.F rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec2_3D.F index ef5788d74..de4d31512 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec2_3D.F +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2_3D.F @@ -1,7 +1,7 @@ -#include -#include "ArrayLim.H" -#include "CONSTANTS.H" -#include "LO_BCTYPES.H" +#include +#include "AMReX_ArrayLim.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_LO_BCTYPES.H" subroutine ab2_gsrb (lo, hi, blo, bhi, & phi,phi_l1,phi_l2,phi_l3,phi_h1,phi_h2,phi_h3, diff --git a/Src/LinearSolvers/C_CellMG4/ABec2_F.H b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2_F.H similarity index 98% rename from Src/LinearSolvers/C_CellMG4/ABec2_F.H rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec2_F.H index d468506d1..e9ec6e83a 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec2_F.H +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec2_F.H @@ -1,7 +1,7 @@ #ifndef _ABec2_F_H_ #define _ABec2_F_H_ -#include +#include BL_FORT_PROC_DECL(AB2_BNDRYRLX, ab2_bndryrlx) ( const int lo[], const int hi[], diff --git a/Src/LinearSolvers/C_CellMG4/ABec4.H b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4.H similarity index 99% rename from Src/LinearSolvers/C_CellMG4/ABec4.H rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec4.H index c5484f88b..29b44416c 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec4.H +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4.H @@ -2,9 +2,9 @@ #ifndef _ABec4_H_ #define _ABec4_H_ -#include -#include -#include +#include +#include +#include /* An ABec4 tailors the description of a linear operator to apply diff --git a/Src/LinearSolvers/C_CellMG4/ABec4.cpp b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4.cpp similarity index 98% rename from Src/LinearSolvers/C_CellMG4/ABec4.cpp rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec4.cpp index b5939fdb6..45ba6df41 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec4.cpp +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4.cpp @@ -1,11 +1,11 @@ -#include +#include #include -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include Real ABec4::a_def = 0.0; Real ABec4::b_def = 1.0; @@ -127,7 +127,7 @@ ABec4::applyBC (MultiFab& inout, FabSet& f = (*undrrelxr[level])[o]; int cdr = o; const FabSet& fs = bgb->bndryValues(o); - const Mask& m = local ? lmaskvals[level][o][mfi] : maskvals[level][o][mfi]; + const Mask& m = local ? (*lmaskvals[level][o])[mfi] : (*maskvals[level][o])[mfi]; Real bcl = bdl[o]; BL_ASSERT(bdc[o].size()>bndry_comp); int bct = bdc[o][bndry_comp]; diff --git a/Src/LinearSolvers/C_CellMG4/ABec4_2D.F b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4_2D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG4/ABec4_2D.F rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec4_2D.F index 1cae8ecef..5ba412494 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec4_2D.F +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4_2D.F @@ -3,12 +3,12 @@ #define BL_LANG_FORT #endif -#include +#include -#include "ABec4_F.H" -#include "ArrayLim.H" -#include "CONSTANTS.H" -#include "LO_BCTYPES.H" +#include "AMReX_ABec4_F.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_LO_BCTYPES.H" c----------------------------------------------------------------------- c diff --git a/Src/LinearSolvers/C_CellMG4/ABec4_3D.F b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4_3D.F similarity index 99% rename from Src/LinearSolvers/C_CellMG4/ABec4_3D.F rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec4_3D.F index 8cdf02526..6ccb9483e 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec4_3D.F +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4_3D.F @@ -3,12 +3,12 @@ #define BL_LANG_FORT #endif -#include +#include -#include "ABec4_F.H" -#include "ArrayLim.H" -#include "CONSTANTS.H" -#include "LO_BCTYPES.H" +#include "AMReX_ABec4_F.H" +#include "AMReX_ArrayLim.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_LO_BCTYPES.H" #undef BC_ORDER_4 #define BC_ORDER_5 diff --git a/Src/LinearSolvers/C_CellMG4/ABec4_F.H b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4_F.H similarity index 99% rename from Src/LinearSolvers/C_CellMG4/ABec4_F.H rename to Src/LinearSolvers/C_CellMG4/AMReX_ABec4_F.H index 6279a4188..a173445be 100644 --- a/Src/LinearSolvers/C_CellMG4/ABec4_F.H +++ b/Src/LinearSolvers/C_CellMG4/AMReX_ABec4_F.H @@ -1,7 +1,7 @@ #ifndef _AABBEC4_F_H_ #define _AABBEC4_F_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -127,7 +127,7 @@ #endif -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_CellMG4/CMakeLists.txt b/Src/LinearSolvers/C_CellMG4/CMakeLists.txt index 100f32470..ded8bb615 100644 --- a/Src/LinearSolvers/C_CellMG4/CMakeLists.txt +++ b/Src/LinearSolvers/C_CellMG4/CMakeLists.txt @@ -14,14 +14,14 @@ project(CMGLIB) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files ABecLaplacian.cpp CGSolver.cpp Laplacian.cpp LinOp.cpp MultiGrid.cpp) -set(FPP_source_files ABec_${BL_SPACEDIM}D.F ABec_UTIL.F LO_${BL_SPACEDIM}D.F LP_${BL_SPACEDIM}D.F MG_${BL_SPACEDIM}D.F) +set(CXX_source_files AMReX_ABecLaplacian.cpp AMReX_CGSolver.cpp AMReX_Laplacian.cpp AMReX_LinOp.cpp AMReX_MultiGrid.cpp) +set(FPP_source_files AMReX_ABec_${BL_SPACEDIM}D.F AMReX_ABec_UTIL.F AMReX_LO_${BL_SPACEDIM}D.F AMReX_LP_${BL_SPACEDIM}D.F AMReX_MG_${BL_SPACEDIM}D.F) set(F77_source_files) set(F90_source_files) -set(CXX_header_files ABecLaplacian.H CGSolver.H Laplacian.H LinOp.H MultiGrid.H) -set(FPP_header_files ABec_F.H LO_F.H LP_F.H MG_F.H) -set(F77_header_files lo_bctypes.fi) +set(CXX_header_files AMReX_ABecLaplacian.H AMReX_CGSolver.H AMReX_Laplacian.H AMReX_LinOp.H AMReX_MultiGrid.H) +set(FPP_header_files AMReX_ABec_F.H AMReX_LO_F.H AMReX_LP_F.H AMReX_MG_F.H) +set(F77_header_files AMReX_lo_bctypes.fi) set(F90_header_files) diff --git a/Src/LinearSolvers/C_CellMG4/Make.package b/Src/LinearSolvers/C_CellMG4/Make.package index fc6a45972..c27645bbb 100644 --- a/Src/LinearSolvers/C_CellMG4/Make.package +++ b/Src/LinearSolvers/C_CellMG4/Make.package @@ -1,7 +1,7 @@ -CEXE_sources += ABec2.cpp ABec4.cpp -CEXE_headers += ABec2.H ABec4.H -FEXE_headers += ABec2_F.H ABec4_F.H -FEXE_sources += ABec2_$(DIM)D.F ABec4_$(DIM)D.F +CEXE_sources += AMReX_ABec2.cpp AMReX_ABec4.cpp +CEXE_headers += AMReX_ABec2.H AMReX_ABec4.H +FEXE_headers += AMReX_ABec2_F.H AMReX_ABec4_F.H +FEXE_sources += AMReX_ABec2_$(DIM)D.F AMReX_ABec4_$(DIM)D.F VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG4 INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG4 diff --git a/Src/LinearSolvers/C_TensorMG/DV_2D.F b/Src/LinearSolvers/C_TensorMG/AMReX_DV_2D.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/DV_2D.F rename to Src/LinearSolvers/C_TensorMG/AMReX_DV_2D.F index 08b090fe7..545f9af3c 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_2D.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_DV_2D.F @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DV_3D1.F b/Src/LinearSolvers/C_TensorMG/AMReX_DV_3D1.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/DV_3D1.F rename to Src/LinearSolvers/C_TensorMG/AMReX_DV_3D1.F index a1632d1e2..91ac1b31c 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_3D1.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_DV_3D1.F @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DV_3D2.F b/Src/LinearSolvers/C_TensorMG/AMReX_DV_3D2.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/DV_3D2.F rename to Src/LinearSolvers/C_TensorMG/AMReX_DV_3D2.F index 35934d32e..02a27f989 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_3D2.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_DV_3D2.F @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DV_3D3.F b/Src/LinearSolvers/C_TensorMG/AMReX_DV_3D3.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/DV_3D3.F rename to Src/LinearSolvers/C_TensorMG/AMReX_DV_3D3.F index 0c23955a6..d7a25ff48 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_3D3.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_DV_3D3.F @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DivVis.H b/Src/LinearSolvers/C_TensorMG/AMReX_DivVis.H similarity index 99% rename from Src/LinearSolvers/C_TensorMG/DivVis.H rename to Src/LinearSolvers/C_TensorMG/AMReX_DivVis.H index ddec65e1a..914a73128 100644 --- a/Src/LinearSolvers/C_TensorMG/DivVis.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_DivVis.H @@ -1,8 +1,8 @@ #ifndef _DivVis_H_ #define _DivVis_H_ -#include -#include +#include +#include /* diff --git a/Src/LinearSolvers/C_TensorMG/DivVis.cpp b/Src/LinearSolvers/C_TensorMG/AMReX_DivVis.cpp similarity index 94% rename from Src/LinearSolvers/C_TensorMG/DivVis.cpp rename to Src/LinearSolvers/C_TensorMG/AMReX_DivVis.cpp index 54952dbe2..5771ab7ca 100644 --- a/Src/LinearSolvers/C_TensorMG/DivVis.cpp +++ b/Src/LinearSolvers/C_TensorMG/AMReX_DivVis.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include Real DivVis::a_def = 0.0; Real DivVis::b_def = 1.0; @@ -268,30 +268,30 @@ DivVis::Fsmooth (MultiFab& solnL, const FabSet& fw = (*undrrelxr[level])[oitr()]; const FabSet& tdw = (*tangderiv[level])[oitr()]; - const MultiMask& mmw = maskvals[level][oitr()]; + const MultiMask& mmw = *maskvals[level][oitr()]; oitr++; const FabSet& fs = (*undrrelxr[level])[oitr()]; const FabSet& tds = (*tangderiv[level])[oitr()]; - const MultiMask& mms = maskvals[level][oitr()]; + const MultiMask& mms = *maskvals[level][oitr()]; oitr++; #if BL_SPACEDIM>2 const FabSet& fb = (*undrrelxr[level])[oitr()]; const FabSet& tdb = (*tangderiv[level])[oitr()]; - const MultiMask& mmb = maskvals[level][oitr()]; + const MultiMask& mmb = *maskvals[level][oitr()]; oitr++; #endif const FabSet& fe = (*undrrelxr[level])[oitr()]; const FabSet& tde = (*tangderiv[level])[oitr()]; - const MultiMask& mme = maskvals[level][oitr()]; + const MultiMask& mme = *maskvals[level][oitr()]; oitr++; const FabSet& fn = (*undrrelxr[level])[oitr()]; const FabSet& tdn = (*tangderiv[level])[oitr()]; - const MultiMask& mmn = maskvals[level][oitr()]; + const MultiMask& mmn = *maskvals[level][oitr()]; oitr++; #if BL_SPACEDIM>2 const FabSet& ft = (*undrrelxr[level])[oitr()]; const FabSet& tdt = (*tangderiv[level])[oitr()]; - const MultiMask& mmt = maskvals[level][oitr()]; + const MultiMask& mmt = *maskvals[level][oitr()]; oitr++; #endif const MultiFab& a = aCoefficients(level); @@ -420,25 +420,25 @@ DivVis::compFlux (D_DECL(MultiFab& xflux, OrientationIter oitr; const FabSet& tdw = (*tangderiv[level])[oitr()]; - const MultiMask& mmw = maskvals[level][oitr()]; + const MultiMask& mmw = *maskvals[level][oitr()]; oitr++; const FabSet& tds = (*tangderiv[level])[oitr()]; - const MultiMask& mms = maskvals[level][oitr()]; + const MultiMask& mms = *maskvals[level][oitr()]; oitr++; #if BL_SPACEDIM>2 const FabSet& tdb = (*tangderiv[level])[oitr()]; - const MultiMask& mmb = maskvals[level][oitr()]; + const MultiMask& mmb = *maskvals[level][oitr()]; oitr++; #endif const FabSet& tde = (*tangderiv[level])[oitr()]; - const MultiMask& mme = maskvals[level][oitr()]; + const MultiMask& mme = *maskvals[level][oitr()]; oitr++; const FabSet& tdn = (*tangderiv[level])[oitr()]; - const MultiMask& mmn = maskvals[level][oitr()]; + const MultiMask& mmn = *maskvals[level][oitr()]; oitr++; #if BL_SPACEDIM>2 const FabSet& tdt = (*tangderiv[level])[oitr()]; - const MultiMask& mmt = maskvals[level][oitr()]; + const MultiMask& mmt = *maskvals[level][oitr()]; oitr++; #endif @@ -546,25 +546,25 @@ DivVis::Fapply (MultiFab& y, OrientationIter oitr; const FabSet& tdw = (*tangderiv[level])[oitr()]; - const MultiMask& mmw = maskvals[level][oitr()]; + const MultiMask& mmw = *maskvals[level][oitr()]; oitr++; const FabSet& tds = (*tangderiv[level])[oitr()]; - const MultiMask& mms = maskvals[level][oitr()]; + const MultiMask& mms = *maskvals[level][oitr()]; oitr++; #if BL_SPACEDIM>2 const FabSet& tdb = (*tangderiv[level])[oitr()]; - const MultiMask& mmb = maskvals[level][oitr()]; + const MultiMask& mmb = *maskvals[level][oitr()]; oitr++; #endif const FabSet& tde = (*tangderiv[level])[oitr()]; - const MultiMask& mme = maskvals[level][oitr()]; + const MultiMask& mme = *maskvals[level][oitr()]; oitr++; const FabSet& tdn = (*tangderiv[level])[oitr()]; - const MultiMask& mmn = maskvals[level][oitr()]; + const MultiMask& mmn = *maskvals[level][oitr()]; oitr++; #if BL_SPACEDIM>2 const FabSet& tdt = (*tangderiv[level])[oitr()]; - const MultiMask& mmt = maskvals[level][oitr()]; + const MultiMask& mmt = *maskvals[level][oitr()]; oitr++; #endif diff --git a/Src/LinearSolvers/C_TensorMG/DivVis_F.H b/Src/LinearSolvers/C_TensorMG/AMReX_DivVis_F.H similarity index 99% rename from Src/LinearSolvers/C_TensorMG/DivVis_F.H rename to Src/LinearSolvers/C_TensorMG/AMReX_DivVis_F.H index 41837d200..cf0937765 100644 --- a/Src/LinearSolvers/C_TensorMG/DivVis_F.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_DivVis_F.H @@ -1,7 +1,7 @@ #ifndef _DivVis_F_H_ #define _DivVis_F_H_ -#include +#include #if defined(BL_LANG_FORT) # if (BL_SPACEDIM==2) @@ -57,7 +57,7 @@ #endif -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_TensorMG/MCCGSolver.H b/Src/LinearSolvers/C_TensorMG/AMReX_MCCGSolver.H similarity index 97% rename from Src/LinearSolvers/C_TensorMG/MCCGSolver.H rename to Src/LinearSolvers/C_TensorMG/AMReX_MCCGSolver.H index e9cbd19da..78ef5b609 100644 --- a/Src/LinearSolvers/C_TensorMG/MCCGSolver.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCCGSolver.H @@ -4,13 +4,13 @@ #include -#include -#include +#include +#include -#include +#include -#include -#include +#include +#include /* A CGColver solves the linear equation, L(phi)=rhs, for a MCLinOp L and diff --git a/Src/LinearSolvers/C_TensorMG/MCCGSolver.cpp b/Src/LinearSolvers/C_TensorMG/AMReX_MCCGSolver.cpp similarity index 98% rename from Src/LinearSolvers/C_TensorMG/MCCGSolver.cpp rename to Src/LinearSolvers/C_TensorMG/AMReX_MCCGSolver.cpp index b31a7c19b..01e65dabf 100644 --- a/Src/LinearSolvers/C_TensorMG/MCCGSolver.cpp +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCCGSolver.cpp @@ -1,10 +1,10 @@ -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include namespace { diff --git a/Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_2D.F b/Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_2D.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_2D.F rename to Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_2D.F index 8c5648750..ce63637d5 100644 --- a/Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_2D.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_2D.F @@ -1,8 +1,8 @@ -#include "BC_TYPES.H" -#include "REAL.H" -#include "CONSTANTS.H" -#include "MCINTERPBNDRYDATA_F.H" -#include "ArrayLim.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_MCINTERPBNDRYDATA_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 #define NUMDERIV 2 diff --git a/Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_3D.F b/Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_3D.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_3D.F rename to Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_3D.F index 7c4c1bc4e..6760334a1 100644 --- a/Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_3D.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_3D.F @@ -1,8 +1,8 @@ -#include "BC_TYPES.H" -#include "REAL.H" -#include "CONSTANTS.H" -#include "MCINTERPBNDRYDATA_F.H" -#include "ArrayLim.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_MCINTERPBNDRYDATA_F.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 #define NUMDERIV 9 diff --git a/Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_F.H b/Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_F.H similarity index 99% rename from Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_F.H rename to Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_F.H index 25d01f7d5..03d38c4d0 100644 --- a/Src/LinearSolvers/C_TensorMG/MCINTERPBNDRYDATA_F.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCINTERPBNDRYDATA_F.H @@ -72,7 +72,7 @@ # endif #endif -#include +#include typedef void BDInterpFunc(Real* bndr, ARLIM_P(blo), ARLIM_P(bhi), const int* lo, const int* hi, diff --git a/Src/LinearSolvers/C_TensorMG/MCInterpBndryData.H b/Src/LinearSolvers/C_TensorMG/AMReX_MCInterpBndryData.H similarity index 90% rename from Src/LinearSolvers/C_TensorMG/MCInterpBndryData.H rename to Src/LinearSolvers/C_TensorMG/AMReX_MCInterpBndryData.H index 6f24c647a..0501c8486 100644 --- a/Src/LinearSolvers/C_TensorMG/MCInterpBndryData.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCInterpBndryData.H @@ -2,15 +2,15 @@ #ifndef _MCINTERPBNDRYDATA_H_ #define _MCINTERPBNDRYDATA_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* diff --git a/Src/LinearSolvers/C_TensorMG/MCInterpBndryData.cpp b/Src/LinearSolvers/C_TensorMG/AMReX_MCInterpBndryData.cpp similarity index 97% rename from Src/LinearSolvers/C_TensorMG/MCInterpBndryData.cpp rename to Src/LinearSolvers/C_TensorMG/AMReX_MCInterpBndryData.cpp index 75ff55e62..5823260fc 100644 --- a/Src/LinearSolvers/C_TensorMG/MCInterpBndryData.cpp +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCInterpBndryData.cpp @@ -1,10 +1,10 @@ -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include static BDInterpFunc* bdfunc[2*BL_SPACEDIM]; static BDPhysDerivative* bdider[2*BL_SPACEDIM]; @@ -224,7 +224,7 @@ MCInterpBndryData::setBndryValues (const ::BndryRegister& crse, // // Internal or periodic edge, interpolate from crse data. // - const Mask& mask = masks[face][finemfi]; + const Mask& mask = (*masks[face])[finemfi]; const int* mlo = mask.loVect(); const int* mhi = mask.hiVect(); const int* mdat = mask.dataPtr(); diff --git a/Src/LinearSolvers/C_TensorMG/MCLO_2D.F b/Src/LinearSolvers/C_TensorMG/AMReX_MCLO_2D.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/MCLO_2D.F rename to Src/LinearSolvers/C_TensorMG/AMReX_MCLO_2D.F index d1eff763a..8b19b41ff 100644 --- a/Src/LinearSolvers/C_TensorMG/MCLO_2D.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCLO_2D.F @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include c----------------------------------------------------------------------- subroutine FORT_HARMONIC_AVERAGEEC ( diff --git a/Src/LinearSolvers/C_TensorMG/MCLO_3D.F b/Src/LinearSolvers/C_TensorMG/AMReX_MCLO_3D.F similarity index 99% rename from Src/LinearSolvers/C_TensorMG/MCLO_3D.F rename to Src/LinearSolvers/C_TensorMG/AMReX_MCLO_3D.F index b76bac274..ac923bf2f 100644 --- a/Src/LinearSolvers/C_TensorMG/MCLO_3D.F +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCLO_3D.F @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include c----------------------------------------------------------------------- subroutine FORT_HARMONIC_AVERAGEEC ( diff --git a/Src/LinearSolvers/C_TensorMG/MCLO_F.H b/Src/LinearSolvers/C_TensorMG/AMReX_MCLO_F.H similarity index 98% rename from Src/LinearSolvers/C_TensorMG/MCLO_F.H rename to Src/LinearSolvers/C_TensorMG/AMReX_MCLO_F.H index 18a1e8386..8da54a7d3 100644 --- a/Src/LinearSolvers/C_TensorMG/MCLO_F.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCLO_F.H @@ -1,7 +1,7 @@ #ifndef _MCLO_F_H_ #define _MCLO_F_H_ -#include +#include #if defined(BL_LANG_FORT) # define FORT_AVERAGECC mcaveragecc @@ -26,7 +26,7 @@ # define FORT_APPLYBC mcapplybc_ # endif -#include +#include extern "C" { diff --git a/Src/LinearSolvers/C_TensorMG/MCLinOp.H b/Src/LinearSolvers/C_TensorMG/AMReX_MCLinOp.H similarity index 96% rename from Src/LinearSolvers/C_TensorMG/MCLinOp.H rename to Src/LinearSolvers/C_TensorMG/AMReX_MCLinOp.H index d6805c98e..fcccdf464 100644 --- a/Src/LinearSolvers/C_TensorMG/MCLinOp.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCLinOp.H @@ -2,15 +2,15 @@ #ifndef _MCLINOP_H_ #define _MCLINOP_H_ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include -#include +#include enum MCBC_Mode { MCHomogeneous_BC = 0, MCInhomogeneous_BC }; @@ -247,10 +247,10 @@ protected: // Array< LnClassPtr< BndryRegister > > tangderiv; // - // Array (on level) of PArrays (on orientation) of MultiMasks for + // Array (on level) of Arrays (on orientation) of MultiMasks for // whether boundary Fabs are covered, not_covered, outside_domain // - Array > maskvals; + Array > > maskvals; // // boundary data class // diff --git a/Src/LinearSolvers/C_TensorMG/MCLinOp.cpp b/Src/LinearSolvers/C_TensorMG/AMReX_MCLinOp.cpp similarity index 90% rename from Src/LinearSolvers/C_TensorMG/MCLinOp.cpp rename to Src/LinearSolvers/C_TensorMG/AMReX_MCLinOp.cpp index c7f962e7d..773ad6a55 100644 --- a/Src/LinearSolvers/C_TensorMG/MCLinOp.cpp +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCLinOp.cpp @@ -1,13 +1,13 @@ -#include +#include #include #include -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include #ifdef _OPENMP #include @@ -119,14 +119,14 @@ MCLinOp::initConstruct (const Real* _h) h[level][i] = _h[i]; } maskvals.resize(1); - maskvals[0].resize(2*BL_SPACEDIM, PArrayManage); + maskvals[0].resize(2*BL_SPACEDIM); for (OrientationIter oitr; oitr; ++oitr) { const Orientation face = oitr(); const MultiMask& m = bgb.bndryMasks(face); - maskvals[0].set(face, new MultiMask(m.boxArray(), m.DistributionMap(), 1)); - MultiMask::Copy(maskvals[0][face], m); + maskvals[0][face].reset(new MultiMask(m.boxArray(), m.DistributionMap(), 1)); + MultiMask::Copy(*maskvals[0][face], m); } } @@ -232,9 +232,9 @@ MCLinOp::applyBC (MultiFab& inout, else BoxLib::Abort("MCLinOp::applyBC(): bad logic"); - const Mask& m = maskvals[level][face][mfi]; - const Mask& mphi = maskvals[level][Orientation(perpdir,Orientation::high)][mfi]; - const Mask& mplo = maskvals[level][Orientation(perpdir,Orientation::low)][mfi]; + const Mask& m = (*maskvals[level][face])[mfi]; + const Mask& mphi = (*maskvals[level][Orientation(perpdir,Orientation::high)])[mfi]; + const Mask& mplo = (*maskvals[level][Orientation(perpdir,Orientation::low) ])[mfi]; FORT_APPLYBC( &flagden, &flagbc, &maxorder, inoutfab.dataPtr(), @@ -251,12 +251,12 @@ MCLinOp::applyBC (MultiFab& inout, iobx.loVect(), iobx.hiVect(), &nc, h[level]); #elif BL_SPACEDIM==3 - const Mask& mn = maskvals[level][Orientation(1,Orientation::high)][mfi]; - const Mask& me = maskvals[level][Orientation(0,Orientation::high)][mfi]; - const Mask& mw = maskvals[level][Orientation(0,Orientation::low)][mfi]; - const Mask& ms = maskvals[level][Orientation(1,Orientation::low)][mfi]; - const Mask& mt = maskvals[level][Orientation(2,Orientation::high)][mfi]; - const Mask& mb = maskvals[level][Orientation(2,Orientation::low)][mfi]; + const Mask& mn = (*maskvals[level][Orientation(1,Orientation::high)])[mfi]; + const Mask& me = (*maskvals[level][Orientation(0,Orientation::high)])[mfi]; + const Mask& mw = (*maskvals[level][Orientation(0,Orientation::low) ])[mfi]; + const Mask& ms = (*maskvals[level][Orientation(1,Orientation::low) ])[mfi]; + const Mask& mt = (*maskvals[level][Orientation(2,Orientation::high)])[mfi]; + const Mask& mb = (*maskvals[level][Orientation(2,Orientation::low) ])[mfi]; FORT_APPLYBC( &flagden, &flagbc, &maxorder, inoutfab.dataPtr(), @@ -375,15 +375,15 @@ MCLinOp::prepareForLevel (int level) // BL_ASSERT(maskvals.size() == level); maskvals.resize(level+1); - maskvals[level].resize(2*BL_SPACEDIM, PArrayManage); + maskvals[level].resize(2*BL_SPACEDIM); for (OrientationIter fi; fi; ++fi) { Orientation face = fi(); - maskvals[level].set(face, new MultiMask(gbox[level], - bgb.DistributionMap(), - geomarray[level], - face, 0, 1, 1, 1, true)); + maskvals[level][face].reset(new MultiMask(gbox[level], + bgb.DistributionMap(), + geomarray[level], + face, 0, 1, 1, 1, true)); } } @@ -528,9 +528,9 @@ operator<< (std::ostream& os, { const Orientation face = oitr(); - for (MultiMaskIter mmi(lp.maskvals[level][face]); mmi.isValid(); ++mmi) + for (MultiMaskIter mmi(*lp.maskvals[level][face]); mmi.isValid(); ++mmi) { - os << lp.maskvals[level][face][mmi]; + os << (*lp.maskvals[level][face])[mmi]; } } } diff --git a/Src/LinearSolvers/C_TensorMG/MCMultiGrid.H b/Src/LinearSolvers/C_TensorMG/AMReX_MCMultiGrid.H similarity index 99% rename from Src/LinearSolvers/C_TensorMG/MCMultiGrid.H rename to Src/LinearSolvers/C_TensorMG/AMReX_MCMultiGrid.H index 18daca3f2..101583673 100644 --- a/Src/LinearSolvers/C_TensorMG/MCMultiGrid.H +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCMultiGrid.H @@ -2,12 +2,11 @@ #ifndef _MCMULTIGRID_H_ #define _MCMULTIGRID_H_ -#include -#include -#include +#include +#include -#include -#include +#include +#include /* A MCMultiGrid solves the linear equation, L(phi)=rhs, for a MCLinOp L and diff --git a/Src/LinearSolvers/C_TensorMG/MCMultiGrid.cpp b/Src/LinearSolvers/C_TensorMG/AMReX_MCMultiGrid.cpp similarity index 98% rename from Src/LinearSolvers/C_TensorMG/MCMultiGrid.cpp rename to Src/LinearSolvers/C_TensorMG/AMReX_MCMultiGrid.cpp index 6348523ff..483ebbaf1 100644 --- a/Src/LinearSolvers/C_TensorMG/MCMultiGrid.cpp +++ b/Src/LinearSolvers/C_TensorMG/AMReX_MCMultiGrid.cpp @@ -1,14 +1,14 @@ -#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifdef _OPENMP #include diff --git a/Src/LinearSolvers/C_TensorMG/CMakeLists.txt b/Src/LinearSolvers/C_TensorMG/CMakeLists.txt index a893df72a..5205470f5 100644 --- a/Src/LinearSolvers/C_TensorMG/CMakeLists.txt +++ b/Src/LinearSolvers/C_TensorMG/CMakeLists.txt @@ -14,18 +14,18 @@ project(CTMGLIB) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files DivVis.cpp MCCGSolver.cpp MCInterpBndryData.cpp MCLinOp.cpp MCMultiGrid.cpp) -set(FPP_source_files MCINTERPBNDRYDATA_${BL_SPACEDIM}D.F MCLO_${BL_SPACEDIM}D.F) +set(CXX_source_files AMReX_DivVis.cpp AMReX_MCCGSolver.cpp AMReX_MCInterpBndryData.cpp AMReX_MCLinOp.cpp AMReX_MCMultiGrid.cpp) +set(FPP_source_files AMReX_MCINTERPBNDRYDATA_${BL_SPACEDIM}D.F AMReX_MCLO_${BL_SPACEDIM}D.F) if("${BL_SPACEDIM}" EQUAL 2) - list(APPEND FPP_source_files "DV_2D.F") + list(APPEND FPP_source_files "AMReX_DV_2D.F") elseif("${BL_SPACEDIM}" EQUAL 3) - list(APPEND FPP_source_files "DV_3D1.F" "DV_3D2.F" "DV_3D3.F") + list(APPEND FPP_source_files "AMReX_DV_3D1.F" "AMReX_DV_3D2.F" "AMReX_DV_3D3.F") endif() set(F77_source_files) set(F90_source_files) -set(CXX_header_files DivVis.H MCCGSolver.H MCInterpBndryData.H MCLinOp.H MCMultiGrid.H) -set(FPP_header_files DivVis_F.H MCINTERPBNDRYDATA_F.H MCLO_F.H) +set(CXX_header_files AMReX_DivVis.H AMReX_MCCGSolver.H AMReX_MCInterpBndryData.H AMReX_MCLinOp.H AMReX_MCMultiGrid.H) +set(FPP_header_files AMReX_DivVis_F.H AMReX_MCINTERPBNDRYDATA_F.H AMReX_MCLO_F.H) set(F77_header_files) set(F90_header_files) diff --git a/Src/LinearSolvers/C_TensorMG/DV_2D.mF b/Src/LinearSolvers/C_TensorMG/DV_2D.mF index b01ff5e6b..ff5f034c4 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_2D.mF +++ b/Src/LinearSolvers/C_TensorMG/DV_2D.mF @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DV_3D1.mF b/Src/LinearSolvers/C_TensorMG/DV_3D1.mF index 977688b7f..39d6a492c 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_3D1.mF +++ b/Src/LinearSolvers/C_TensorMG/DV_3D1.mF @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DV_3D2.mF b/Src/LinearSolvers/C_TensorMG/DV_3D2.mF index 5c63ea4d9..f7c5e01a6 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_3D2.mF +++ b/Src/LinearSolvers/C_TensorMG/DV_3D2.mF @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DV_3D3.mF b/Src/LinearSolvers/C_TensorMG/DV_3D3.mF index 77adea7a3..8e3407f13 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_3D3.mF +++ b/Src/LinearSolvers/C_TensorMG/DV_3D3.mF @@ -1,8 +1,8 @@ -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/DV_3D4.mF b/Src/LinearSolvers/C_TensorMG/DV_3D4.mF index 2edb77ae3..e927d2d1f 100644 --- a/Src/LinearSolvers/C_TensorMG/DV_3D4.mF +++ b/Src/LinearSolvers/C_TensorMG/DV_3D4.mF @@ -1,9 +1,9 @@ #define USE_TMP 1 -#include +#include -#include "DivVis_F.H" -#include -#include "ArrayLim.H" +#include "AMReX_DivVis_F.H" +#include +#include "AMReX_ArrayLim.H" c :::: usage: c :::: this .mF file is meant to be run through Mathematica. This converts diff --git a/Src/LinearSolvers/C_TensorMG/Make.package b/Src/LinearSolvers/C_TensorMG/Make.package index 1d208ce21..5f6ae40cc 100644 --- a/Src/LinearSolvers/C_TensorMG/Make.package +++ b/Src/LinearSolvers/C_TensorMG/Make.package @@ -2,19 +2,19 @@ MCMG_BASE=EXE ifeq ($(LBASE),mcmg) MCMG_BASE=LIB endif -C$(MCMG_BASE)_headers += DivVis.H MCCGSolver.H MCInterpBndryData.H MCLinOp.H -C$(MCMG_BASE)_headers += MCMultiGrid.H +C$(MCMG_BASE)_headers += AMReX_DivVis.H AMReX_MCCGSolver.H AMReX_MCInterpBndryData.H AMReX_MCLinOp.H +C$(MCMG_BASE)_headers += AMReX_MCMultiGrid.H -C$(MCMG_BASE)_sources += DivVis.cpp MCCGSolver.cpp MCInterpBndryData.cpp MCLinOp.cpp -C$(MCMG_BASE)_sources += MCMultiGrid.cpp +C$(MCMG_BASE)_sources += AMReX_DivVis.cpp AMReX_MCCGSolver.cpp AMReX_MCInterpBndryData.cpp AMReX_MCLinOp.cpp +C$(MCMG_BASE)_sources += AMReX_MCMultiGrid.cpp -F$(MCMG_BASE)_headers += DivVis_F.H MCINTERPBNDRYDATA_F.H MCLO_F.H -F$(MCMG_BASE)_sources += MCLO_$(DIM)D.F MCINTERPBNDRYDATA_$(DIM)D.F +F$(MCMG_BASE)_headers += AMReX_DivVis_F.H AMReX_MCINTERPBNDRYDATA_F.H AMReX_MCLO_F.H +F$(MCMG_BASE)_sources += AMReX_MCLO_$(DIM)D.F AMReX_MCINTERPBNDRYDATA_$(DIM)D.F ifeq ($(DIM),2) - F$(MCMG_BASE)_sources += DV_2D.F + F$(MCMG_BASE)_sources += AMReX_DV_2D.F else - F$(MCMG_BASE)_sources += DV_3D1.F DV_3D2.F DV_3D3.F + F$(MCMG_BASE)_sources += AMReX_DV_3D1.F AMReX_DV_3D2.F AMReX_DV_3D3.F endif VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_TensorMG diff --git a/Src/LinearSolvers/C_to_F_MG/FMultiGrid.H b/Src/LinearSolvers/C_to_F_MG/AMReX_FMultiGrid.H similarity index 67% rename from Src/LinearSolvers/C_to_F_MG/FMultiGrid.H rename to Src/LinearSolvers/C_to_F_MG/AMReX_FMultiGrid.H index 5f20e795e..103b7a085 100644 --- a/Src/LinearSolvers/C_to_F_MG/FMultiGrid.H +++ b/Src/LinearSolvers/C_to_F_MG/AMReX_FMultiGrid.H @@ -32,8 +32,8 @@ // // Step 6: OPTIONAL // Call get_fluxes to get fluxes (i.e., -beta b grad phi). The need_grad_phi -// flag in last step must be 1. Note that grad_phi is PArray with BL_SPACEDIM -// face-cented MultiFabs or Array in case of multiple levels. +// flag in last step must be 1. Note that grad_phi is Array with BL_SPACEDIM +// face-cented MultiFab pointerss or Array in case of multiple levels. // // If one only wants to test a solution by computing residual without actually // solving the problem, or apply the operator. Replace Step 5 with a call to @@ -46,9 +46,9 @@ #ifndef _FMultiGrid_H_ #define _FMultiGrid_H_ -#include -#include -#include +#include +#include +#include #include class FMultiGrid @@ -56,19 +56,14 @@ class FMultiGrid public: // single level - FMultiGrid (const Geometry & geom, - int baselevel = 0, - IntVect crse_ratio = IntVect::TheZeroVector()); + FMultiGrid (const Geometry & geom, + int baselevel = 0, + IntVect crse_ratio = IntVect::TheZeroVector()); // multi level - FMultiGrid (const std::vector & geom, - int baselevel = 0, - IntVect crse_ratio = IntVect::TheZeroVector()); - - // multi level - FMultiGrid (const PArray & geom, - int baselevel = 0, - IntVect crse_ratio = IntVect::TheZeroVector()); + FMultiGrid (const Array & geom, + int baselevel = 0, + IntVect crse_ratio = IntVect::TheZeroVector()); ~FMultiGrid () { } @@ -99,23 +94,23 @@ public: void set_const_gravity_coeffs (); // For gravity_eq - void set_gravity_coeffs ( PArray & b); // single level - void set_gravity_coeffs (Array< PArray >& b); // multi level + void set_gravity_coeffs (const Array & b); // single level + void set_gravity_coeffs (const Array< Array >& b); // multi level // For MAC projection - void set_mac_coeffs (PArray &b); + void set_mac_coeffs (const Array &b); // For Diffusion operator - void set_diffusion_coeffs ( PArray & b) // single level + void set_diffusion_coeffs (const Array & b) // single level { set_gravity_coeffs(b); } - void set_diffusion_coeffs (Array< PArray >& b) // multi level + void set_diffusion_coeffs (const Array< Array >& b) // multi level { set_gravity_coeffs(b); } // For general_eq void set_scalars (Real alpha, Real beta); // - void set_coefficients (const MultiFab &a, PArray & b); - void set_coefficients (PArray &a, Array > & b); + void set_coefficients (const MultiFab &a, const Array & b); + void set_coefficients (const Array &a, const Array > & b); Real solve (MultiFab& phi, MultiFab& rhs, @@ -123,28 +118,27 @@ public: int always_use_bnorm = 0, int need_grad_phi = 0, int verbose = 0); - Real solve (PArray& phi, - PArray& rhs, + Real solve (const Array& phi, + const Array& rhs, Real rel_tol, Real abs_tol, int always_use_bnorm = 0, int need_grad_phi = 0, int verbose = 0); - void get_fluxes ( PArray & grad_phi, int ilev = 0); - void get_fluxes ( Array >& grad_phi); - void get_fluxes (PArray >& grad_phi); + void get_fluxes (const Array & grad_phi, int ilev = 0); + void get_fluxes (const Array >& grad_phi); void compute_residual (MultiFab & phi, MultiFab & rhs, MultiFab & res); - void compute_residual (PArray & phi, - PArray & rhs, - PArray & res); + void compute_residual (const Array & phi, + const Array & rhs, + const Array & res); void applyop (MultiFab & phi, MultiFab & res); - void applyop (PArray & phi, - PArray & res); + void applyop (const Array & phi, + const Array & res); private: @@ -155,13 +149,12 @@ private: int m_maxorder; int m_verbose; - std::vector m_geom; + Array m_geom; MacBndry * m_bndry; - MGT_Solver * m_mgt_solver; + std::unique_ptr RAII_bndry; - PArray RAII_bndry; - PArray RAII_mgt_solver; + std::unique_ptr m_mgt_solver; struct Boundary { @@ -192,21 +185,21 @@ private: bool scalars_set; bool coeffs_set; Real alpha; - PArray a; + Array a; Real beta; - Array > b; + Array > b; ABecCoeff () : eq_type(invalid_eq), scalars_set(false), coeffs_set(false), alpha(0), beta(0) {} void set_coeffs (MGT_Solver & mgt_solver, FMultiGrid& fmg); }; ABecCoeff m_coeff; - static void Copy (PArray& dst, const MultiFab& src); - static void Copy (PArray& dst, PArray& src); - static void Copy (Array >& dst, PArray& src); - static void Copy (Array >& dst, Array >& src); + static void Copy (Array& dst, const MultiFab& src); + static void Copy (Array& dst, const Array& src); + static void Copy (Array >& dst, const Array& src); + static void Copy (Array >& dst, const Array >& src); - void init_mgt_solver (PArray& phi); + void init_mgt_solver (const Array& phi); }; #endif diff --git a/Src/LinearSolvers/C_to_F_MG/FMultiGrid.cpp b/Src/LinearSolvers/C_to_F_MG/AMReX_FMultiGrid.cpp similarity index 62% rename from Src/LinearSolvers/C_to_F_MG/FMultiGrid.cpp rename to Src/LinearSolvers/C_to_F_MG/AMReX_FMultiGrid.cpp index 40d43809a..9d6ed121e 100644 --- a/Src/LinearSolvers/C_to_F_MG/FMultiGrid.cpp +++ b/Src/LinearSolvers/C_to_F_MG/AMReX_FMultiGrid.cpp @@ -1,4 +1,4 @@ -#include +#include FMultiGrid::FMultiGrid (const Geometry & geom, int baselevel, @@ -10,39 +10,16 @@ FMultiGrid::FMultiGrid (const Geometry & geom, m_stencil(CC_CROSS_STENCIL), m_maxorder(0), m_verbose(0), - m_geom(m_nlevels), - m_bndry(0), - m_mgt_solver(0) + m_geom(1,geom), + m_bndry(nullptr) { - m_geom[0] = geom; - - if (m_baselevel > 0 && m_crse_ratio == IntVect::TheZeroVector()) - BoxLib::Abort("FMultiGrid: must set crse_ratio if baselevel > 0"); -} - -FMultiGrid::FMultiGrid (const std::vector & geom, - int baselevel, - IntVect crse_ratio) - : - m_nlevels(geom.size()), - m_baselevel(baselevel), - m_crse_ratio(crse_ratio), - m_stencil(CC_CROSS_STENCIL), - m_maxorder(0), - m_verbose(0), - m_geom(m_nlevels), - m_bndry(0), - m_mgt_solver(0) -{ - m_geom = geom; - if (m_baselevel > 0 && m_crse_ratio == IntVect::TheZeroVector()) BoxLib::Abort("FMultiGrid: must set crse_ratio if baselevel > 0"); } -FMultiGrid::FMultiGrid (const PArray & geom, - int baselevel, - IntVect crse_ratio) +FMultiGrid::FMultiGrid (const Array & geom, + int baselevel, + IntVect crse_ratio) : m_nlevels(geom.size()), m_baselevel(baselevel), @@ -50,14 +27,9 @@ FMultiGrid::FMultiGrid (const PArray & geom, m_stencil(CC_CROSS_STENCIL), m_maxorder(0), m_verbose(0), - m_geom(m_nlevels), - m_bndry(0), - m_mgt_solver(0) + m_geom(geom), + m_bndry(nullptr) { - for (int ilev = 0; ilev < m_nlevels; ++ilev) { - m_geom[ilev] = geom[ilev]; - } - if (m_baselevel > 0 && m_crse_ratio == IntVect::TheZeroVector()) BoxLib::Abort("FMultiGrid: must set crse_ratio if baselevel > 0"); } @@ -92,7 +64,7 @@ FMultiGrid::set_bc (int * mg_bc, void FMultiGrid::set_bc (const MacBndry& mac_bndry) { - BL_ASSERT(m_bndry == 0); + BL_ASSERT(m_bndry == nullptr); m_bndry = const_cast(&mac_bndry); } @@ -105,7 +77,7 @@ FMultiGrid::set_const_gravity_coeffs () } void -FMultiGrid::set_gravity_coeffs (PArray& b) +FMultiGrid::set_gravity_coeffs (const Array& b) { BL_ASSERT(m_coeff.eq_type == invalid_eq); BL_ASSERT(m_nlevels == 1); @@ -118,7 +90,7 @@ FMultiGrid::set_gravity_coeffs (PArray& b) } void -FMultiGrid::set_gravity_coeffs (Array< PArray >& b) +FMultiGrid::set_gravity_coeffs (const Array< Array >& b) { BL_ASSERT(m_coeff.eq_type == invalid_eq); BL_ASSERT(b.size() == m_nlevels); @@ -131,7 +103,7 @@ FMultiGrid::set_gravity_coeffs (Array< PArray >& b) } void -FMultiGrid::set_mac_coeffs (PArray& b) +FMultiGrid::set_mac_coeffs (const Array& b) { BL_ASSERT(m_coeff.eq_type == invalid_eq); BL_ASSERT(m_nlevels == 1); @@ -157,7 +129,7 @@ FMultiGrid::set_scalars (Real alpha, Real beta) } void -FMultiGrid::set_coefficients (const MultiFab& a, PArray & b) +FMultiGrid::set_coefficients (const MultiFab& a, const Array & b) { BL_ASSERT(m_coeff.eq_type == invalid_eq || m_coeff.eq_type == general_eq); BL_ASSERT(!m_coeff.coeffs_set); @@ -171,7 +143,7 @@ FMultiGrid::set_coefficients (const MultiFab& a, PArray & b) } void -FMultiGrid::set_coefficients (PArray& a, Array > & b) +FMultiGrid::set_coefficients (const Array& a, const Array > & b) { BL_ASSERT(m_coeff.eq_type == invalid_eq || m_coeff.eq_type == general_eq); BL_ASSERT(!m_coeff.coeffs_set); @@ -193,8 +165,8 @@ FMultiGrid::solve (MultiFab& phi, int need_grad_phi, int verbose) { - PArray phi_p; - PArray rhs_p; + Array phi_p; + Array rhs_p; Copy(phi_p, phi); Copy(rhs_p, rhs); return solve(phi_p, rhs_p, rel_tol, abs_tol, @@ -202,36 +174,28 @@ FMultiGrid::solve (MultiFab& phi, } Real -FMultiGrid::solve (PArray& phi, - PArray& rhs, +FMultiGrid::solve (const Array& phi, + const Array& rhs, Real rel_tol, Real abs_tol, int always_use_bnorm , int need_grad_phi, int verbose) { - BL_ASSERT( m_bc.initilized || m_bndry != 0); - BL_ASSERT(!(m_bc.initilized && m_bndry != 0)); + BL_ASSERT( m_bc.initilized || m_bndry); + BL_ASSERT(!(m_bc.initilized && m_bndry)); BL_ASSERT(m_coeff.eq_type != invalid_eq); - BL_ASSERT(m_mgt_solver == 0); - - MultiFab* phi_p[m_nlevels]; - MultiFab* rhs_p[m_nlevels]; - for (int ilev=0; ilev < m_nlevels; ++ilev) - { - phi_p[ilev] = &phi[ilev]; - rhs_p[ilev] = &rhs[ilev]; - } + BL_ASSERT(!m_mgt_solver); init_mgt_solver(phi); Real final_resnorm; - m_mgt_solver->solve(phi_p, rhs_p, *m_bndry, rel_tol, abs_tol, + m_mgt_solver->solve(phi, rhs, *m_bndry, rel_tol, abs_tol, always_use_bnorm, final_resnorm, need_grad_phi); return final_resnorm; } void -FMultiGrid::get_fluxes (PArray& grad_phi, int ilev) +FMultiGrid::get_fluxes (const Array& grad_phi, int ilev) { BL_ASSERT(ilev < m_nlevels); @@ -240,7 +204,7 @@ FMultiGrid::get_fluxes (PArray& grad_phi, int ilev) } void -FMultiGrid::get_fluxes (Array >& grad_phi) +FMultiGrid::get_fluxes (const Array >& grad_phi) { for (int ilev = 0; ilev < m_nlevels; ++ilev) { @@ -249,24 +213,14 @@ FMultiGrid::get_fluxes (Array >& grad_phi) } } -void -FMultiGrid::get_fluxes (PArray >& grad_phi) -{ - for (int ilev = 0; ilev < m_nlevels; ++ilev) - { - const Real* dx = m_geom[ilev].CellSize(); - m_mgt_solver->get_fluxes(ilev, grad_phi[ilev], dx); - } -} - void FMultiGrid::compute_residual (MultiFab & phi, MultiFab & rhs, MultiFab & res) { - PArray phi_p; - PArray rhs_p; - PArray res_p; + Array phi_p; + Array rhs_p; + Array res_p; Copy(phi_p, phi); Copy(rhs_p, rhs); Copy(res_p, res); @@ -274,104 +228,70 @@ FMultiGrid::compute_residual (MultiFab & phi, } void -FMultiGrid::compute_residual (PArray & phi, - PArray & rhs, - PArray & res) +FMultiGrid::compute_residual (const Array & phi, + const Array & rhs, + const Array & res) { - BL_ASSERT( m_bc.initilized || m_bndry != 0); - BL_ASSERT(!(m_bc.initilized && m_bndry != 0)); + BL_ASSERT( m_bc.initilized || m_bndry); + BL_ASSERT(!(m_bc.initilized && m_bndry)); BL_ASSERT(m_coeff.eq_type != invalid_eq); - BL_ASSERT(m_mgt_solver == 0); - - MultiFab* phi_p[m_nlevels]; - MultiFab* rhs_p[m_nlevels]; - MultiFab* res_p[m_nlevels]; - for (int ilev=0; ilev < m_nlevels; ++ilev) - { - phi_p[ilev] = &phi[ilev]; - rhs_p[ilev] = &rhs[ilev]; - res_p[ilev] = &res[ilev]; - } + BL_ASSERT(!m_mgt_solver); init_mgt_solver(phi); - m_mgt_solver->compute_residual(phi_p, rhs_p, res_p, *m_bndry); + m_mgt_solver->compute_residual(phi, rhs, res, *m_bndry); } void FMultiGrid::applyop (MultiFab & phi, MultiFab & res) { - PArray phi_p; - PArray res_p; + Array phi_p; + Array res_p; Copy(phi_p, phi); Copy(res_p, res); applyop(phi_p, res_p); } void -FMultiGrid::applyop (PArray & phi, - PArray & res) +FMultiGrid::applyop (const Array & phi, + const Array & res) { - BL_ASSERT( m_bc.initilized || m_bndry != 0); - BL_ASSERT(!(m_bc.initilized && m_bndry != 0)); + BL_ASSERT( m_bc.initilized || m_bndry); + BL_ASSERT(!(m_bc.initilized && m_bndry)); BL_ASSERT(m_coeff.eq_type != invalid_eq); - BL_ASSERT(m_mgt_solver == 0); - BL_ASSERT(m_bndry == 0); - - MultiFab* phi_p[m_nlevels]; - MultiFab* res_p[m_nlevels]; - for (int ilev=0; ilev < m_nlevels; ++ilev) - { - phi_p[ilev] = &phi[ilev]; - res_p[ilev] = &res[ilev]; - } + BL_ASSERT(!m_mgt_solver); + BL_ASSERT(m_bndry == nullptr); init_mgt_solver(phi); - m_mgt_solver->applyop(phi_p, res_p, *m_bndry); + m_mgt_solver->applyop(phi, res, *m_bndry); } void -FMultiGrid::Copy (PArray& dst, const MultiFab& src) +FMultiGrid::Copy (Array& dst, const MultiFab& src) { dst.resize(1); - dst.set(0, &src); + dst[0] = const_cast(&src); } void -FMultiGrid::Copy (PArray& dst, PArray& src) +FMultiGrid::Copy (Array& dst, const Array& src) { - int nlevels = src.size(); - dst.resize(nlevels); - for (int ilev = 0; ilev < nlevels; ++ilev) { - dst.set(ilev, &src[ilev]); - } + dst = src; } void -FMultiGrid::Copy (Array >& dst, PArray& src) +FMultiGrid::Copy (Array >& dst, const Array& src) { - int ndim = src.size(); dst.resize(1); - dst[0].resize(ndim); - for(int idim = 0; idim < ndim; ++idim) { - dst[0].set(idim, &src[idim]); - } + dst[0] = src; } void -FMultiGrid::Copy (Array >& dst, Array >& src) +FMultiGrid::Copy (Array >& dst, const Array >& src) { - int nlevels = src.size(); - int ndim = src[0].size(); - dst.resize(nlevels); - for (int ilev = 0; ilev < nlevels; ++ilev) { - dst[ilev].resize(ndim); - for(int idim = 0; idim < ndim; ++idim) { - dst[ilev].set(idim, &src[ilev][idim]); - } - } + dst = src; } void @@ -480,22 +400,22 @@ FMultiGrid::ABecCoeff::set_coeffs (MGT_Solver & mgt_solver, FMultiGrid& fmg) } void -FMultiGrid::init_mgt_solver (PArray& phi) +FMultiGrid::init_mgt_solver (const Array& phi) { - BL_ASSERT( m_bc.initilized || m_bndry != 0); - BL_ASSERT(!(m_bc.initilized && m_bndry != 0)); + BL_ASSERT( m_bc.initilized || m_bndry); + BL_ASSERT(!(m_bc.initilized && m_bndry)); BL_ASSERT(m_coeff.eq_type != invalid_eq); - BL_ASSERT(m_mgt_solver == 0); + BL_ASSERT(!m_mgt_solver); - int ncomp = phi[0].nComp(); + int ncomp = phi[0]->nComp(); - std::vector dmap(m_nlevels); - std::vector ba(m_nlevels); + Array dmap(m_nlevels); + Array ba(m_nlevels); for (int ilev = 0; ilev < m_nlevels; ++ilev) { - dmap[ilev] = phi[ilev].DistributionMap(); - ba [ilev] = phi[ilev].boxArray(); + dmap[ilev] = phi[ilev]->DistributionMap(); + ba [ilev] = phi[ilev]->boxArray(); } bool nodal = false; @@ -524,17 +444,14 @@ FMultiGrid::init_mgt_solver (PArray& phi) } } - RAII_mgt_solver.resize(1, PArrayManage); - RAII_mgt_solver.set(0, new MGT_Solver (m_geom, mg_bc.dataPtr() , ba, dmap, nodal, - m_stencil, nodal, nc, ncomp, m_verbose)); - m_mgt_solver = &(RAII_mgt_solver[0]); + m_mgt_solver.reset(new MGT_Solver (m_geom, mg_bc.dataPtr() , ba, dmap, nodal, + m_stencil, nodal, nc, ncomp, m_verbose)); if (m_maxorder > 0) m_mgt_solver->set_maxorder(m_maxorder); - if (m_bndry == 0) { - RAII_bndry.resize(1, PArrayManage); - RAII_bndry.set(0, new MacBndry (ba[0], ncomp, m_geom[0])); - m_bndry = &(RAII_bndry[0]); + if (m_bndry == nullptr) { + RAII_bndry.reset(new MacBndry (ba[0], ncomp, m_geom[0])); + m_bndry = RAII_bndry.get(); m_bc.set_bndry_values(*m_bndry, m_crse_ratio); } diff --git a/Src/LinearSolvers/C_to_F_MG/AMReX_MGT_Solver.H b/Src/LinearSolvers/C_to_F_MG/AMReX_MGT_Solver.H new file mode 100644 index 000000000..cb7bdbeec --- /dev/null +++ b/Src/LinearSolvers/C_to_F_MG/AMReX_MGT_Solver.H @@ -0,0 +1,124 @@ +#ifndef _MGT_SOLVER_ +#define _MGT_SOLVER_ + +#include +#include +#include +#include +#include + +#include + +class MGT_Solver +{ +public: + + MGT_Solver(const Array& geom, + int* bc, + const Array& grids, + const Array& dmap, + bool nodal, + int stencil_type, + bool _have_rhcc = false, + int nc = 0, + int ncomp = 1, + int verbose = 0); + + static void initialize(bool nodal); + static void Finalize(); + static void FlushFortranOutput(); + + void set_cfa_const (Real alpha, int lev); + static void set_cfa (const MultiFab& aa, int lev); + static void set_cfaa (const MultiFab& aa, Real alpha, int lev); + static void set_cfb (const MultiFab& bb, Real beta, int lev, int dir); + + static void set_rh (const MultiFab& mf, int lev); + static void set_uu (const MultiFab& mf, int lev); + + static void get_uu (MultiFab& mf, int lev, int ng); + static void get_res (MultiFab& mf, int lev); + static void get_gp (MultiFab& mf, int lev, int dir, Real dx); + + // + // (alpha * aa - beta * (del dot bb grad)) phi = RHS + // + void set_abeclap_coeffs (Real alpha, // aa is constant one + Real beta, + const Array >& bb, + const Array >& xa, + const Array >& xb); + void set_abeclap_coeffs (const Array& aa, // alpha is one + Real beta, + const Array >& bb, + const Array >& xa, + const Array >& xb); + void set_abeclap_coeffs (Real alpha, + const Array& aa, + Real beta, + const Array >& bb, + const Array >& xa, + const Array >& xb); + + void set_mac_coefficients(const Array >& bb, + const Array >& xa, + const Array >& xb); + + void set_gravity_coefficients(const Array >& bb, + const Array >& xa, + const Array >& xb); + + void set_const_gravity_coeffs(const Array< Array >& xa, + const Array< Array >& xb); + + void set_maxorder(const int max_order); + + void solve(const Array& uu, const Array& rh, const BndryData& bd, + Real tol, Real abs_tol, int always_use_bnorm, + Real& final_resnorm, int need_grad_phi=0); + + void applyop(const Array& uu, const Array& res, const BndryData& bd); + + void compute_residual(const Array& uu, const Array& rh, + const Array& res, const BndryData& bd); + + void get_fluxes(int lev, const Array& flux, const Real* dx); + + void set_nodal_coefficients(const Array& aa); + void set_nodal_const_coefficients(Real val); + void nodal_project(const Array& uu, const Array& vel, + const Array& rhcc, const Array& rhnd, + const Real& tol, const Real& abs_tol, + int* lo_inflow=0, int* hi_inflow=0); + + void fill_sync_resid(MultiFab& sync_resid_crse, const MultiFab& msk, const MultiFab& vold, + int isCoarse); + + ~MGT_Solver(); + + static int def_maxiter, def_maxiter_b, def_bottom_solver; + static int def_nu_1, def_nu_2, def_nu_b, def_nu_f; + static int def_verbose, def_cg_verbose; + static int def_min_width, def_max_nlevel; + static int def_cycle, def_smoother; + static int def_usecg, def_cg_solver; + static Real def_bottom_solver_eps, def_max_L0_growth; + +private: + + void Build(const Array& geom, + int* bc, int stencil_type, + const Array& dmap, + int nc, + int ncomp); + + int verbose; + int m_nlevel; + Array m_grids; + bool m_nodal; + bool have_rhcc; + + static bool initialized; + +}; +#endif diff --git a/Src/LinearSolvers/C_to_F_MG/MGT_Solver.cpp b/Src/LinearSolvers/C_to_F_MG/AMReX_MGT_Solver.cpp similarity index 86% rename from Src/LinearSolvers/C_to_F_MG/MGT_Solver.cpp rename to Src/LinearSolvers/C_to_F_MG/AMReX_MGT_Solver.cpp index 35329c78c..08622a473 100644 --- a/Src/LinearSolvers/C_to_F_MG/MGT_Solver.cpp +++ b/Src/LinearSolvers/C_to_F_MG/AMReX_MGT_Solver.cpp @@ -1,9 +1,9 @@ -#include -#include -#include +#include +#include +#include #ifdef BL_MEM_PROFILING -#include +#include #endif bool MGT_Solver::initialized = false; @@ -74,7 +74,6 @@ mgt_setni mgt_set_pr = mgt_set_pr_1d; mgt_set mgt_set_rh = mgt_set_rh_1d; mgt_set mgt_set_cfa = mgt_set_cfa_1d; mgt_setr mgt_set_cfaa = mgt_set_cfaa_1d; -mgt_setn mgt_set_cfa2 = mgt_set_cfa2_1d; mgt_set_cf mgt_set_cfbx = mgt_set_cfbx_1d; mgt_set_cfn mgt_set_cfbnx = mgt_set_cfbnx_1d; mgt_set_c mgt_set_cfa_const = mgt_set_cfa_1d_const; @@ -96,7 +95,6 @@ mgt_setni mgt_set_pr = mgt_set_pr_2d; mgt_set mgt_set_rh = mgt_set_rh_2d; mgt_set mgt_set_cfa = mgt_set_cfa_2d; mgt_setr mgt_set_cfaa = mgt_set_cfaa_2d; -mgt_setn mgt_set_cfa2 = mgt_set_cfa2_2d; mgt_set_c mgt_set_cfa_const = mgt_set_cfa_2d_const; mgt_set_cf mgt_set_cfbx = mgt_set_cfbx_2d; mgt_set_cfn mgt_set_cfbnx = mgt_set_cfbnx_2d; @@ -120,7 +118,6 @@ mgt_setni mgt_set_pr = mgt_set_pr_3d; mgt_set mgt_set_rh = mgt_set_rh_3d; mgt_set mgt_set_cfa = mgt_set_cfa_3d; mgt_setr mgt_set_cfaa = mgt_set_cfaa_3d; -mgt_setn mgt_set_cfa2 = mgt_set_cfa2_3d; mgt_set_c mgt_set_cfa_const = mgt_set_cfa_3d_const; mgt_set_cf mgt_set_cfbx = mgt_set_cfbx_3d; mgt_set_cfn mgt_set_cfbnx = mgt_set_cfbnx_3d; @@ -144,10 +141,10 @@ mgt_set mgt_set_rhcc_nodal = mgt_set_rhcc_nodal_3d; // (\alpha I - \beta \sum_i (1/b_i) \nabla a_i \nabla) \phi // -MGT_Solver::MGT_Solver(const std::vector& geom, +MGT_Solver::MGT_Solver(const Array& geom, int* bc, - const std::vector& grids, - const std::vector& dmap, + const Array& grids, + const Array& dmap, bool nodal, int stencil_type, bool _have_rhcc, @@ -168,10 +165,10 @@ MGT_Solver::MGT_Solver(const std::vector& geom, void -MGT_Solver::Build(const std::vector& geom, +MGT_Solver::Build(const Array& geom, int* bc, int stencil_type, - const std::vector& dmap, + const Array& dmap, int nc, int ncomp) @@ -216,8 +213,8 @@ MGT_Solver::Build(const std::vector& geom, Box domain = geom[lev].Domain(); int nb = m_grids[lev].size(); - std::vector lo(nb*dm); - std::vector hi(nb*dm); + Array lo(nb*dm); + Array hi(nb*dm); for ( int i = 0; i < nb; ++i ) { @@ -237,7 +234,7 @@ MGT_Solver::Build(const std::vector& geom, } } - std::vector dx(m_nlevel*dm); + Array dx(m_nlevel*dm); for ( int lev = 0; lev < m_nlevel; ++lev ) { for ( int j = 0; j < dm; ++j ) @@ -380,7 +377,7 @@ MGT_Solver::initialize(bool nodal) void MGT_Solver::set_abeclap_coeffs (Real alpha, Real beta, - const Array >& bb, + const Array< Array >& bb, const Array< Array >& xa, const Array< Array >& xb) { @@ -403,7 +400,7 @@ MGT_Solver::set_abeclap_coeffs (Real alpha, for ( int lev = 0; lev < m_nlevel; ++lev ) { for (int d=0; d& aa, +MGT_Solver::set_abeclap_coeffs (const Array& aa, Real beta, - const Array >& bb, + const Array< Array >& bb, const Array< Array >& xa, const Array< Array >& xb) { @@ -441,10 +438,10 @@ MGT_Solver::set_abeclap_coeffs (const PArray& aa, #endif for ( int lev = 0; lev < m_nlevel; ++lev ) { - set_cfa(aa[lev], lev); + set_cfa(*aa[lev], lev); for (int d=0; d& aa, // void MGT_Solver::set_abeclap_coeffs (Real alpha, - const PArray& aa, + const Array& aa, Real beta, - const Array >& bb, + const Array< Array >& bb, const Array< Array >& xa, const Array< Array >& xb) { @@ -482,10 +479,10 @@ MGT_Solver::set_abeclap_coeffs (Real alpha, #endif for ( int lev = 0; lev < m_nlevel; ++lev ) { - set_cfaa(aa[lev], alpha, lev); + set_cfaa(*aa[lev], alpha, lev); for (int d=0; d >& bb, +MGT_Solver::set_mac_coefficients(const Array< Array >& bb, const Array< Array >& xa, const Array< Array >& xb) { @@ -510,7 +507,7 @@ MGT_Solver::set_mac_coefficients(const Array >& bb, } void -MGT_Solver::set_gravity_coefficients(const Array< PArray >& bb, +MGT_Solver::set_gravity_coefficients(const Array< Array >& bb, const Array< Array >& xa, const Array< Array >& xb) { @@ -541,49 +538,7 @@ MGT_Solver::set_const_gravity_coeffs(const Array< Array >& xa, } void -MGT_Solver::set_porous_coefficients(const PArray& a1, - const PArray& a2, - const Array >& bb, - const Real& beta, - const Array< Array >& xa, - const Array< Array >& xb, - int nc_opt) -{ - Array pxa(BL_SPACEDIM, 0.0); - Array pxb(BL_SPACEDIM, 0.0); - - int nc = bb[0][0].nComp(); - - for ( int lev = 0; lev < m_nlevel; ++lev ) - { - mgt_init_mc_coeffs_lev(&lev,&nc,&nc_opt); - } - -#ifdef _OPENMP -#pragma omp parallel -#endif - for ( int lev = 0; lev < m_nlevel; ++lev ) - { - set_cfa(a1[lev], lev); - if (nc_opt == 0) set_cfa2(a2[lev], lev); - - for (int d=0; d& sig) { for ( int lev = 0; lev < m_nlevel; ++lev ) { mgt_init_nodal_coeffs_lev(&lev); @@ -631,7 +586,7 @@ void MGT_Solver::set_maxorder(const int max_order) } void -MGT_Solver::solve(MultiFab* uu[], MultiFab* rh[], const BndryData& bd, +MGT_Solver::solve(const Array& uu, const Array& rh, const BndryData& bd, Real tol, Real abs_tol, int always_use_bnorm, Real& final_resnorm, int need_grad_phi) { @@ -681,7 +636,7 @@ MGT_Solver::solve(MultiFab* uu[], MultiFab* rh[], const BndryData& bd, } void -MGT_Solver::applyop(MultiFab* uu[], MultiFab* res[], const BndryData& bd) +MGT_Solver::applyop(const Array& uu, const Array& res, const BndryData& bd) { // Copy the boundary register values into the solution array to be copied into F90 int lev = 0; @@ -718,7 +673,8 @@ MGT_Solver::applyop(MultiFab* uu[], MultiFab* res[], const BndryData& bd) } void -MGT_Solver::compute_residual(MultiFab* uu[], MultiFab* rh[], MultiFab* res[], const BndryData& bd) +MGT_Solver::compute_residual(const Array& uu, const Array& rh, + const Array& res, const BndryData& bd) { // Copy the boundary register values into the solution array to be copied into F90 int lev = 0; @@ -756,7 +712,7 @@ MGT_Solver::compute_residual(MultiFab* uu[], MultiFab* rh[], MultiFab* res[], co } void -MGT_Solver::get_fluxes(int lev, PArray& flux, const Real* dx) +MGT_Solver::get_fluxes(int lev, const Array& flux, const Real* dx) { mgt_compute_flux(lev); @@ -765,14 +721,15 @@ MGT_Solver::get_fluxes(int lev, PArray& flux, const Real* dx) #endif for ( int dir = 0; dir < BL_SPACEDIM; ++dir ) { - get_gp(flux[dir], lev, dir, dx[dir]); + get_gp(*flux[dir], lev, dir, dx[dir]); } mgt_delete_flux(lev); } void -MGT_Solver::nodal_project(MultiFab* p[], MultiFab* vel[], MultiFab* rhcc[], const PArray& rhnd, +MGT_Solver::nodal_project(const Array& p, const Array& vel, + const Array& rhcc, const Array& rhnd, const Real& tol, const Real& abs_tol, int* lo_inflow, int* hi_inflow) { @@ -820,12 +777,12 @@ MGT_Solver::nodal_project(MultiFab* p[], MultiFab* vel[], MultiFab* rhcc[], cons Real rmax_this = -1.0; for ( int lev = 0; lev < rhnd.size(); ++lev ) { - if (rhnd.defined(lev)) { - for (MFIter mfi(rhnd[lev], true); mfi.isValid(); ++mfi) + if (rhnd[lev]) { + for (MFIter mfi(*rhnd[lev], true); mfi.isValid(); ++mfi) { const int n = mfi.LocalIndex(); const Box& bx = mfi.tilebox(); - const FArrayBox& rfab = (rhnd[lev])[mfi]; + const FArrayBox& rfab = (*rhnd[lev])[mfi]; const Box& rbox = rfab.box(); mgt_add_rh_nodal(&lev, &n, rfab.dataPtr(), rbox.loVect(), rbox.hiVect(), bx.loVect(), bx.hiVect(), &rmax_this); @@ -898,7 +855,7 @@ MGT_Solver::nodal_project(MultiFab* p[], MultiFab* vel[], MultiFab* rhcc[], cons } } -void MGT_Solver::fill_sync_resid(MultiFab* sync_resid, const MultiFab& msk, +void MGT_Solver::fill_sync_resid(MultiFab& sync_resid, const MultiFab& msk, const MultiFab& vold, int isCoarse) { mgt_alloc_nodal_sync(); @@ -933,10 +890,10 @@ void MGT_Solver::fill_sync_resid(MultiFab* sync_resid, const MultiFab& msk, #ifdef _OPENMP #pragma omp parallel #endif - for (MFIter mfi(*sync_resid, true); mfi.isValid(); ++mfi) { + for (MFIter mfi(sync_resid, true); mfi.isValid(); ++mfi) { const int n = mfi.LocalIndex(); const Box& bx = mfi.tilebox(); - FArrayBox& sfab = (*sync_resid)[mfi]; + FArrayBox& sfab = sync_resid[mfi]; const Box& sbx = sfab.box(); mgt_get_sync_res(&lev, &n, sfab.dataPtr(), sbx.loVect(), sbx.hiVect(), bx.loVect(), bx.hiVect()); @@ -1010,24 +967,6 @@ MGT_Solver::set_cfaa (const MultiFab& aa, Real alpha, int lev) } } -void -MGT_Solver::set_cfa2 (const MultiFab& aa, int lev) -{ - int ncomp = aa.nComp(); - // the caller has started OMP - for (MFIter mfi(aa, true); mfi.isValid(); ++mfi) - { - const int n = mfi.LocalIndex(); - const Box& bx = mfi.tilebox(); - const FArrayBox& a = aa[mfi]; - const Box& abx = a.box(); - mgt_set_cfa2 (&lev, &n, a.dataPtr(), - abx.loVect(), abx.hiVect(), - bx.loVect(), bx.hiVect(), - ncomp); - } -} - void MGT_Solver::set_cfb (const MultiFab& bb, Real beta, int lev, int dir) { @@ -1060,42 +999,6 @@ MGT_Solver::set_cfb (const MultiFab& bb, Real beta, int lev, int dir) } } -void -MGT_Solver::set_cfbn (const MultiFab& bb, Real beta, int lev, int dir) -{ - int ncomp = bb.nComp(); - // the caller has started OMP - for (MFIter mfi(bb,true); mfi.isValid(); ++mfi) - { - const int n = mfi.LocalIndex(); - const Box& bx = mfi.tilebox(); - const FArrayBox& fab = bb[mfi]; - const Box& fbox = fab.box(); - if (dir == 0) { - mgt_set_cfbnx(&lev, &n, fab.dataPtr(), &beta, - fbox.loVect(), fbox.hiVect(), - bx.loVect(), bx.hiVect(), - ncomp); - } -#if (BL_SPACEDIM > 1) - else if (dir == 1) { - mgt_set_cfbny(&lev, &n, fab.dataPtr(), &beta, - fbox.loVect(), fbox.hiVect(), - bx.loVect(), bx.hiVect(), - ncomp); - } -#if (BL_SPACEDIM == 3) - else { - mgt_set_cfbnz(&lev, &n, fab.dataPtr(), &beta, - fbox.loVect(), fbox.hiVect(), - bx.loVect(), bx.hiVect(), - ncomp); - } -#endif -#endif - } -} - void MGT_Solver::set_rh (const MultiFab& mf, int lev) { diff --git a/Src/LinearSolvers/C_to_F_MG/stencil_types.H b/Src/LinearSolvers/C_to_F_MG/AMReX_stencil_types.H similarity index 100% rename from Src/LinearSolvers/C_to_F_MG/stencil_types.H rename to Src/LinearSolvers/C_to_F_MG/AMReX_stencil_types.H diff --git a/Src/LinearSolvers/C_to_F_MG/CMakeLists.txt b/Src/LinearSolvers/C_to_F_MG/CMakeLists.txt index bb3528b3c..dbc8b604e 100644 --- a/Src/LinearSolvers/C_to_F_MG/CMakeLists.txt +++ b/Src/LinearSolvers/C_to_F_MG/CMakeLists.txt @@ -15,12 +15,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CBOXLIB_INCLUDE_DIRS}) include_directories(${FBOXLIB_INCLUDE_DIRS}) -set(CXX_source_files MGT_Solver.cpp FMultiGrid.cpp) +set(CXX_source_files AMReX_MGT_Solver.cpp AMReX_FMultiGrid.cpp) set(FPP_source_files) set(F77_source_files) set(F90_source_files) -set(CXX_header_files MGT_Solver.H FMultiGrid.H stencil_types.H) +set(CXX_header_files AMReX_MGT_Solver.H AMReX_FMultiGrid.H AMReX_stencil_types.H) set(FPP_header_files) set(F77_header_files) set(F90_header_files) diff --git a/Src/LinearSolvers/C_to_F_MG/MGT_Solver.H b/Src/LinearSolvers/C_to_F_MG/MGT_Solver.H deleted file mode 100644 index 2b6596f5a..000000000 --- a/Src/LinearSolvers/C_to_F_MG/MGT_Solver.H +++ /dev/null @@ -1,133 +0,0 @@ -#ifndef _MGT_SOLVER_ -#define _MGT_SOLVER_ - -#include -#include -#include -#include -#include -#include - -#include - -class MGT_Solver -{ -public: - - MGT_Solver(const std::vector& geom, - int* bc, - const std::vector& grids, - const std::vector& dmap, - bool nodal, - int stencil_type, - bool _have_rhcc = false, - int nc = 0, - int ncomp = 1, - int verbose = 0); - - static void initialize(bool nodal); - static void Finalize(); - static void FlushFortranOutput(); - - void set_cfa_const (Real alpha, int lev); - static void set_cfa (const MultiFab& aa, int lev); - static void set_cfaa (const MultiFab& aa, Real alpha, int lev); - static void set_cfa2 (const MultiFab& aa, int lev); - static void set_cfb (const MultiFab& bb, Real beta, int lev, int dir); - static void set_cfbn (const MultiFab& bb, Real beta, int lev, int dir); - - static void set_rh (const MultiFab& mf, int lev); - static void set_uu (const MultiFab& mf, int lev); - - static void get_uu (MultiFab& mf, int lev, int ng); - static void get_res (MultiFab& mf, int lev); - static void get_gp (MultiFab& mf, int lev, int dir, Real dx); - - // - // (alpha * aa - beta * (del dot bb grad)) phi = RHS - // - void set_abeclap_coeffs (Real alpha, // aa is constant one - Real beta, - const Array >& bb, - const Array< Array >& xa, - const Array< Array >& xb); - void set_abeclap_coeffs (const PArray& aa, // alpha is one - Real beta, - const Array >& bb, - const Array< Array >& xa, - const Array< Array >& xb); - void set_abeclap_coeffs (Real alpha, - const PArray& aa, - Real beta, - const Array >& bb, - const Array< Array >& xa, - const Array< Array >& xb); - - void set_mac_coefficients(const Array >& bb, - const Array< Array >& xa, - const Array< Array >& xb); - - void set_gravity_coefficients(const Array< PArray >& bb, - const Array< Array >& xa, - const Array< Array >& xb); - - void set_const_gravity_coeffs(const Array< Array >& xa, - const Array< Array >& xb); - - void set_porous_coefficients(const PArray& a1, - const PArray& a2, - const Array >& bb, - const Real& beta, - const Array< Array >& xa, - const Array< Array >& xb, - int nc_opt = 0); - - void set_maxorder(const int max_order); - - void solve(MultiFab* uu[], MultiFab* rh[], const BndryData& bd, - Real tol, Real abs_tol, int always_use_bnorm, - Real& final_resnorm, int need_grad_phi=0); - - void applyop(MultiFab* uu[], MultiFab* res[], const BndryData& bd); - - void compute_residual(MultiFab* uu[], MultiFab* rh[], MultiFab* res[], const BndryData& bd); - - void get_fluxes(int lev, PArray& flux, const Real* dx); - - void set_nodal_coefficients(const MultiFab* aa[]); - void set_nodal_const_coefficients(Real val); - void nodal_project(MultiFab* uu[], MultiFab* vel[], MultiFab* rhcc[], const PArray& rhnd, - const Real& tol, const Real& abs_tol, - int* lo_inflow=0, int* hi_inflow=0); - - void fill_sync_resid(MultiFab* sync_resid_crse, const MultiFab& msk, const MultiFab& vold, - int isCoarse); - - ~MGT_Solver(); - - static int def_maxiter, def_maxiter_b, def_bottom_solver; - static int def_nu_1, def_nu_2, def_nu_b, def_nu_f; - static int def_verbose, def_cg_verbose; - static int def_min_width, def_max_nlevel; - static int def_cycle, def_smoother; - static int def_usecg, def_cg_solver; - static Real def_bottom_solver_eps, def_max_L0_growth; - -private: - - void Build(const std::vector& geom, - int* bc, int stencil_type, - const std::vector& dmap, - int nc, - int ncomp); - - int verbose; - int m_nlevel; - std::vector m_grids; - bool m_nodal; - bool have_rhcc; - - static bool initialized; - -}; -#endif diff --git a/Src/LinearSolvers/C_to_F_MG/Make.package b/Src/LinearSolvers/C_to_F_MG/Make.package index 8a113c968..3f60c0366 100644 --- a/Src/LinearSolvers/C_to_F_MG/Make.package +++ b/Src/LinearSolvers/C_to_F_MG/Make.package @@ -1,6 +1,6 @@ -CEXE_sources += MGT_Solver.cpp FMultiGrid.cpp -CEXE_headers += MGT_Solver.H FMultiGrid.H -CEXE_headers += stencil_types.H +CEXE_sources += AMReX_MGT_Solver.cpp AMReX_FMultiGrid.cpp +CEXE_headers += AMReX_MGT_Solver.H AMReX_FMultiGrid.H +CEXE_headers += AMReX_stencil_types.H VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_to_F_MG INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_to_F_MG diff --git a/Src/C_ParticleLib/ParGDB.H b/Src/Particle/AMReX_ParGDB.H similarity index 98% rename from Src/C_ParticleLib/ParGDB.H rename to Src/Particle/AMReX_ParGDB.H index d70cf6641..e40002c72 100644 --- a/Src/C_ParticleLib/ParGDB.H +++ b/Src/Particle/AMReX_ParGDB.H @@ -1,9 +1,9 @@ #ifndef _ParGDB_H #define _ParGDB_H -#include -#include -#include +#include +#include +#include class ParGDBBase { diff --git a/Src/C_ParticleLib/ParticleInit.H b/Src/Particle/AMReX_ParticleInit.H similarity index 100% rename from Src/C_ParticleLib/ParticleInit.H rename to Src/Particle/AMReX_ParticleInit.H diff --git a/Src/C_ParticleLib/Particles.H b/Src/Particle/AMReX_Particles.H similarity index 96% rename from Src/C_ParticleLib/Particles.H rename to Src/Particle/AMReX_Particles.H index 6d926cc2b..15371761d 100644 --- a/Src/C_ParticleLib/Particles.H +++ b/Src/Particle/AMReX_Particles.H @@ -9,21 +9,22 @@ #include #include #include +#include -#include +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef BL_LAZY -#include +#include #endif #ifdef _OPENMP @@ -399,7 +400,7 @@ public: // Functions depending the layout of the data. Use with caution. // // Multi-level version - void AssignDensity (int rho_index, bool sub_cycle, PArray& mf, + void AssignDensity (int rho_index, bool sub_cycle, Array >& mf, int lev_min = 0, int ncomp = 1, int finest_level = -1) const; // Single-level version void AssignDensitySingleLevel (int rho_index, MultiFab& mf, int level, @@ -458,7 +459,7 @@ protected: Array m_particles; private: - void AssignDensityDoit (int level, PArray* mf, PMap& data, + void AssignDensityDoit (int rho_index, Array >& mf, PMap& data, int ncomp, int lev_min = 0) const; }; @@ -485,7 +486,7 @@ ParticleContainer::NumberOfParticlesInGrid (int lev, int ngrids = m_gdb->ParticleBoxArray(lev).size(); Array nparticles(ngrids,0); - if (lev >= 0 && lev < m_particles.size()) + if (lev >= 0 && lev < int(m_particles.size())) { const PMap& pmap = m_particles[lev]; @@ -517,12 +518,12 @@ ParticleContainer::NumberOfParticlesInGrid (int lev, template long ParticleContainer::NumberOfParticlesAtLevel (int lev, - bool only_valid, - bool only_local) const + bool only_valid, + bool only_local) const { long nparticles = 0; - if (lev >= 0 && lev < m_particles.size()) + if (lev >= 0 && lev < int(m_particles.size())) { const PMap& pmap = m_particles[lev]; @@ -666,7 +667,7 @@ ParticleContainer::addOneParticle (int id_in, // // The ParticleContainer::Init... routines have been moved into a separate file. // -#include "ParticleInit.H" +#include "AMReX_ParticleInit.H" template void @@ -675,7 +676,7 @@ ParticleContainer::MoveRandom () // // Move particles randomly at all levels // - for (int lev = 0; lev < m_particles.size(); lev++) + for (int lev = 0; lev < int(m_particles.size()); lev++) { MoveRandom(lev); } @@ -774,7 +775,7 @@ ParticleContainer::IncrementWithTotal (MultiFab& mf, if (m_particles.empty()) return 0; - BL_ASSERT(lev >= 0 && lev < m_particles.size()); + BL_ASSERT(lev >= 0 && lev < int(m_particles.size())); const PMap& pmap = m_particles[lev]; @@ -834,7 +835,7 @@ ParticleContainer::sumParticleMass (int rho_index, int lev) const { BL_PROFILE("ParticleContainer::sumParticleMass(lev)"); BL_ASSERT(NR >= 1); - BL_ASSERT(lev >= 0 && lev < m_particles.size()); + BL_ASSERT(lev >= 0 && lev < int(m_particles.size())); Real msum = 0; @@ -1215,7 +1216,7 @@ ParticleContainer::AddParticlesAtLevel (int level, bool where_already_called) { BL_PROFILE("ParticleContainer::AddParticlesAtLevel()"); - if (m_particles.size() < level+1) + if (int(m_particles.size()) < level+1) { if (ParallelDescriptor::IOProcessor()) { @@ -1287,7 +1288,7 @@ void ParticleContainer::RemoveParticlesAtLevel (int level) { BL_PROFILE("ParticleContainer::RemoveParticlesAtLevel()"); - if (level >= this->m_particles.size()) + if (level >= int(this->m_particles.size())) return; if (!this->m_particles[level].empty()) @@ -1301,7 +1302,7 @@ void ParticleContainer::RemoveParticlesNotAtFinestLevel () { BL_PROFILE("ParticleContainer::RemoveParticlesNotAtFinestLevel()"); - BL_ASSERT(this->m_gdb->finestLevel()+1 == this->m_particles.size()); + BL_ASSERT(this->m_gdb->finestLevel()+1 == int(this->m_particles.size())); int cnt = 0; @@ -1364,7 +1365,7 @@ ParticleContainer::CreateVirtualParticles (int level, BL_ASSERT(level > 0); BL_ASSERT(virts.empty()); - if (level >= m_particles.size()) + if (level >= int(m_particles.size())) // // This level could exist and simply have no particles. // @@ -1503,7 +1504,7 @@ ParticleContainer::CreateGhostParticles (int level, BL_ASSERT(ghosts.empty()); BL_ASSERT(level < m_gdb->finestLevel()); - if (level >= m_particles.size()) + if (level >= int(m_particles.size())) // // This level could exist and simply have no particles. // @@ -1580,7 +1581,7 @@ ParticleContainer::Redistribute (bool where_already_called, while (!m_gdb->LevelDefined(theEffectiveFinestLevel)) theEffectiveFinestLevel--; - if (m_particles.size() < theEffectiveFinestLevel+1) + if (int(m_particles.size()) < theEffectiveFinestLevel+1) { if (ParallelDescriptor::IOProcessor()) { @@ -1596,7 +1597,7 @@ ParticleContainer::Redistribute (bool where_already_called, // PMap not_ours; - for (int lev = lev_min; lev < m_particles.size(); lev++) + for (int lev = lev_min, nlevs = m_particles.size(); lev < nlevs; lev++) { PMap& pmap = m_particles[lev]; @@ -1702,7 +1703,7 @@ ParticleContainer::Redistribute (bool where_already_called, } } - if (m_particles.size() > theEffectiveFinestLevel+1) + if (int(m_particles.size()) > theEffectiveFinestLevel+1) { // // Looks like we lost an AmrLevel on a regrid. @@ -1714,7 +1715,7 @@ ParticleContainer::Redistribute (bool where_already_called, << " to " << theEffectiveFinestLevel+1 << '\n'; } - BL_ASSERT(m_particles.size() >= 2); + BL_ASSERT(int(m_particles.size()) >= 2); BL_ASSERT(m_particles[m_particles.size()-1].empty()); m_particles.resize(theEffectiveFinestLevel+1); @@ -1915,7 +1916,7 @@ ParticleContainer::RedistributeMPI (PMap& not_ours) const int* rcvp = &recvdata[Idx]; PBox& pbox = nparticles[Who]; - BL_ASSERT(pbox.size() == RcvCnts[Who]); + BL_ASSERT(int(pbox.size()) == RcvCnts[Who]); for (auto& p : pbox) { @@ -2023,7 +2024,7 @@ ParticleContainer::RedistributeMPI (PMap& not_ours) const ParticleBase::RealType* rcvp = &recvdata[Idx]; PBox& pbox = nparticles[Who]; - BL_ASSERT(pbox.size() == RcvCnts[Who]); + BL_ASSERT(int(pbox.size()) == RcvCnts[Who]); for (auto& p : pbox) { @@ -2069,7 +2070,7 @@ ParticleContainer::OK (bool full_where, // // Particles are copied to avoid accidentally moving them with where. // - for (int lev = lev_min; lev < m_particles.size(); lev++) + for (int lev = lev_min, nlevs=m_particles.size(); lev < nlevs; lev++) { const PMap& pmap = m_particles[lev]; @@ -2177,10 +2178,8 @@ ParticleContainer::Checkpoint (const std::string& dir, long nparticles = 0; - for (int lev = 0; lev < m_particles.size(); lev++) + for (const auto& pmap : m_particles) { - const PMap& pmap = m_particles[lev]; - for (const auto& kv : pmap) { const PBox& pbox = kv.second; @@ -2404,10 +2403,10 @@ ParticleContainer::Checkpoint (const std::string& dir, // Array cnt(nOutFiles,0); - for (int i = 0; i < count.size(); i++) + for (int i = 0, N=count.size(); i < N; i++) cnt[which[i]] += count[i]; - for (int i = 0; i < cnt.size(); i++) + for (int i = 0, N=cnt.size(); i < N; i++) { if (cnt[i] == 0) { @@ -2836,7 +2835,7 @@ ParticleContainer::Restart_Doit (const std::string& fullname, HdrFile >> ngrids[lev]; BL_ASSERT(ngrids[lev] > 0); - BL_ASSERT(ngrids[lev] == m_gdb->ParticleBoxArray(lev).size()); + BL_ASSERT(ngrids[lev] == int(m_gdb->ParticleBoxArray(lev).size())); } } ParallelDescriptor::Bcast(ngrids.dataPtr(), ngrids.size(), IOProc); @@ -2940,7 +2939,7 @@ ParticleContainer::ReadParticles_DoublePrecision (int cnt, { BL_PROFILE("ParticleContainer::ReadParticles_DoublePrecision()"); BL_ASSERT(cnt > 0); - BL_ASSERT(lev < m_particles.size()); + BL_ASSERT(lev < int(m_particles.size())); BL_ASSERT(lev >= 0 && lev <= m_gdb->finestLevel()); BL_ASSERT(grd >= 0 && grd < m_gdb->ParticleBoxArray(lev).size()); // @@ -3064,7 +3063,7 @@ ParticleContainer::ReadParticles_SinglePrecision (int cnt, { BL_PROFILE("ParticleContainer::ReadParticles_SinglePrecision()"); BL_ASSERT(cnt > 0); - BL_ASSERT(lev < m_particles.size()); + BL_ASSERT(lev < int(m_particles.size())); BL_ASSERT(lev >= 0 && lev <= m_gdb->finestLevel()); BL_ASSERT(grd >= 0 && grd < m_gdb->ParticleBoxArray(lev).size()); // @@ -3176,10 +3175,8 @@ ParticleContainer::WriteAsciiFile (const std::string& filename) // long nparticles = 0; - for (int lev = 0; lev < m_particles.size(); lev++) + for (const auto& pmap : m_particles) { - const PMap& pmap = m_particles[lev]; - for (const auto& kv : pmap) { const PBox& pbox = kv.second; @@ -3245,10 +3242,8 @@ ParticleContainer::WriteAsciiFile (const std::string& filename) if (!File.good()) BoxLib::FileOpenFailed(filename); - for (int lev = 0; lev < m_particles.size(); lev++) + for (const auto& pmap : m_particles) { - const PMap& pmap = m_particles[lev]; - for (const auto& kv : pmap) { const PBox& pbox = kv.second; @@ -3310,10 +3305,8 @@ ParticleContainer::WriteCoarsenedAsciiFile (const std::string& filename // long nparticles = 0; - for (int lev = 0; lev < m_particles.size(); lev++) + for (const auto& pmap : m_particles) { - const PMap& pmap = m_particles[lev]; - for (const auto& kv : pmap) { const PBox& pbox = kv.second; @@ -3381,10 +3374,8 @@ ParticleContainer::WriteCoarsenedAsciiFile (const std::string& filename if (!File.good()) BoxLib::FileOpenFailed(filename); - for (int lev = 0; lev < m_particles.size(); lev++) + for (const auto& pmap : m_particles) { - const PMap& pmap = m_particles[lev]; - for (const auto& kv : pmap) { const PBox& pbox = kv.second; @@ -3578,20 +3569,15 @@ ParticleBase::CIC_Cells_Fracs (const ParticleBase& p, // // This is the multi-level version. // -// The PArray should be empty on input. -// -// The MultiFabs in the PArray will be Managed'd on return. +// The Array should be empty on input. // // There'll be finest_level+1 of them. // template void -ParticleContainer::AssignDensity (int rho_index, - bool sub_cycle, - PArray& mf_to_be_filled, - int lev_min, - int ncomp, - int finest_level) const +ParticleContainer::AssignDensity (int rho_index, bool sub_cycle, + Array >& mf_to_be_filled, + int lev_min, int ncomp, int finest_level) const { if (rho_index != 0) BoxLib::Abort("AssignDensity only works if rho_index = 0"); @@ -3613,64 +3599,53 @@ ParticleContainer::AssignDensity (int rho_index, // finest_level. In the following code, lev is the real level, // lev_index is the corresponding index for mf. // - PArray* mf; - PArray mf_part; // Create the space for mf_to_be_filled, regardless of whether we'll need a temporary mf - mf_to_be_filled.resize(finest_level+1-lev_min, PArrayManage); + mf_to_be_filled.resize(finest_level+1-lev_min); for (int lev = lev_min; lev <= finest_level; lev++) { const int lev_index = lev - lev_min; - mf_to_be_filled.set(lev_index, new MultiFab(m_gdb->boxArray(lev), ncomp, 1)); - - for (MFIter mfi(mf_to_be_filled[lev_index]); mfi.isValid(); ++mfi) { - mf_to_be_filled[lev_index][mfi].setVal(0); - } + mf_to_be_filled[lev_index].reset(new MultiFab(m_gdb->boxArray(lev), ncomp, 1)); + mf_to_be_filled[lev_index]->setVal(0.0); } // Test whether the grid structure of the boxArray is the same // as the ParticleBoxArray at all levels bool all_grids_the_same = true; for (int lev = lev_min; lev <= finest_level; lev++) { - if (!OnSameGrids(lev, mf_to_be_filled[lev-lev_min])) { + if (!OnSameGrids(lev, *mf_to_be_filled[lev-lev_min])) { all_grids_the_same = false; break; } } - if (all_grids_the_same) - { - mf = &mf_to_be_filled; - } - else + Array > mf_part; + if (!all_grids_the_same) { // Create the space for the temporary, mf_part - mf_part.resize(finest_level+1-lev_min, PArrayManage); + mf_part.resize(finest_level+1-lev_min); for (int lev = lev_min; lev <= finest_level; lev++) { const int lev_index = lev - lev_min; - mf_part.set(lev_index, new MultiFab(m_gdb->ParticleBoxArray(lev), ncomp, 1, - m_gdb->ParticleDistributionMap(lev))); - - for (MFIter mfi(mf_to_be_filled[lev_index]); mfi.isValid(); ++mfi) { - mf_part[lev_index][mfi].setVal(0); - } + mf_part[lev_index].reset(new MultiFab(m_gdb->ParticleBoxArray(lev), ncomp, 1, + m_gdb->ParticleDistributionMap(lev))); + mf_part[lev_index]->setVal(0.0); } - - mf = &mf_part; } + auto & mf = (all_grids_the_same) ? mf_to_be_filled : mf_part; + if (finest_level == 0) { // // Just use the far simpler single-level version. // - AssignDensitySingleLevel(rho_index, (*mf)[0],0,ncomp); + AssignDensitySingleLevel(rho_index, *mf[0],0,ncomp); // // I believe that we don't need any information in ghost cells so we don't copy those. // if ( ! all_grids_the_same) { - mf_to_be_filled[0].copy((*mf)[0],0,0,ncomp); + mf_to_be_filled[0]->copy(*mf[0],0,0,ncomp); } return; } @@ -3722,10 +3697,10 @@ ParticleContainer::AssignDensity (int rho_index, const Real* dx_fine = (lev < finest_level) ? m_gdb->Geom(lev+1).CellSize() : dx; const Real* dx_coarse = (lev > 0) ? m_gdb->Geom(lev-1).CellSize() : dx; const int lev_index = lev - lev_min; - const BoxArray& grids = (*mf)[lev_index].boxArray(); + const BoxArray& grids = mf[lev_index]->boxArray(); const int dgrow = (lev == 0) ? 1 : m_gdb->MaxRefRatio(lev-1); - BoxArray compfvalid, compfvalid_grown, fvalid = (*mf)[lev_index].boxArray(); + BoxArray compfvalid, compfvalid_grown, fvalid = mf[lev_index]->boxArray(); // // Do we have Fine->Crse overlap on a periodic boundary? // We want to add all ghost cells that can be shifted into valid region. @@ -3746,9 +3721,9 @@ ParticleContainer::AssignDensity (int rho_index, gm.periodicShift(dest, grids[j], pshifts); - for (int k = 0; k < pshifts.size(); k++) + for (const auto& kiv : pshifts) { - const Box& sbx = grids[j] + pshifts[k]; + const Box& sbx = grids[j] + kiv; const Box& dbx = dest & sbx; BL_ASSERT(dbx.ok()); @@ -3787,7 +3762,7 @@ ParticleContainer::AssignDensity (int rho_index, cfba = m_gdb->boxArray(lev+1); cfba.coarsen(m_gdb->refRatio(lev)); - BL_ASSERT((*mf)[lev_index].boxArray().contains(cfba)); + BL_ASSERT(mf[lev_index]->boxArray().contains(cfba)); } // // This is cfba with any shifted ghost cells. @@ -3798,13 +3773,13 @@ ParticleContainer::AssignDensity (int rho_index, { BoxList cvalid; - const BoxArray& cgrids = (*mf)[lev_index].boxArray(); + const BoxArray& cgrids = mf[lev_index]->boxArray(); for (int i = 0; i < cfba.size(); i++) { if (gm.isAnyPeriodic()) { - const Box& dest = BoxLib::grow(cfba[i],(*mf)[lev_index].nGrow()); + const Box& dest = BoxLib::grow(cfba[i],mf[lev_index]->nGrow()); if ( ! dm.contains(dest)) { @@ -3814,9 +3789,9 @@ ParticleContainer::AssignDensity (int rho_index, gm.periodicShift(dest, cgrids[j], pshifts); - for (int k = 0; k < pshifts.size(); k++) + for (const auto& kiv : pshifts) { - const Box& sbx = cfba[i] - pshifts[k]; + const Box& sbx = cfba[i] - kiv; cvalid.push_back(sbx); } @@ -3870,7 +3845,7 @@ ParticleContainer::AssignDensity (int rho_index, for (const auto& kv : m_particles[lev]) { const PBox& pbx = kv.second; - FArrayBox& fab = (*mf)[lev_index][kv.first]; + FArrayBox& fab = (*mf[lev_index])[kv.first]; for (const auto& p : pbx) { @@ -3973,15 +3948,15 @@ ParticleContainer::AssignDensity (int rho_index, gm_fine.periodicShift(bx, gm_fine.Domain(), pshifts); if ( ! pshifts.empty()) { - BL_ASSERT(pshifts.size() == 1); + BL_ASSERT(int(pshifts.size()) == 1); fcells[j] = fcells[j] - pshifts[0]; } - (*mf)[lev_index + 1].boxArray().intersections(Box(fcells[j],fcells[j]),isects,true,0); + mf[lev_index + 1]->boxArray().intersections(Box(fcells[j],fcells[j]),isects,true,0); if (isects.size() == 0) { continue; } const int grid = isects[0].first; - const int who = (*mf)[lev_index+1].DistributionMap()[grid]; + const int who = mf[lev_index+1]->DistributionMap()[grid]; if (who == ParallelDescriptor::MyProc()) { @@ -3989,13 +3964,13 @@ ParticleContainer::AssignDensity (int rho_index, // Sum up mass in first component. // { - (*mf)[lev_index+1][grid](fcells[j],0) += p.m_data[0] * ffracs[j]; + (*mf[lev_index+1])[grid](fcells[j],0) += p.m_data[0] * ffracs[j]; } // // Sum up momenta in next components. // for (int n = 1; n < ncomp; n++) { - (*mf)[lev_index+1][grid](fcells[j],n) += p.m_data[n] * p.m_data[0] * ffracs[j]; + (*mf[lev_index+1])[grid](fcells[j],n) += p.m_data[n] * p.m_data[0] * ffracs[j]; } } else @@ -4041,31 +4016,31 @@ ParticleContainer::AssignDensity (int rho_index, if ( ! pshifts.empty()) { - BL_ASSERT(pshifts.size() == 1); + BL_ASSERT(int(pshifts.size()) == 1); ccells[j] = ccells[j] - pshifts[0]; } // // Find its resident grid. // - (*mf)[lev_index - 1].boxArray().intersections(Box(ccells[j],ccells[j]),isects,true,0); + mf[lev_index - 1]->boxArray().intersections(Box(ccells[j],ccells[j]),isects,true,0); if (isects.size() == 0) { continue; } const int grid = isects[0].first; - const int who = (*mf)[lev_index-1].DistributionMap()[grid]; + const int who = mf[lev_index-1]->DistributionMap()[grid]; if (who == ParallelDescriptor::MyProc()) { // // Sum up mass in first component. // { - (*mf)[lev_index-1][grid](ccells[j],0) += p.m_data[0] * cfracs[j]; + (*mf[lev_index-1])[grid](ccells[j],0) += p.m_data[0] * cfracs[j]; } // // Sum up momenta in next components. // for (int n = 1; n < ncomp; n++) { - (*mf)[lev_index-1][grid](ccells[j],n) += p.m_data[n] * p.m_data[0] * cfracs[j]; + (*mf[lev_index-1])[grid](ccells[j],n) += p.m_data[n] * p.m_data[0] * cfracs[j]; } } else @@ -4153,17 +4128,17 @@ ParticleContainer::AssignDensity (int rho_index, // We're at a Fine->Crse boundary. // BL_ASSERT(cgrid[i] >= 0); - BL_ASSERT(cgrid[i] < (*mf)[lev_index-1].size()); + BL_ASSERT(cgrid[i] < mf[lev_index-1]->size()); // // Here we need to update the crse region. The coarse // region is always going to be updated if we have a // particle in a cell bordering a Fine->Crse boundary. // - const int who = (*mf)[lev_index-1].DistributionMap()[cgrid[i]]; + const int who = mf[lev_index-1]->DistributionMap()[cgrid[i]]; if (who == ParallelDescriptor::MyProc()) { - if ( ! (*mf)[lev_index-1][cgrid[i]].box().contains(ccells[i])) { + if ( ! (*mf[lev_index-1])[cgrid[i]].box().contains(ccells[i])) { continue; } @@ -4180,13 +4155,13 @@ ParticleContainer::AssignDensity (int rho_index, // Sum up mass in first component. // { - (*mf)[lev_index-1][cgrid[i]](ccells[i],0) += p.m_data[0] * cfracs[i]; + (*mf[lev_index-1])[cgrid[i]](ccells[i],0) += p.m_data[0] * cfracs[i]; } // // Sum up momenta in next components. // for (int n = 1; n < ncomp; n++) { - (*mf)[lev_index-1][cgrid[i]](ccells[i],n) += p.m_data[n] * p.m_data[0] * cfracs[i]; + (*mf[lev_index-1])[cgrid[i]](ccells[i],n) += p.m_data[n] * p.m_data[0] * cfracs[i]; } } else @@ -4337,9 +4312,9 @@ ParticleContainer::AssignDensity (int rho_index, // ParticleBase::FineCellsToUpdateFromCrse(p,lev,m_gdb,cells[i],cfshifts[i],fgrid,ffracs,fcells,isects); - for (int j = 0; j < fcells.size(); j++) + for (int j = 0, nfcells = fcells.size(); j < nfcells; j++) { - const int who = (*mf)[lev_index+1].DistributionMap()[fgrid[j]]; + const int who = mf[lev_index+1]->DistributionMap()[fgrid[j]]; if (who == ParallelDescriptor::MyProc()) { @@ -4347,13 +4322,13 @@ ParticleContainer::AssignDensity (int rho_index, // Sum up mass in first component. // { - (*mf)[lev_index+1][fgrid[j]](fcells[j],0) += p.m_data[0] * fracs[i] * ffracs[j]; + (*mf[lev_index+1])[fgrid[j]](fcells[j],0) += p.m_data[0] * fracs[i] * ffracs[j]; } // // Sum up momenta in next components. // for (int n = 1; n < ncomp; n++) { - (*mf)[lev_index+1][fgrid[j]](fcells[j],n) += p.m_data[n] * p.m_data[0] * fracs[i] * ffracs[j]; + (*mf[lev_index+1])[fgrid[j]](fcells[j],n) += p.m_data[n] * p.m_data[0] * fracs[i] * ffracs[j]; } } else @@ -4402,7 +4377,7 @@ ParticleContainer::AssignDensity (int rho_index, const Real* dx = gm.CellSize(); const Real vol = D_TERM(dx[0], *dx[1], *dx[2]); - (*mf)[lev_index].SumBoundary(gm.periodicity()); + mf[lev_index]->SumBoundary(gm.periodicity()); // // If ncomp > 1, first divide the momenta (component n) // by the mass (component 0) in order to get velocities. @@ -4410,9 +4385,9 @@ ParticleContainer::AssignDensity (int rho_index, // for (int n = 1; n < ncomp; n++) { - for (MFIter mfi((*mf)[lev_index]); mfi.isValid(); ++mfi) + for (MFIter mfi(*mf[lev_index]); mfi.isValid(); ++mfi) { - (*mf)[lev_index][mfi].protected_divide((*mf)[lev_index][mfi],0,n,1); + (*mf[lev_index])[mfi].protected_divide((*mf[lev_index])[mfi],0,n,1); } } // @@ -4420,7 +4395,7 @@ ParticleContainer::AssignDensity (int rho_index, // to density. If there are additional components (like velocity), we don't // want to divide those by volume. // - (*mf)[lev_index].mult(1/vol,0,1); + mf[lev_index]->mult(1/vol,0,1); } // @@ -4434,7 +4409,7 @@ ParticleContainer::AssignDensity (int rho_index, for (int lev = lev_min; lev <= finest_level; lev++) { const int lev_index = lev - lev_min; - mf_to_be_filled[lev_index].copy(mf_part[lev_index],0,0,1); + mf_to_be_filled[lev_index]->copy(*mf_part[lev_index],0,0,1); } if (m_verbose > 1) @@ -4451,7 +4426,7 @@ ParticleContainer::AssignDensity (int rho_index, } // -// Used by AssignDensity (PArray& mf). +// Used by AssignDensity (Array >& mf). // // Passes data needed by Crse->Fine or Fine->Crse to CPU that needs it. // @@ -4466,10 +4441,10 @@ ParticleContainer::AssignDensity (int rho_index, template void ParticleContainer::AssignDensityDoit (int rho_index, - PArray* mf, - PMap& data, - int ncomp, - int lev_min) const + Array >& mf, + PMap& data, + int ncomp, + int lev_min) const { if (rho_index != 0) BoxLib::Abort("AssignDensityDoit only works if rho_index = 0"); @@ -4654,11 +4629,11 @@ ParticleContainer::AssignDensityDoit (int rho_index, const int grd = idata[1]; const IntVect cell = IntVect(D_DECL(idata[2],idata[3],idata[4])); - BL_ASSERT((*mf)[lev].DistributionMap()[grd] == MyProc); - BL_ASSERT((*mf)[lev][grd].box().contains(cell)); + BL_ASSERT((*mf[lev]).DistributionMap()[grd] == MyProc); + BL_ASSERT((*mf[lev])[grd].box().contains(cell)); for (int n = 0; n < ncomp; n++) { - (*mf)[lev][grd](cell,n) += rdata[n]; + (*mf[lev])[grd](cell,n) += rdata[n]; } idata += iChunkSize; @@ -4684,7 +4659,7 @@ ParticleContainer::AssignDensitySingleLevel (int rho_index, BL_ASSERT(NR >= 1); BL_ASSERT(ncomp == 1 || ncomp == BL_SPACEDIM+1); - if (lev >= m_particles.size()) + if (lev >= int(m_particles.size())) { // // Don't do anything if there are no particles at this level. @@ -5123,7 +5098,7 @@ ParticleContainer::moveKick (MultiFab& acceleration, { BL_PROFILE("ParticleContainer::moveKick()"); BL_ASSERT(NR >= BL_SPACEDIM+1); - BL_ASSERT(lev >= 0 && lev < m_particles.size()); + BL_ASSERT(lev >= 0 && lev < int(m_particles.size())); const Real strttime = ParallelDescriptor::second(); const Real half_dt = Real(0.5) * dt; diff --git a/Src/C_ParticleLib/Particles.cpp b/Src/Particle/AMReX_Particles.cpp similarity index 99% rename from Src/C_ParticleLib/Particles.cpp rename to Src/Particle/AMReX_Particles.cpp index 89c1de5ff..b2bdc26af 100644 --- a/Src/C_ParticleLib/Particles.cpp +++ b/Src/Particle/AMReX_Particles.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include void diff --git a/Src/C_ParticleLib/Particles_1D.F b/Src/Particle/AMReX_Particles_1D.F similarity index 100% rename from Src/C_ParticleLib/Particles_1D.F rename to Src/Particle/AMReX_Particles_1D.F diff --git a/Src/C_ParticleLib/Particles_2D.F b/Src/Particle/AMReX_Particles_2D.F similarity index 100% rename from Src/C_ParticleLib/Particles_2D.F rename to Src/Particle/AMReX_Particles_2D.F diff --git a/Src/C_ParticleLib/Particles_3D.F b/Src/Particle/AMReX_Particles_3D.F similarity index 100% rename from Src/C_ParticleLib/Particles_3D.F rename to Src/Particle/AMReX_Particles_3D.F diff --git a/Src/C_ParticleLib/Particles_F.H b/Src/Particle/AMReX_Particles_F.H similarity index 97% rename from Src/C_ParticleLib/Particles_F.H rename to Src/Particle/AMReX_Particles_F.H index b9336893d..340894b09 100644 --- a/Src/C_ParticleLib/Particles_F.H +++ b/Src/Particle/AMReX_Particles_F.H @@ -2,7 +2,7 @@ #define _Particles_F_H_ -#include +#include #ifdef USE_PARTICLES diff --git a/Src/C_ParticleLib/TracerParticles.H b/Src/Particle/AMReX_TracerParticles.H similarity index 96% rename from Src/C_ParticleLib/TracerParticles.H rename to Src/Particle/AMReX_TracerParticles.H index e9396dcf2..ce6e9b3ca 100644 --- a/Src/C_ParticleLib/TracerParticles.H +++ b/Src/Particle/AMReX_TracerParticles.H @@ -1,7 +1,7 @@ #ifndef BL_TRACERPARTICLES_H_ #define BL_TRACERPARTICLES_H_ -#include +#include class TracerParticleContainer : public ParticleContainer > > diff --git a/Src/C_ParticleLib/TracerParticles.cpp b/Src/Particle/AMReX_TracerParticles.cpp similarity index 93% rename from Src/C_ParticleLib/TracerParticles.cpp rename to Src/Particle/AMReX_TracerParticles.cpp index 2b659a621..b84a9cea3 100644 --- a/Src/C_ParticleLib/TracerParticles.cpp +++ b/Src/Particle/AMReX_TracerParticles.cpp @@ -1,5 +1,5 @@ -#include +#include // // Uses midpoint method to advance particles using umac. @@ -24,28 +24,29 @@ TracerParticleContainer::AdvectWithUmac (MultiFab* umac, int lev, Real dt) const Real* dx = geom.CellSize(); const Real* plo = geom.ProbLo(); - PArray umac_pointer; + Array > raii_umac(BL_SPACEDIM); + Array umac_pointer(BL_SPACEDIM); // We assume that if umac[0]'s boxArray matches then the others will too... if (OnSameGrids(lev, umac[0])) { - umac_pointer.resize(BL_SPACEDIM, PArrayNoManage); - for (int i = 0; i < BL_SPACEDIM; i++) - umac_pointer.set(i, &umac[i]); + for (int i = 0; i < BL_SPACEDIM; i++) { + umac_pointer[i] = &umac[i]; + } } else { - umac_pointer.resize(BL_SPACEDIM, PArrayManage); for (int i = 0; i < BL_SPACEDIM; i++) { int ng = umac[i].nGrow(); - umac_pointer.set(i, new MultiFab(m_gdb->ParticleBoxArray(lev), - umac[i].nComp(), - ng, - m_gdb->ParticleDistributionMap(lev), - Fab_allocate, - IntVect::TheDimensionVector(i))); - umac_pointer[i].copy(umac[i],0,0,umac[i].nComp(),ng,ng); + raii_umac[i].reset(new MultiFab(m_gdb->ParticleBoxArray(lev), + umac[i].nComp(), + ng, + m_gdb->ParticleDistributionMap(lev), + Fab_allocate, + IntVect::TheDimensionVector(i))); + umac_pointer[i] = raii_umac[i].get(); + umac_pointer[i]->copy(umac[i],0,0,umac[i].nComp(),ng,ng); } } @@ -59,9 +60,9 @@ TracerParticleContainer::AdvectWithUmac (MultiFab* umac, int lev, Real dt) PBox& pbox = kv.second; const int n = pbox.size(); - FArrayBox* fab[BL_SPACEDIM] = { D_DECL(&umac_pointer[0][grid], - &umac_pointer[1][grid], - &umac_pointer[2][grid]) }; + FArrayBox* fab[BL_SPACEDIM] = { D_DECL(&((*umac_pointer[0])[grid]), + &((*umac_pointer[1])[grid]), + &((*umac_pointer[2])[grid])) }; #ifdef _OPENMP #pragma omp parallel for diff --git a/Src/C_ParticleLib/CMakeLists.txt b/Src/Particle/CMakeLists.txt similarity index 76% rename from Src/C_ParticleLib/CMakeLists.txt rename to Src/Particle/CMakeLists.txt index e8a95ab77..87402f3c7 100644 --- a/Src/C_ParticleLib/CMakeLists.txt +++ b/Src/Particle/CMakeLists.txt @@ -25,10 +25,10 @@ set(F77_header_files) set(F90_header_files) if(BL_USE_PARTICLES EQUAL 1) - list(APPEND CXX_source_files Particles.cpp TracerParticles.cpp) - list(APPEND CXX_header_files Particles.H ParticleInit.H TracerParticles.H ParGDB.H) - list(APPEND FPP_source_files Particles_${BL_SPACEDIM}D.F) - list(APPEND FPP_header_files Particles_F.H) + list(APPEND CXX_source_files AMReX_Particles.cpp AMReX_TracerParticles.cpp) + list(APPEND CXX_header_files AMReX_Particles.H AMReX_ParticleInit.H AMReX_TracerParticles.H AMReX_ParGDB.H) + list(APPEND FPP_source_files AMReX_Particles_${BL_SPACEDIM}D.F) + list(APPEND FPP_header_files AMReX_Particles_F.H) endif() preprocess_boxlib_fortran(FPP_out_files ${FPP_source_files}) diff --git a/Src/Particle/Make.package b/Src/Particle/Make.package new file mode 100644 index 000000000..c7ad0842e --- /dev/null +++ b/Src/Particle/Make.package @@ -0,0 +1,13 @@ + +BOXLIB_BASE=EXE +ifeq ($(LBASE),box) + BOXLIB_BASE=LIB +endif + +C$(BOXLIB_BASE)_sources += AMReX_Particles.cpp AMReX_TracerParticles.cpp +C$(BOXLIB_BASE)_headers += AMReX_Particles.H AMReX_ParticleInit.H AMReX_ParGDB.H AMReX_TracerParticles.H +F$(BOXLIB_BASE)_headers += AMReX_Particles_F.H +F$(BOXLIB_BASE)_sources += AMReX_Particles_$(DIM)D.F + +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Particle +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Particle diff --git a/Src/Python/.gitignore b/Src/Python/.gitignore deleted file mode 100644 index a9fa24af8..000000000 --- a/Src/Python/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pyc -*.so diff --git a/Src/Python/F90/Makefile b/Src/Python/F90/Makefile deleted file mode 100644 index 6aa5397da..000000000 --- a/Src/Python/F90/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# Makefile for PyBoxLib -# - -BOXLIB_HOME ?= ../../.. - -COMP := gfortran -NDEBUG := t -OMP := -MPI := t - -include $(BOXLIB_HOME)/Tools/F_mk/GMakedefs.mak - -F90 := mpif90 -FC := mpif90 -CC := mpicc -F90FLAGS += -fPIC -CFLAGS += -fPIC - -PYINCLUDE := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()') -PYINCLUDE += $(shell python -c 'import numpy; print numpy.get_include()') - -all: $(OUT)/fcboxlib.so - -VPATH_LOCATIONS += src -INCLUDE_LOCATIONS += $(PYINCLUDE) -csources += fboxlib_c.c - -include $(BOXLIB_HOME)/Src/F_BaseLib/GPackage.mak -include $(BOXLIB_HOME)/Src/Python/GPackage.mak - -VPATH_LOCATIONS += src -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib - -include $(BOXLIB_HOME)/Tools/F_mk/GMakerules.mak - -$(OUT)/fcboxlib.so: $(objects) - mkdir -p $(OUT) - $(F90) -shared -o $@ $^ diff --git a/Src/Python/F90/README b/Src/Python/F90/README deleted file mode 100644 index 68cd91e61..000000000 --- a/Src/Python/F90/README +++ /dev/null @@ -1,17 +0,0 @@ -PyBoxLib -======== - -This version of PyBoxLib wraps the Fortran version of BoxLib. - - -Install -======= - -$ make OUT=build CC=mpicc FC=mpif90 MPIHOME=$(dirname $(dirname $(which mpicc))) -$ python setup.py install --user - - -Basic usage -=========== - -Please see 'test.py'. diff --git a/Src/Python/F90/fboxlib/__init__.py b/Src/Python/F90/fboxlib/__init__.py deleted file mode 100644 index e0ec7f98a..000000000 --- a/Src/Python/F90/fboxlib/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ - -import fboxlib.fcboxlib as fcboxlib - -from fboxlib.boxarray import boxarray -from fboxlib.layout import layout -from fboxlib.multifab import multifab, lmultifab -from fboxlib.regrid import regrid - -open = fcboxlib.open -close = fcboxlib.close -mpi_size = fcboxlib.size -mpi_rank = fcboxlib.rank - -reduce_max = fcboxlib.reduce_max diff --git a/Src/Python/F90/fboxlib/boxarray.py b/Src/Python/F90/fboxlib/boxarray.py deleted file mode 100644 index e366bd77d..000000000 --- a/Src/Python/F90/fboxlib/boxarray.py +++ /dev/null @@ -1,34 +0,0 @@ -"""PyBoxLib boxarray class.""" - -import numpy as np -import fboxlib.fcboxlib as fcboxlib - -class boxarray(): - """BoxArray.""" - - def __init__(self, boxes): - """Create a boxarray from a list of boxes.""" - - nboxes = len(boxes) - dim = len(boxes[0][0]) - cboxes = np.zeros((nboxes,2,dim), np.int32) - for b, box in enumerate(boxes): - for t in (0, 1): - for c, comp in enumerate(boxes[b][t]): - cboxes[b,t,c] = boxes[b][t][c] - self.cptr = fcboxlib.boxarray_create_from_boxes(cboxes, nboxes, dim) - - @property - def nboxes(self): - return fcboxlib.boxarray_nboxes(self.cptr) - - @property - def dim(self): - return fcboxlib.boxarray_dim(self.cptr) - - def maxsize(self, size): - size = np.asarray(size, np.int32) - fcboxlib.boxarray_maxsize(self.cptr, size) - - def echo(self): - fcboxlib.boxarray_print(self.cptr) diff --git a/Src/Python/F90/fboxlib/fab.py b/Src/Python/F90/fboxlib/fab.py deleted file mode 100644 index 505bd3f9f..000000000 --- a/Src/Python/F90/fboxlib/fab.py +++ /dev/null @@ -1,49 +0,0 @@ -"""PyBoxLib fab class.""" - -__all__ = [ 'fab' ] - -import fboxlib.fcboxlib as fcboxlib -import numpy as np - -class fab(): - """FAB. - - Here we assume that a fab is attached to a multifab. - - DIM: Dimension - BX: The Box in index space for which this FAB is defined - IBX: The index range of the valid data for the FAB - PBX: The physical box for the FAB - NC: Number of components - NG: Number of ghost cells - - When a FAB is created IBX = BX, unless it is nodal, in which case - IBX = grow(BX, FACE=hi, 1 (in the nodal directions). - PBX = grow(IBX, NG) - - For parallel systems the BX, IBX, PBX, etc are all defined, but the - underlying pointer will not be allocated. - - All FABS are 'Four' dimensional, conventially, (NX,NY,NZ,NC) in size. - NY = 1, NZ = 1, when DIM =1, NZ = 1, when DIM = 2. - - """ - - def __init__(self, mfab, nbox, logical=False, squeeze=False): - if logical: - a = fcboxlib.lmultifab_as_numpy(mfab.cptr, nbox) - else: - a = fcboxlib.multifab_as_numpy(mfab.cptr, nbox) - if squeeze: - self.array = a.squeeze() - else: - shp = a.shape[:mfab.dim] + (a.shape[3],) - self.array = a.reshape(shp) - - @property - def shape(self): - return self.array.shape - - @property - def size(self): - return self.array.size diff --git a/Src/Python/F90/fboxlib/layout.py b/Src/Python/F90/fboxlib/layout.py deleted file mode 100644 index fab6ce595..000000000 --- a/Src/Python/F90/fboxlib/layout.py +++ /dev/null @@ -1,35 +0,0 @@ -"""PyBoxLib layout class.""" - -import numpy as np -import fboxlib.fcboxlib as fcboxlib - -class layout(): - """BoxLib layout.""" - - def __init__(self, boxarray=None, cptr=None): - if cptr: - self.cptr = cptr - else: - pmask = np.ones(boxarray.dim, np.int32) - self.cptr = fcboxlib.layout_create_from_boxarray(boxarray.cptr, pmask) - - @property - def nboxes(self): - """Return number of boxes.""" - return fcboxlib.layout_nboxes(self.cptr) - - @property - def local_boxes(self): - """List of local boxes.""" - return [ n for n in range(1, self.nboxes+1) if self.is_local(n) ] - - def is_local(self, n): - return fcboxlib.layout_local(self.cptr, n) - - def get_box(self, n): - if 1 <= n <= self.nboxes: - return fcboxlib.layout_get_box(self.cptr, n) - return None - - def echo(self): - fcboxlib.layout_print(self.cptr) diff --git a/Src/Python/F90/fboxlib/multifab.py b/Src/Python/F90/fboxlib/multifab.py deleted file mode 100644 index c08240d79..000000000 --- a/Src/Python/F90/fboxlib/multifab.py +++ /dev/null @@ -1,102 +0,0 @@ -"""PyBoxLib multifab class.""" - -import numpy as np -import fboxlib.fcboxlib as fcboxlib - -from fboxlib.fab import fab -from fboxlib.layout import layout - -class multifab(): - """MultiFAB.""" - - def __init__(self, layout=None, nc=1, ng=0, cptr=None): - if cptr: - self.cptr = cptr - else: - self.cptr = fcboxlib.multifab_create_from_layout(layout.cptr, nc, ng) - - def echo(self): - fcboxlib.multifab_print(self.cptr) - - # def copy(self, dest): - # """Copy self into *dest* (multifab).""" - # bl.pybl_multifab_copy(dest.cptr, self.cptr) - - def fill_boundary(self): - """Fill ghost cells between processors.""" - fcboxlib.multifab_fill_boundary(self.cptr) - - def fab(self, i): - """Return fab corresponding to box *i*.""" - return fab(self, i) - - @property - def layout(self): - return layout(cptr=fcboxlib.multifab_layout(self.cptr)) - - @property - def dim(self): - d, _, _, _ = fcboxlib.multifab_info(self.cptr) - return d - - @property - def nboxes(self): - _, d, _, _ = fcboxlib.multifab_info(self.cptr) - return d - - @property - def ncomp(self): - _, _, d, _ = fcboxlib.multifab_info(self.cptr) - return d - - @property - def nghost(self): - _, _, _, d = fcboxlib.multifab_info(self.cptr) - return d - - def write(self, dirname, header): - fcboxlib.multifab_write(self.cptr, - dirname, len(dirname), - header, len(header)) - - # def read(self, dirname, header): - # bl.pybl_multifab_read(dirname, len(dirname), header, len(header), - # byref(self.cptr)) - # self.get_info() - - -class lmultifab(): - """Logical MultiFAB.""" - - def __init__(self, layout=None, cptr=None): - if cptr: - self.cptr = cptr - else: - self.cptr = fcboxlib.lmultifab_create_from_layout(layout.cptr) - - def echo(self): - fcboxlib.lmultifab_print(self.cptr) - - def fab(self, i): - """Return fab corresponding to box *i*.""" - return fab(self, i, logical=True, squeeze=True) - - @property - def dim(self): - d, _, _, _ = fcboxlib.lmultifab_info(self.cptr) - return d - - @property - def nboxes(self): - _, d, _, _ = fcboxlib.lmultifab_info(self.cptr) - return d - - @property - def ncomp(self): - _, _, d, _ = fcboxlib.lmultifab_info(self.cptr) - return d - - @property - def nghost(self): - _, _, _, d = fcboxlib.lmultifab_info(self.cptr) - return d diff --git a/Src/Python/F90/fboxlib/regrid.py b/Src/Python/F90/fboxlib/regrid.py deleted file mode 100644 index 3818b93de..000000000 --- a/Src/Python/F90/fboxlib/regrid.py +++ /dev/null @@ -1,20 +0,0 @@ - -import fboxlib.fcboxlib as fcboxlib -import numpy as np - -from fboxlib.multifab import multifab - -def regrid(layouts, multifabs, dxs, tag_boxes, max_levs=8, amr_buf_width=2, max_grid_size=64): - - # XXX: passing layouts here is a bit redundant... - - nlevs = len(layouts) - lacptrs = np.zeros((max_levs,), np.long) - mfcptrs = np.zeros((max_levs,), np.long) - for i in range(nlevs): - lacptrs[i] = layouts[i].cptr - mfcptrs[i] = multifabs[i].cptr - - nlevs = fcboxlib.regrid(lacptrs, mfcptrs, nlevs, max_levs, tag_boxes) - - return [ multifab(cptr=x) for x in mfcptrs[:nlevs] ] diff --git a/Src/Python/F90/setup.py b/Src/Python/F90/setup.py deleted file mode 100644 index a4cee0b15..000000000 --- a/Src/Python/F90/setup.py +++ /dev/null @@ -1,31 +0,0 @@ -'''PyBoxLib setup script.''' - -import os - -from distutils.core import setup -from distutils.command.install import install -from distutils.command.build import build - -class build_boxlib(build): - def run(self): - build.run(self) - print 'running build_boxlib' - self.mkpath(self.build_lib) - target_files = [ 'fcboxlib.so' ] - if not self.dry_run: - self.copy_file('build/fcboxlib.so', - os.path.join(self.build_lib, 'fboxlib')) - -setup( - name = "PyBoxLib", - packages = ['fboxlib'], - author = "Matthew Emmett and Marc Day", - author_email = "mwemmett@lbl.gov", - description = "Python wrappers for BoxLib.", - license = "XXX", - keywords = "BoxLib", - url = "https://ccse.lbl.gov/BoxLib/", - cmdclass = { - 'build': build_boxlib, - } - ) diff --git a/Src/Python/F90/src/blobjects.f90 b/Src/Python/F90/src/blobjects.f90 deleted file mode 100644 index 2e45d2b2d..000000000 --- a/Src/Python/F90/src/blobjects.f90 +++ /dev/null @@ -1,115 +0,0 @@ -module blobjects - use multifab_module - use layout_module - use plotfile_module - use ml_layout_module -contains - -subroutine pybl_lmultifab_get(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(in), value :: cptr - type(lmultifab), pointer, intent(out) :: fptr - - call c_f_pointer(cptr, fptr) -end subroutine pybl_lmultifab_get - -subroutine pybl_lmultifab_new(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(out) :: cptr - type(lmultifab), pointer, intent(out) :: fptr - - allocate(fptr) - cptr = c_loc(fptr) -end subroutine pybl_lmultifab_new - - -subroutine pybl_multifab_get(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(in), value :: cptr - type(multifab), pointer, intent(out) :: fptr - - call c_f_pointer(cptr, fptr) -end subroutine pybl_multifab_get - -subroutine pybl_multifab_new(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(out) :: cptr - type(multifab), pointer, intent(out) :: fptr - - allocate(fptr) - cptr = c_loc(fptr) -end subroutine pybl_multifab_new - - -subroutine pybl_ml_layout_get(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(in), value :: cptr - type(ml_layout), pointer, intent(out) :: fptr - - call c_f_pointer(cptr, fptr) -end subroutine pybl_ml_layout_get - -subroutine pybl_ml_layout_new(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(out) :: cptr - type(ml_layout), pointer, intent(out) :: fptr - - allocate(fptr) - cptr = c_loc(fptr) -end subroutine pybl_ml_layout_new - - -subroutine pybl_layout_get(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(in), value :: cptr - type(layout), pointer, intent(out) :: fptr - - call c_f_pointer(cptr, fptr) -end subroutine pybl_layout_get - -subroutine pybl_layout_new(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(out) :: cptr - type(layout), pointer, intent(out) :: fptr - - allocate(fptr) - cptr = c_loc(fptr) -end subroutine pybl_layout_new - - -subroutine pybl_boxarray_get(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(in), value :: cptr - type(boxarray), pointer, intent(out) :: fptr - - call c_f_pointer(cptr, fptr) -end subroutine pybl_boxarray_get - -subroutine pybl_boxarray_new(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(out) :: cptr - type(boxarray), pointer, intent(out) :: fptr - - allocate(fptr) - cptr = c_loc(fptr) -end subroutine pybl_boxarray_new - - -subroutine pybl_plotfile_get(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(in), value :: cptr - type(plotfile), pointer, intent(out) :: fptr - - call c_f_pointer(cptr, fptr) -end subroutine pybl_plotfile_get - -subroutine pybl_plotfile_new(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(out) :: cptr - type(plotfile), pointer, intent(out) :: fptr - - allocate(fptr) - cptr = c_loc(fptr) -end subroutine pybl_plotfile_new - -end module blobjects diff --git a/Src/Python/F90/src/blobjects.py b/Src/Python/F90/src/blobjects.py deleted file mode 100644 index 2bd66173c..000000000 --- a/Src/Python/F90/src/blobjects.py +++ /dev/null @@ -1,47 +0,0 @@ -"""BoxLib/Python object store for various F90 types.""" - -types = [ 'lmultifab', 'multifab', 'ml_layout', 'layout', 'boxarray', 'plotfile' ] - -module = '''\ -module blobjects - use multifab_module - use layout_module - use plotfile_module - use ml_layout_module -contains - {routines} -end module blobjects -''' - -get = ''' -subroutine pybl_{type}_get(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(in), value :: cptr - type({type}), pointer, intent(out) :: fptr - - call c_f_pointer(cptr, fptr) -end subroutine pybl_{type}_get''' - -new = ''' -subroutine pybl_{type}_new(cptr,fptr) - use iso_c_binding - type(c_ptr), intent(out) :: cptr - type({type}), pointer, intent(out) :: fptr - - allocate(fptr) - cptr = c_loc(fptr) -end subroutine pybl_{type}_new -''' - -# stores = [] -routines = [] - -for t in types: - # stores.append(store.format(type=t)) - routines.append(get.format(type=t)) - routines.append(new.format(type=t)) - -with open('blobjects.f90', 'w') as f: - f.write(module.format( - # stores='\n'.join(stores), - routines='\n'.join(routines))) diff --git a/Src/Python/F90/src/boxlib_numpy_c.c b/Src/Python/F90/src/boxlib_numpy_c.c deleted file mode 100644 index d3bf9bbf4..000000000 --- a/Src/Python/F90/src/boxlib_numpy_c.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * BoxLib to NumPy routines. - * - * This is complied into its own Python extension module (instead of - * being rolled into the libpyfboxlib.so shared library) so that the - * NumPy API can be properly initialized (see import_array() below). - * Slightly annoying, but it works. - */ - -#include - -#define PY_ARRAY_UNIQUE_SYMBOL _PYBOXLIB_ARRAY_ - -#include "Python.h" -#include "numpy/arrayobject.h" - -// fortran prototypes -void multifab_as_numpy_f(void *cptr, int nbox, int *dims, void *ptr); - -PyObject * -multifab_as_numpy (PyObject * self, PyObject * args) -{ - int ndim; - long cptr; - double *ptr; - - PyObject *arr = NULL; - npy_intp dims[4]; - int idims[4]; - - if (!PyArg_ParseTuple (args, "li", &cptr, &nbox)) - return NULL; - - multifab_as_numpy_f((void *) cptr, nbox, idims, &ptr); - dims[0] = idims[0]; - dims[1] = idims[1]; - dims[2] = idims[2]; - dims[3] = idims[3]; - dims[ndim] = nc; - - arr = PyArray_NewFromDescr(&PyArray_Type, - PyArray_DescrFromType(NPY_DOUBLE), ndim+1, dims, NULL, - ptr, NPY_FORTRAN|NPY_WRITEABLE, NULL); - - Py_INCREF(arr); - return arr; -} - -/* PyObject * */ -/* plotfile_as_numpy (PyObject * self, PyObject * args) */ -/* { */ -/* int level, nbox, n1, n2, n3, n4; */ -/* long cptr; */ -/* double *ptr; */ - -/* PyObject *arr = NULL; */ -/* int ndim = 4; */ -/* npy_intp dims[4]; */ - -/* if (!PyArg_ParseTuple (args, "lii", &cptr, &level, &nbox)) */ -/* return NULL; */ - -/* plotfile_as_numpy_f((void *) cptr, &level, &nbox, &ptr, &n1, &n2, &n3, &n4); */ - -/* dims[0] = n1; */ -/* dims[1] = n2; */ -/* dims[2] = n3; */ -/* dims[3] = n4; */ - -/* arr = PyArray_NewFromDescr(&PyArray_Type, */ -/* PyArray_DescrFromType(NPY_DOUBLE), ndim, dims, NULL, */ -/* ptr, NPY_FORTRAN|NPY_WRITEABLE, NULL); */ - -/* Py_INCREF(arr); */ -/* return arr; */ -/* } */ - -/* PyObject * */ -/* lmultifab_as_numpy (PyObject * self, PyObject * args) */ -/* { */ -/* int mfid, nbox, n1, n2, n3, n4; */ -/* double *ptr; */ - -/* PyObject *arr = NULL; */ -/* int ndim = 4; */ -/* npy_intp dims[4]; */ - -/* if (!PyArg_ParseTuple (args, "ii", &mfid, &nbox)) */ -/* return NULL; */ - -/* lmultifab_as_numpy_f(&mfid, &nbox, &ptr, &n1, &n2, &n3, &n4); */ - -/* dims[0] = n1; */ -/* dims[1] = n2; */ -/* dims[2] = n3; */ -/* dims[3] = n4; */ - -/* arr = PyArray_NewFromDescr(&PyArray_Type, */ -/* PyArray_DescrFromType(NPY_INT), ndim, dims, NULL, */ -/* ptr, NPY_FORTRAN|NPY_WRITEABLE, NULL); */ - - -/* Py_INCREF(arr); */ -/* return arr; */ -/* } */ - -static PyMethodDef blnpy_methods[] = { - {"multifab_as_numpy", multifab_as_numpy, METH_VARARGS, - "Return NumPy array associated with a BoxLib multifab."}, - /* {"plotfile_as_numpy", plotfile_as_numpy, METH_VARARGS, */ - /* "Return NumPy array associated with a BoxLib plotfile fab."}, */ - /* {"lmultifab_array", lmultifab_as_numpy, METH_VARARGS, */ - /* "Return NumPy array associated with a BoxLib lmultifab."}, */ - {NULL, NULL}, -}; - -void -initblnpy(void) -{ - Py_InitModule("blnpy", blnpy_methods); - import_array(); -} diff --git a/Src/Python/F90/src/boxlib_numpy_f.f90 b/Src/Python/F90/src/boxlib_numpy_f.f90 deleted file mode 100644 index edf284bff..000000000 --- a/Src/Python/F90/src/boxlib_numpy_f.f90 +++ /dev/null @@ -1,77 +0,0 @@ -module boxlib_numpy - use iso_c_binding - use blobjects - implicit none -contains - - subroutine multifab_as_numpy_f(cptr, nbox, dims, aptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent(in ), value :: nbox - type(c_ptr), intent( out) :: aptr - integer(c_int), intent( out) :: dims(4) - - real(8), pointer :: fptr(:,:,:,:) - type(multifab), pointer :: mfab - integer :: lo(4) - - call pybl_multifab_get(cptr,mfab) - - fptr => dataptr(mfab,nbox) - lo = lbound(fptr) - - aptr = c_loc(fptr(lo(1),lo(2),lo(3),lo(4))) - dims(1) = size(fptr,1) - dims(2) = size(fptr,2) - dims(3) = size(fptr,3) - dims(4) = size(fptr,4) - end subroutine multifab_as_numpy_f - - subroutine lmultifab_as_numpy_f(cptr, nbox, dims, aptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent(in ), value :: nbox - type(c_ptr), intent( out) :: aptr - integer(c_int), intent( out) :: dims(4) - - logical, pointer :: fptr(:,:,:,:) - type(lmultifab), pointer :: mfab - integer :: lo(4) - - call pybl_lmultifab_get(cptr,mfab) - - fptr => dataptr(mfab,nbox) - lo = lbound(fptr) - - aptr = c_loc(fptr(lo(1),lo(2),lo(3),lo(4))) - dims(1) = size(fptr,1) - dims(2) = size(fptr,2) - dims(3) = size(fptr,3) - dims(4) = size(fptr,4) - end subroutine lmultifab_as_numpy_f - - ! subroutine plotfile_as_numpy_f(cptr, level, nbox, aptr, n1, n2, n3, n4) & - ! bind(c, name='plotfile_as_numpy_f') - ! use iso_c_binding - ! implicit none - - ! type(c_ptr), intent(in) :: cptr - ! integer(c_int), intent(in) :: level, nbox - ! type(c_ptr), intent(out) :: aptr - ! integer(c_int), intent(out) :: n1, n2, n3, n4 - - ! real(8), pointer :: fptr(:,:,:,:) - ! type(plotfile), pointer :: pf - ! integer :: lo(4) - - ! call pybl_plotfile_get(cptr,pf) - - ! fptr => dataptr(pf,level,nbox) - ! lo = lbound(fptr) - - ! aptr = c_loc(fptr(lo(1),lo(2),lo(3),lo(4))) - ! n1 = size(fptr,1) - ! n2 = size(fptr,2) - ! n3 = size(fptr,3) - ! n4 = size(fptr,4) - ! end subroutine plotfile_as_numpy_f - -end module boxlib_numpy diff --git a/Src/Python/F90/src/fboxlib.f90 b/Src/Python/F90/src/fboxlib.f90 deleted file mode 100644 index a5e1612f7..000000000 --- a/Src/Python/F90/src/fboxlib.f90 +++ /dev/null @@ -1,396 +0,0 @@ -module fboxlib - - use iso_c_binding - use blobjects - implicit none - -contains - - subroutine pybl_cstring(cstr, slen, fstr) - integer(c_int), intent(in) :: slen - character(c_char), intent(in) :: cstr(slen) - character(len=slen), intent(out) :: fstr - - integer :: i - - do i = 1, slen - fstr(i:i) = cstr(i) - end do - end subroutine pybl_cstring - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! open, close, set_comm - - subroutine pybl_hello() bind(c) - print *, 'Hello from Fortran, with FBoxLib!' - end subroutine pybl_hello - - subroutine pybl_open() bind(c) - use boxlib - call boxlib_initialize() - end subroutine pybl_open - - subroutine pybl_close() bind(c) - use boxlib - call boxlib_finalize() - end subroutine pybl_close - - subroutine pybl_mpi_rank(r) bind(c) - use parallel - integer(c_int), intent(out) :: r - r = parallel_myproc() - end subroutine pybl_mpi_rank - - subroutine pybl_mpi_size(r) bind(c) - use parallel - integer(c_int), intent(out) :: r - r = parallel_nprocs() - end subroutine pybl_mpi_size - - subroutine pybl_mpi_reduce_max(r) bind(c) - use parallel - real(c_double), intent(inout) :: r - real(c_double) :: s - s = r - call parallel_reduce(r, s, MPI_MAX) - end subroutine pybl_mpi_reduce_max - - ! subroutine pybl_set_comm(comm) - ! use parallel - ! implicit none - ! integer, intent(in) :: comm - ! call parallel_set_m_comm(comm) - ! end subroutine pybl_set_comm - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! boxarray routines - - subroutine pybl_boxarray_create_from_boxes(boxes,nboxes,dim,cptr) bind(c) - integer(c_int), intent(in ), value :: dim, nboxes - integer(c_int), intent(in ) :: boxes(dim,2,nboxes) - type(c_ptr), intent( out) :: cptr - - type(boxarray), pointer :: ba - integer :: i - type(box) :: bs(nboxes) - - do i=1,nboxes - bs(i) = make_box(boxes(:,1,i), boxes(:,2,i)) - end do - - call pybl_boxarray_new(cptr,ba) - call build(ba, bs) - end subroutine pybl_boxarray_create_from_boxes - - subroutine pybl_boxarray_print(cptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - type(boxarray), pointer :: ba - call pybl_boxarray_get(cptr, ba) - call print(ba) - end subroutine pybl_boxarray_print - - subroutine pybl_boxarray_nboxes(cptr,nb) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent( out) :: nb - type(boxarray), pointer :: ba - call pybl_boxarray_get(cptr, ba) - nb = nboxes(ba) - end subroutine pybl_boxarray_nboxes - - subroutine pybl_boxarray_dim(cptr,dim) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent( out) :: dim - type(boxarray), pointer :: ba - call pybl_boxarray_get(cptr, ba) - dim = ba%dim - end subroutine pybl_boxarray_dim - - subroutine pybl_boxarray_maxsize(cptr,maxsize,ndim) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent(in ), value :: ndim - integer(c_int), intent(in ) :: maxsize(ndim) - type(boxarray), pointer :: ba - call pybl_boxarray_get(cptr, ba) - call boxarray_maxsize(ba, maxsize) - end subroutine pybl_boxarray_maxsize - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! layout routines - - subroutine pybl_layout_create_from_boxarray(bacptr,dim,pmask,cptr) bind(c) - type(c_ptr), intent(in ), value :: bacptr - type(c_ptr), intent( out) :: cptr - integer(c_int), intent(in ), value :: dim - integer(c_int), intent(in ) :: pmask(dim) - - type(boxarray), pointer :: ba - type(layout), pointer :: la - logical :: lpmask(dim) - - call pybl_boxarray_get(bacptr, ba) - call pybl_layout_new(cptr, la) - - lpmask = pmask == 1 - call build(la, ba, boxarray_bbox(ba), pmask=lpmask) - end subroutine pybl_layout_create_from_boxarray - - subroutine pybl_layout_print(cptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - type(layout), pointer :: la - call pybl_layout_get(cptr, la) - call print(la) - end subroutine pybl_layout_print - - subroutine pybl_layout_nboxes(cptr, boxes) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent( out) :: boxes - type(layout), pointer :: la - call pybl_layout_get(cptr,la) - boxes = nboxes(la) - end subroutine pybl_layout_nboxes - - subroutine pybl_layout_get_box(cptr, intbuf, i) bind(c) - type(c_ptr), intent(in ), value :: cptr, intbuf - integer(c_int), intent(in ), value :: i - type(layout), pointer :: la - integer, pointer :: buf(:) - type(box) :: lbx - call c_f_pointer(intbuf, buf, [ 7 ]) - call pybl_layout_get(cptr,la) - lbx = get_box(la, i) - buf(1) = lbx%dim - buf(2:4) = lbx%lo - buf(5:7) = lbx%hi - end subroutine pybl_layout_get_box - - subroutine pybl_layout_local(cptr, nbox, islocal) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent(in ), value :: nbox - integer(c_int), intent( out) :: islocal - type(layout), pointer :: la - - call pybl_layout_get(cptr,la) - islocal = 0 - if (local(la, nbox)) then - islocal = 1 - end if - end subroutine pybl_layout_local - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! multifab routines - - subroutine pybl_lmultifab_create_from_layout(la_cptr,cptr) bind(c) - type(c_ptr), intent(in ), value :: la_cptr - type(c_ptr), intent( out) :: cptr - - type(layout), pointer :: la - type(lmultifab), pointer :: mfab - - call pybl_layout_get(la_cptr,la) - call pybl_lmultifab_new(cptr,mfab) - - call build(mfab, la) - call setval(mfab, .false.) - end subroutine pybl_lmultifab_create_from_layout - - subroutine pybl_multifab_create_from_layout(la_cptr,nc,ng,cptr) bind(c) - type(c_ptr), intent(in ), value :: la_cptr - integer(c_int), intent(in ), value :: nc, ng - type(c_ptr), intent( out) :: cptr - - type(layout), pointer :: la - type(multifab), pointer :: mfab - - call pybl_layout_get(la_cptr,la) - call pybl_multifab_new(cptr,mfab) - - call build(mfab, la, nc=nc, ng=ng) !, interleave=interleave) - call setval(mfab, 0.0d0) - end subroutine pybl_multifab_create_from_layout - - subroutine pybl_multifab_print(cptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - type(multifab), pointer :: mfab - call pybl_multifab_get(cptr, mfab) - call print(mfab) - end subroutine pybl_multifab_print - - subroutine pybl_multifab_destroy(cptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - type(multifab), pointer :: mfab - call pybl_multifab_get(cptr, mfab) - call destroy(mfab) - end subroutine pybl_multifab_destroy - - subroutine pybl_multifab_fill_boundary(cptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - type(multifab), pointer :: mfab - call pybl_multifab_get(cptr, mfab) - call fill_boundary(mfab) - end subroutine pybl_multifab_fill_boundary - - subroutine pybl_multifab_write(cptr, dirname, dlen, header, hlen) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent(in ), value :: dlen, hlen - character(c_char), intent(in ) :: dirname(dlen) - character(c_char), intent(in ) :: header(hlen) - - type(multifab), pointer :: mfab - character(len=dlen) :: dname - character(len=hlen) :: hname - - call pybl_cstring(dirname, dlen, dname) - call pybl_cstring(header, hlen, hname) - - call pybl_multifab_get(cptr, mfab) - call fabio_write(mfab, dname, hname) - end subroutine pybl_multifab_write - - subroutine pybl_multifab_read(dirname, dlen, header, hlen, cptr) bind(c) - integer(c_int), intent(in ), value :: dlen, hlen - character(c_char), intent(in ) :: dirname(dlen) - character(c_char), intent(in ) :: header(hlen) - type(c_ptr), intent( out) :: cptr - - type(multifab), pointer :: mfab - character(len=dlen) :: dname - character(len=hlen) :: hname - - call pybl_cstring(dirname, dlen, dname) - call pybl_cstring(header, hlen, hname) - call pybl_multifab_new(cptr, mfab) - call fabio_multifab_read_d(mfab, dname, hname) - end subroutine pybl_multifab_read - - subroutine pybl_multifab_copy(dcptr, scptr) bind(c) - type(c_ptr), intent(in ), value :: dcptr, scptr - type(multifab), pointer :: dmfab, smfab - call pybl_multifab_get(dcptr, dmfab) - call pybl_multifab_get(scptr, smfab) - call copy(dmfab, 1, smfab, 1, ncomp(smfab)) - end subroutine pybl_multifab_copy - - subroutine pybl_multifab_info(cptr, dim, nboxes, nc, ng) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent( out) :: dim, nboxes, nc, ng - type(multifab), pointer :: mfab - call pybl_multifab_get(cptr,mfab) - dim = mfab%dim - nboxes = nfabs(mfab) - nc = mfab%nc - ng = mfab%ng - end subroutine pybl_multifab_info - - subroutine pybl_multifab_layout(cptr, laptr) bind(c) - type(c_ptr), intent(in ), value :: cptr - type(c_ptr), intent( out) :: laptr - type(multifab), pointer :: mfab - type(layout), pointer :: la - call pybl_multifab_get(cptr,mfab) - la => mfab%la - laptr = c_loc(la) - end subroutine pybl_multifab_layout - - subroutine pybl_lmultifab_info(cptr, dim, nboxes, nc, ng) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent( out) :: dim, nboxes, nc, ng - type(lmultifab), pointer :: mfab - call pybl_lmultifab_get(cptr,mfab) - dim = mfab%dim - nboxes = nfabs(mfab) - nc = mfab%nc - ng = mfab%ng - end subroutine pybl_lmultifab_info - - subroutine pybl_fab_info(cptr, nbox, dim, nc, bx_lo, bx_hi, pbx_lo, pbx_hi, ibx_lo, ibx_hi) bind(c) - type(c_ptr), intent(in ), value :: cptr - integer(c_int), intent(in ), value :: nbox - integer(c_int), intent( out) :: dim, nc - integer(c_int), intent( out), dimension(3) :: bx_lo, bx_hi, pbx_lo, pbx_hi, ibx_lo, ibx_hi - - type(multifab), pointer :: mfab - type(box) :: bx - - call pybl_multifab_get(cptr,mfab) - dim = get_dim(mfab%fbs(nbox)) - nc = ncomp(mfab%fbs(nbox)) - - bx = get_box(mfab%fbs(nbox)) - bx_lo = bx%lo - bx_hi = bx%hi - - bx = get_pbox(mfab%fbs(nbox)) - pbx_lo = bx%lo - pbx_hi = bx%hi - - bx = get_ibox(mfab%fbs(nbox)) - ibx_lo = bx%lo - ibx_hi = bx%hi - end subroutine pybl_fab_info - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! regrid - - subroutine pybl_regrid(lacptrs, mfcptrs, nlevs, max_levs, tag_boxes_cb) bind(c) - use bc_module - use define_bc_module - use regrid_module - - integer(c_int), intent(in ), value :: max_levs - integer(c_int), intent(inout) :: nlevs - type(c_ptr), intent(inout) :: lacptrs(max_levs), mfcptrs(max_levs) - type(c_ptr), intent(in ), value :: tag_boxes_cb - - type(multifab), pointer :: mf - type(layout), pointer :: la - type(multifab), target :: mfs(max_levs) - - integer :: i, n, dim, new_nlevs, phys_bc_in(3,2) - type(ml_boxarray) :: mba - type(ml_layout) :: mla - type(bc_tower) :: bct - real(dp_t) :: dx(max_levs) - - ! build multilevel layout - call pybl_layout_get(lacptrs(1),la) - dim = get_dim(la) - - call build(mba, max_levs, dim) - mba%rr = 2 - dx = 1 - do i=1,max_levs-1 - dx(i+1) = dx(i)/2 - end do - - mba%pd(1) = get_box(la, 1) - do n=2,max_levs - mba%pd(n) = refine(mba%pd(n-1),mba%rr((n-1),:)) - enddo - - do i=1,nlevs - call pybl_layout_get(lacptrs(i),la) - call pybl_multifab_get(mfcptrs(i),mf) - mba%bas(i) = get_boxarray(la) - call boxarray_verify_dim(mba%bas(i)) - mfs(i) = mf - end do - - call ml_layout_restricted_build(mla,mba,nlevs) - ! call destroy(mba) - - phys_bc_in = PERIODIC - call bc_tower_init(bct, max_levs, dim, phys_bc_in) - do n = 1,nlevs - call bc_tower_level_build(bct,n,mla%la(n)) - end do - - call regrid(mla, mfs, nlevs, max_levs, dx, bct, 2, 64, tag_boxes_cb) - - do i=1,nlevs - call pybl_multifab_new(mfcptrs(i),mf) - mf = mfs(i) - end do - - end subroutine pybl_regrid - -end module fboxlib diff --git a/Src/Python/F90/src/fboxlib_c.c b/Src/Python/F90/src/fboxlib_c.c deleted file mode 100644 index b81eb5949..000000000 --- a/Src/Python/F90/src/fboxlib_c.c +++ /dev/null @@ -1,496 +0,0 @@ -/* - * BoxLib Python wrappers. - */ - -#include - -#define PY_ARRAY_UNIQUE_SYMBOL _PYBOXLIB_ARRAY_ - -#include "Python.h" -#include "numpy/arrayobject.h" - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_open(void); - -PyObject * -pyblw_open (PyObject * self, PyObject * args) -{ - pybl_open(); - Py_INCREF(Py_None); - return Py_None; -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_close(void); - -PyObject * -pyblw_close (PyObject * self, PyObject * args) -{ - pybl_close(); - Py_INCREF(Py_None); - return Py_None; -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_mpi_rank(int*); - -PyObject * -pyblw_mpi_rank (PyObject * self, PyObject * args) -{ - int rank; - pybl_mpi_rank(&rank); - return PyInt_FromLong(rank); -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_mpi_size(int*); - -PyObject * -pyblw_mpi_size (PyObject * self, PyObject * args) -{ - int size; - pybl_mpi_size(&size); - return PyInt_FromLong(size); -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_mpi_reduce_max(double*); - -PyObject * -pyblw_mpi_reduce_max (PyObject * self, PyObject * args) -{ - double r; - if (!PyArg_ParseTuple (args, "d", &r)) - return NULL; - pybl_mpi_reduce_max(&r); - return PyFloat_FromDouble(r); -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_boxarray_create_from_boxes(int*,int,int,void*); - -PyObject * -pyblw_boxarray_create_from_boxes (PyObject * self, PyObject * args) -{ - PyArrayObject *boxes; - int nboxes, dim; - long ptr; - if (!PyArg_ParseTuple (args, "O&ii", PyArray_Converter, &boxes, &nboxes, &dim)) - return NULL; - pybl_boxarray_create_from_boxes((int*)PyArray_DATA(boxes),nboxes,dim,&ptr); - return PyLong_FromLong(ptr); -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_boxarray_print(void*); - -PyObject * -pyblw_boxarray_print (PyObject * self, PyObject * args) -{ - long ptr; - if (!PyArg_ParseTuple (args, "l", &ptr)) - return NULL; - pybl_boxarray_print((void*)ptr); - Py_INCREF(Py_None); - return Py_None; -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_boxarray_nboxes(void*,int*); - -PyObject * -pyblw_boxarray_nboxes (PyObject * self, PyObject * args) -{ - long ptr; - if (!PyArg_ParseTuple (args, "l", &ptr)) - return NULL; - int nboxes; - pybl_boxarray_nboxes((void*)ptr,&nboxes); - return PyInt_FromLong(nboxes); -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_boxarray_dim(void*,int*); - -PyObject * -pyblw_boxarray_dim (PyObject * self, PyObject * args) -{ - long ptr; - if (!PyArg_ParseTuple (args, "l", &ptr)) - return NULL; - int dim; - pybl_boxarray_dim((void*)ptr,&dim); - return PyInt_FromLong(dim); -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_boxarray_maxsize(void*,int*,int); - -PyObject * -pyblw_boxarray_maxsize (PyObject * self, PyObject * args) -{ - PyArrayObject *sizes; - long ptr; - if (!PyArg_ParseTuple (args, "lO&", &ptr, PyArray_Converter, &sizes)) - return NULL; - pybl_boxarray_maxsize((void*)ptr,(int*)PyArray_DATA(sizes),PyArray_DIM(sizes,0)); - Py_INCREF(Py_None); - return Py_None; -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_layout_create_from_boxarray(void*,int,int*,void*); - -PyObject * -pyblw_layout_create_from_boxarray (PyObject * self, PyObject * args) -{ - PyArrayObject *pmask; - long baptr, ptr; - if (!PyArg_ParseTuple (args, "lO&", &baptr, PyArray_Converter, &pmask)) - return NULL; - pybl_layout_create_from_boxarray((void*)baptr,PyArray_DIM(pmask, 0),(int*)PyArray_DATA(pmask),&ptr); - return PyLong_FromLong(ptr); -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_layout_print(void*); - -PyObject * -pyblw_layout_print (PyObject * self, PyObject * args) -{ - long ptr; - if (!PyArg_ParseTuple (args, "l", &ptr)) - return NULL; - pybl_layout_print((void*)ptr); - Py_INCREF(Py_None); - return Py_None; -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_layout_local(void*, int, int*); - -PyObject * -pyblw_layout_local (PyObject * self, PyObject * args) -{ - long ptr; - int n, local; - if (!PyArg_ParseTuple (args, "li", &ptr, &n)) - return NULL; - pybl_layout_local((void*)ptr,n,&local); - if (local) { - Py_RETURN_TRUE; - } - Py_RETURN_FALSE; -} - -//////////////////////////////////////////////////////////////////////////////// - -void pybl_layout_get_box(void*, void*, int); - -PyObject * -pyblw_layout_get_box (PyObject * self, PyObject * args) -{ - long ptr; - int n, bx[7]; - if (!PyArg_ParseTuple (args, "li", &ptr, &n)) - return NULL; - pybl_layout_get_box((void*)ptr,(void*)bx,n); - - npy_intp dims[1] = { bx[0] }; - PyObject *nplo = PyArray_EMPTY(1, dims, NPY_INT, 0); - PyObject *nphi = PyArray_EMPTY(1, dims, NPY_INT, 0); - - for (int i=0; i 0) then - call cluster(ba_new, tagboxes, buf_wid, ref_ratio=ref_ratio) - endif - call destroy(tagboxes) - end subroutine make_boxes - - subroutine buffer(lev,la_np1,la_nm1,ba_new,ref_ratio,buff) - - integer , intent(in ) :: lev - type(layout) , intent(in ) :: la_np1 - type(layout) , intent(in ) :: la_nm1 - type(boxarray) , intent(inout) :: ba_new - integer , intent(in ) :: buff - integer , intent(in ) :: ref_ratio - - type(boxarray) :: boxes - type(lmultifab) :: tagboxes - integer :: buff_c - - ! Coarsen the (n+1) boxes twice so that we define tagboxes on the (n-1) level. - call copy(boxes,get_boxarray(la_np1)) - call boxarray_coarsen(boxes,ref_ratio*ref_ratio) - - call lmultifab_build(tagboxes,la_nm1,1,0) - call setval(tagboxes, .false., all=.true.) - call setval(tagboxes, .true., boxes) - - if (lmultifab_count(tagboxes) == 0) & - call bl_warn('No points tagged at level ',lev) - - buff_c = (buff+1) / (ref_ratio*ref_ratio) - call cluster(ba_new,tagboxes,buff_c,ref_ratio=ref_ratio) - - ! Now refine so we're back to the right level - call boxarray_refine(ba_new,ref_ratio) - - call destroy(tagboxes) - - call destroy(boxes) - - end subroutine buffer - - subroutine enforce_proper_nesting(mba,la_array,max_grid_size_2,max_grid_size_3_in) - - implicit none - - type(ml_boxarray), intent(inout) :: mba - type(layout) , intent(inout) :: la_array(:) - integer , intent(in ) :: max_grid_size_2 - integer , intent(in ), optional :: max_grid_size_3_in - - integer :: nl,n,i,j,ng_buffer,nlevs - integer :: counter - integer :: ref_ratio(mba%dim) - logical :: pmask(mba%dim) - logical :: all_properly_nested - type(box) :: pd, bx - type(list_box) :: bl - type(box_intersector), pointer :: bi(:) - type(boxarray) :: ba_new - type(boxarray) :: ba_newest - type(boxarray) :: ba_crse_fine - type(layout) :: la_old_comp - type(boxarray) :: ba_old_comp - type(lmultifab) :: tagboxes - type(layout) :: latmp - - integer :: max_grid_size_3 - - if (present (max_grid_size_3_in)) then - max_grid_size_3 = max_grid_size_3_in - else - max_grid_size_3 = max_grid_size_2 - end if - - nlevs = mba%nlevel - - pmask = get_pmask(la_array(1)) - ng_buffer = 4 - - all_properly_nested = .false. - counter = 0 - - do while ( .not. all_properly_nested ) - - all_properly_nested = .true. - counter = counter + 1 - - if (counter .gt. nlevs + 1) call bl_error('Still not properly nested after nlevs + 1 tries') - - nl = nlevs - 1 - do while ( (nl .ge. 2) ) - - if (.not. empty(mba%bas(nl+1))) then - - ! Test whether level nl+1 boxes are properly nested inside level nl boxes. - if (.not. ml_boxarray_properly_nested(mba, ng_buffer, pmask, nl+1, nl+1)) then - - ref_ratio = mba%rr(nl,:) - - ! Buffer returns a boxarray "ba_new" that contains everything at level nl - ! that the level nl+1 level will need for proper nesting - call buffer(nl,la_array(nl+1),la_array(nl-1), & - ba_new,ref_ratio(1),ng_buffer) - - ! Merge the new boxarray "ba_new" with the existing box_array - ! mba%bas(nl) so that we get the union of points. - call build(latmp,mba%bas(nl),mba%pd(nl)) - call layout_boxarray_diff(ba_old_comp,mba%pd(nl),latmp) - call destroy(latmp) - - call build(la_old_comp,ba_old_comp,mba%pd(nl),mapping = LA_LOCAL) - ! LA_LOCAL ==> bypass processor distribution calculation. - - ! Start to load bl with the boxes we had before in ba_old (aka mba%bas(nl)). - do i = 1, nboxes(mba%bas(nl)) - call push_back(bl, get_box(mba%bas(nl),i)) - end do - - ! split up ba_new so the number of intersections per - ! box isn't to big. i.e., there is more than one box in ba_new - if (nl .eq. 2) then - call boxarray_maxsize(ba_new,max_grid_size_2) - else - call boxarray_maxsize(ba_new,max_grid_size_3) - end if - - ! Now load with the new boxes that are the intersection of - ! ba_new with the complement of ba_old (aka mba%bas(nl)) - do j = 1, nboxes(ba_new) - bi => layout_get_box_intersector(la_old_comp, get_box(ba_new,j)) - do i = 1, size(bi) - call push_back(bl, bi(i)%bx) - end do - deallocate(bi) - end do - - call build(ba_newest,bl) - call boxarray_simplify(ba_newest) - - if (nl .eq. 2) then - call boxarray_maxsize(ba_newest,max_grid_size_2) - else - call boxarray_maxsize(ba_newest,max_grid_size_3) - end if - - ! Do some cleanup. - call destroy(bl) - call destroy(ba_new) - call destroy(ba_old_comp) - call destroy(la_old_comp) - - ! Replace mba%bas(nl) by ba_newest - call destroy(mba%bas(nl)) - call copy(mba%bas(nl),ba_newest) - call destroy(ba_newest) - - ! Destroy the old layout and build a new one. - call destroy(la_array(nl)) - call layout_build_ba(la_array(nl),mba%bas(nl),mba%pd(nl),pmask) - - ! Redo the boxes using the cluster algorithm - call lmultifab_build(tagboxes,la_array(nl-1),1,0) - call setval(tagboxes, .false.) - call copy(ba_crse_fine,mba%bas(nl)) - call boxarray_coarsen(ba_crse_fine,ref_ratio) - call setval(tagboxes, .true., ba_crse_fine) - call destroy(ba_crse_fine) - call cluster(ba_new, tagboxes, 0, ref_ratio=ref_ratio(1)) - call destroy(tagboxes) - if (nl .eq. 2) then - call boxarray_maxsize(ba_new,max_grid_size_2/ref_ratio) - else - call boxarray_maxsize(ba_new,max_grid_size_3/ref_ratio) - end if - call boxarray_refine(ba_new,ref_ratio) - - ! Destroy the old boxarray level and put ba_new there. - call destroy(mba%bas(nl)) - call copy(mba%bas(nl),ba_new) - - ! Destroy the old layout and build a new one from ba_new. - call destroy(la_array(nl)) - call layout_build_ba(la_array(nl),ba_new,mba%pd(nl),pmask) - call destroy(ba_new) - - ! Double check we got the proper nesting right - - if (.not. ml_boxarray_properly_nested(mba, ng_buffer, pmask, nl+1, nl+1)) & - all_properly_nested = .false. - - endif !if not properly nested - endif ! if fine level has any boxes - - nl = nl - 1 - - enddo ! do while - - enddo ! .not. properly nested - - ! Now test on whether any grids at level nl+1 come within one level nl cell of a physical boundary, - ! and if they do, extend those boxes to the boundary. - do n = 2,nlevs - - pd = mba%pd(n) - - if (.not. empty(mba%bas(n))) then - - do j = 1,mba%dim - if (.not. pmask(j)) then - do i = 1, nboxes(mba,n) - - if ( ( lwb(get_box(mba%bas(n),i),j) - lwb(pd,j)) .le. 2) then - bx = get_box(mba%bas(n),i) - call set_lwb(bx,j,lwb(pd,j)) - call set_box(mba%bas(n),i,bx) - end if - - if ( (upb(pd,j) - upb(get_box(mba%bas(n),i),j)) .le. 2) then - bx = get_box(mba%bas(n),i) - call set_upb(bx,j,upb(pd,j)) - call set_box(mba%bas(n),i,bx) - end if - - end do - end if - end do - - end if - - end do - - end subroutine enforce_proper_nesting - -end module make_new_grids_module diff --git a/Src/Python/F90/src/regrid.f90 b/Src/Python/F90/src/regrid.f90 deleted file mode 100644 index 640ae0395..000000000 --- a/Src/Python/F90/src/regrid.f90 +++ /dev/null @@ -1,224 +0,0 @@ -module regrid_module - - use iso_c_binding - use ml_layout_module - use multifab_module - use make_new_grids_module - use ml_restrict_fill_module - use tag_boxes_module, only : tagging_needs_ghost_cells - - implicit none - - private - - public :: regrid - -contains - - subroutine regrid(mla,phi,nlevs,max_levs,dx,the_bc_tower,amr_buf_width,max_grid_size,tag_boxes_cb) - - type(ml_layout), intent(inout) :: mla - type(multifab) , intent(inout) :: phi(:) - integer , intent(inout) :: nlevs - real(dp_t) , intent(in ) :: dx(:) - type(bc_tower) , intent(inout) :: the_bc_tower - integer , intent(in ) :: amr_buf_width, max_grid_size, max_levs - type(c_funptr) , intent(in ) :: tag_boxes_cb - - ! local variables - type(layout) :: la_array(max_levs) - type(multifab) :: phi_orig(max_levs) - type(multifab), allocatable :: phi_opt(:) - type(ml_boxarray) :: mba - - integer :: dm,n,nl,n_buffer, nlevs_old, nc, ng - - logical :: new_grid, properly_nested, pmask(mla%dim), same_boxarray - - nlevs_old = nlevs - - dm = mla%dim - pmask = mla%pmask - - nc = ncomp(phi(1)) - ng = nghost(phi(1)) - - la_array(1) = mla%la(1) - - phi_orig(1) = phi(1) - - do n=2,nlevs - ! create copies of the old data - call multifab_build(phi_orig(n),mla%la(n),nc,ng) - call multifab_copy(phi_orig(n),phi(n)) - - ! get rid of the original multifab so we can create a new one - ! with a new grid structure and the same name - call multifab_destroy(phi(n)) - end do - - ! mba is big enough to hold max_levs levels - ! even though we know we had nlevs last time, we might - ! want more or fewer levels after regrid (if nlevs < max_levs) - call ml_boxarray_build_n(mba,max_levs,dm) - call ml_boxarray_set_ref_ratio(mba) - - ! copy the level 1 boxarray - call copy(mba%bas(1),mla%mba%bas(1)) - - ! set the problem domain at all levels - mba%pd(1) = mla%mba%pd(1) - do n=2,max_levs - mba%pd(n) = refine(mba%pd(n-1),mba%rr((n-1),:)) - end do - - nl = 1 - new_grid = .true. - - ! this is the number of level n+1 buffer cells we require between levels - ! n and n+2 for proper nesting - n_buffer = 4 - - do while ( (nl .lt. max_levs) .and. new_grid ) - - if (tagging_needs_ghost_cells) then - call multifab_fill_boundary(phi(nl)) - call multifab_physbc(phi(nl),1,1,nc,the_bc_tower%bc_tower_array(nl)) - end if - - ! determine whether we need finer grids based on tagging criteria - ! if so, return new_grid=T and the la_array(nl+1) - call make_new_grids(new_grid,la_array(nl),la_array(nl+1),phi(nl),dx(nl), & - amr_buf_width,mba%rr(nl,1),nl,max_grid_size,tag_boxes_cb) - - if (new_grid) then - - ! set the level nl+1 boxarray - call copy(mba%bas(nl+1),get_boxarray(la_array(nl+1))) - - ! enforce proper nesting within the grid creation procedure - if (nl .ge. 2) then - - ! Test on whether grids are already properly nested - properly_nested = ml_boxarray_properly_nested(mba, n_buffer, pmask, & - max_fine_level=nl+1) - - if (.not. properly_nested) then - - do n = 2,nl - ! Delete multifabs so that we can rebuild them. - call destroy(phi(n)) - end do - - ! Change the layout at levels 2 through nl so the new grid - ! structure is properly nested - call enforce_proper_nesting(mba,la_array,max_grid_size) - - ! Loop over all the lower levels which we might have changed - ! when we enforced proper nesting. - do n = 2,nl - - ! This makes sure the boundary conditions are properly defined everywhere - call bc_tower_level_build(the_bc_tower,n,la_array(n)) - - ! Rebuild the lower level data again if it changed. - call multifab_build(phi(n),la_array(n),nc,ng) - - if (mla%nlevel .ge. n) then - same_boxarray = boxarray_same_q(get_boxarray(phi (n)), & - & get_boxarray(phi_orig(n))) - else - same_boxarray = .false. - end if - - if (.not. same_boxarray) then - ! first fill all refined cells by interpolating from coarse - ! data underneath... no need to fill ghost cells - call fillpatch(phi(n),phi(n-1),0,mba%rr(n-1,:), & - the_bc_tower%bc_tower_array(n-1), & - the_bc_tower%bc_tower_array(n), & - 1,1,1,nc,no_final_physbc_input=.true.) - end if - - ! ... then overwrite with the original data at that level, if it existed - if (mla%nlevel .ge. n) then - call multifab_copy(phi(n),phi_orig(n)) - end if - - end do - - end if ! if (.not. properly_nested) - - end if ! if (nl .ge. 2) then - - ! Define bc_tower at level nl+1. - call bc_tower_level_build(the_bc_tower,nl+1,la_array(nl+1)) - - ! Build the level nl+1 data only. - call multifab_build(phi(nl+1),la_array(nl+1),nc,ng) - - if (mla%nlevel .ge. nl+1) then - same_boxarray = boxarray_same_q(get_boxarray(phi (nl+1)), & - & get_boxarray(phi_orig(nl+1))) - else - same_boxarray = .false. - end if - - if (.not.same_boxarray) then - ! first fill all refined cells by interpolating from coarse - ! data underneath... - ! no need to fill ghost cells - call fillpatch(phi(nl+1),phi(nl),0,mba%rr(nl,:), & - the_bc_tower%bc_tower_array(nl), & - the_bc_tower%bc_tower_array(nl+1), & - 1,1,1,nc,no_final_physbc_input=.true.) - end if - - ! ... then overwrite with the original data at that level, if it existed - if (mla%nlevel .ge. nl+1) then - call multifab_copy(phi(nl+1),phi_orig(nl+1)) - end if - - nl = nl+1 - nlevs = nl - - end if - - end do ! end do while ( (nl .lt. max_levs) .and. new_grid ) - - nlevs = nl - - do n=2, nlevs_old - call multifab_destroy(phi_orig(n)) - end do - - ! this destroys everything in mla except the coarsest layout - call destroy(mla, keep_coarse_layout=.true.) - - call ml_layout_build_la_array(mla,la_array,mba,pmask,nlevs) - call destroy(mba) - - ! We need to move data if a layout in la_array is not used in mla. - ! We also need to destroy any unused layouts. - allocate(phi_opt(nlevs)) - do n=1,nlevs - if (mla%la(n) .ne. la_array(n)) then - call multifab_build(phi_opt(n), mla%la(n), nc, ng) - call multifab_copy(phi_opt(n), phi(n)) - call destroy(phi(n)) - call destroy(la_array(n)) - phi(n) = phi_opt(n) - end if - end do - deallocate(phi_opt) - - ! This makes sure the boundary conditions are properly defined everywhere - do n=1,nlevs - call bc_tower_level_build(the_bc_tower,n,mla%la(n)) - end do - - call ml_restrict_and_fill(nlevs, phi, mla%mba%rr, the_bc_tower%bc_tower_array) - - end subroutine regrid - -end module regrid_module diff --git a/Src/Python/F90/src/tag_boxes.f90 b/Src/Python/F90/src/tag_boxes.f90 deleted file mode 100644 index fb1770b9f..000000000 --- a/Src/Python/F90/src/tag_boxes.f90 +++ /dev/null @@ -1,30 +0,0 @@ -module tag_boxes_module - use multifab_module - use bl_error_module - use iso_c_binding - implicit none - logical, save :: tagging_needs_ghost_cells = .true. - - interface - subroutine tag_boxes_p(mf,tagboxes,dx,lev) - use iso_c_binding - type(c_ptr), intent(in), value :: mf, tagboxes - real(c_double), intent(in), value :: dx - integer(c_int), intent(in), value :: lev - end subroutine tag_boxes_p - end interface -contains - - subroutine tag_boxes(mf,tagboxes,dx,lev,tag_boxes_cb) - type( multifab) , intent(in ), target :: mf - type(lmultifab) , intent(inout), target :: tagboxes - real(dp_t) , intent(in ) :: dx - integer , intent(in ) :: lev - type(c_funptr) , intent(in ) :: tag_boxes_cb - - procedure(tag_boxes_p), pointer :: tag - call c_f_procpointer(tag_boxes_cb, tag) - call tag(c_loc(mf), c_loc(tagboxes), dx, lev) - end subroutine tag_boxes - -end module tag_boxes_module diff --git a/Src/Python/F90/tests/regrid.py b/Src/Python/F90/tests/regrid.py deleted file mode 100644 index 08360670a..000000000 --- a/Src/Python/F90/tests/regrid.py +++ /dev/null @@ -1,32 +0,0 @@ - -import fboxlib -fboxlib.open() - -ba = fboxlib.boxarray([[(0,0), (100,100)]]) -la = fboxlib.layout(ba) -mf = fboxlib.multifab(la, nc=3, ng=0) - -print "#"*80 -print "# before regridding" -la.echo() - -fab = mf.fab(1) -fab.array[...] = 1.0 -fab.array[10:20,10:20] = 2.0 -fab.array[50:60,50:60] = 2.0 - -def tag_boxes(mf, tb, dx, lev): - if lev > 1: - return - mf = fboxlib.multifab(cptr=mf) - tb = fboxlib.lmultifab(cptr=tb) - mfab = mf.fab(1) - tfab = tb.fab(1) - tfab.array[mfab.array[:,:,0] > 1.0] = 1 - -mfs = fboxlib.regrid([la], [mf], [0.5], tag_boxes) - -print "#"*80 -print "# after regridding" -for mf in mfs: - mf.layout.echo() diff --git a/Src/Python/GMakerules.mak b/Src/Python/GMakerules.mak deleted file mode 100644 index abc5236e2..000000000 --- a/Src/Python/GMakerules.mak +++ /dev/null @@ -1,12 +0,0 @@ -F90FLAGS += -fPIC -CFLAGS += -fPIC - -NPINCLUDE:=-I$(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()') -NPINCLUDE+=-I$(shell python -c 'import numpy; print numpy.get_include()')/numpy - -PYLDFLAGS = $(shell python-config --ldflags) -$(PYFBOXLIB): $(objects) - $(F90) $(F90FLAGS) -shared -o $@ $^ $(PYLDFLAGS) - -$(PYCBOXLIB): $(PYBOXLIB)/fsrc/boxlib_numpy_c.c - $(CC) $(CFLAGS) $(NPINCLUDE) -shared -o $@ $^ -L. -lpyfboxlib $(PYLDFLAGS) diff --git a/Src/Python/GNUmakefile b/Src/Python/GNUmakefile deleted file mode 100644 index 37f0be8ae..000000000 --- a/Src/Python/GNUmakefile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Makefile for C++ versions of PyBoxLib -# - -OUT ?= . - -COMP ?= gcc -FCOMP ?= gfortran -CXX ?= mpic++ -CC ?= mpicc - -all: - make -f GNUmakefile_CXX.mak DIM=1 COMP=$(COMP) FCOMP=$(FCOMP) CC=$(CC) CXX=$(CXX) OUT=$(OUT) - make -f GNUmakefile_CXX.mak DIM=2 COMP=$(COMP) FCOMP=$(FCOMP) CC=$(CC) CXX=$(CXX) OUT=$(OUT) - make -f GNUmakefile_CXX.mak DIM=3 COMP=$(COMP) FCOMP=$(FCOMP) CC=$(CC) CXX=$(CXX) OUT=$(OUT) - -wrappers: - make -f GNUmakefile_CXX.mak DIM=1 wrapper - make -f GNUmakefile_CXX.mak DIM=2 wrapper - make -f GNUmakefile_CXX.mak DIM=3 wrapper - -clean: - rm -rf boxlib/*.so boxlib/*.pyc *.pyc - -realclean: - rm -rf build/ boxlib/*.so boxlib/*.pyc *.pyc d f o - -.PHONY: clean diff --git a/Src/Python/GNUmakefile_CXX.mak b/Src/Python/GNUmakefile_CXX.mak deleted file mode 100644 index a804c8170..000000000 --- a/Src/Python/GNUmakefile_CXX.mak +++ /dev/null @@ -1,146 +0,0 @@ -# -# Makefile for DIM dimensional BoxLib wrapper. -# - -# -# Configuration -# - -TOP = ../../.. -BOXLIB_HOME = ../.. - -PRECISION = DOUBLE -DEBUG = FALSE -PROFILE = FALSE -USE_MPI = TRUE -USE_OMP = FALSE - -NEEDSCHEM = FALSE -NEEDSGEOM = FALSE - -ifeq ($(NEEDSCHEM), TRUE) - COMBUSTION_HOME = $(TOP)/Combustion - CHEMISTRY_DIR = $(COMBUSTION_HOME)/Chemistry - - CHEMISTRY_MODEL=GRI12 - CHEMISTRY_MODEL=INERT30 - CHEMISTRY_MODEL=CH4-2STEP - CHEMISTRY_MODEL=PROPANE - CHEMISTRY_MODEL=CHEMH - CHEMISTRY_MODEL=LIDRYMOD - CHEMISTRY_MODEL=DRM19 - CHEMISTRY_MODEL=GRI30_noArN - CHEMISTRY_MODEL=LUDME -endif - -# -# Definitions -# - -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs - -FFLAGS += -fPIC -fFLAGS += -fPIC -CFLAGS += -fPIC -CXXFLAGS += -fPIC - -# -# Paths -# - -Bdirs += $(BOXLIB_HOME)/Src/C_BaseLib -ifeq ($(NEEDSCHEM), TRUE) - Bdirs += $(COMBUSTION_HOME)/Chemistry/src -endif -ifeq (${NEEDSGEOM}, TRUE) - Bdirs += ${BOXLIB_HOME}/Src/C_BoundaryLib -endif - -Bpack += $(foreach dir, $(Bdirs), $(dir)/Make.package) -Blocs += $(foreach dir, $(Bdirs), $(dir)) - -include $(Bpack) - -INCLUDE_LOCATIONS += src $(Blocs) -VPATH_LOCATIONS += src $(Blocs) - -ifeq (${NEEDSCHEM}, TRUE) - ifeq (${CHEMISTRY_MODEL}, DRM19) - CHEM_MECHFILE = drm19.c - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/gri/PMFs - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/gri - endif - ifeq (${CHEMISTRY_MODEL}, CHEMH) - CHEM_MECHFILE = chem-H.c - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/chem-H/PMFs - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/chem-H - endif - ifeq (${CHEMISTRY_MODEL}, LIDRY) - CHEM_MECHFILE = LiDryer.c - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/LiDryer/PMFs - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/LiDryer - endif - ifeq (${CHEMISTRY_MODEL}, LIDRYMOD) - CHEM_MECHFILE = LiDryerMOD.c - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/LiDryer/PMFs - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/LiDryer - endif - ifeq (${CHEMISTRY_MODEL}, GRI30_noArN) - CHEM_MECHFILE = grimech30-noArN.c - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/gri/PMFs - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/gri - endif - ifeq (${CHEMISTRY_MODEL}, GLARSKEL) - CHEM_MECHFILE = glarSkel.c - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/glar/PMFs - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/glar - endif - ifeq (${CHEMISTRY_MODEL}, LUDME) - CHEM_MECHFILE = LuDME.c - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/Lu/PMFs - VPATH_LOCATIONS += ${CHEMISTRY_DIR}/data/Lu - endif - cEXE_sources += ${CHEM_MECHFILE} -endif - -vpath %.c $(VPATH_LOCATIONS) -vpath %.cpp $(VPATH_LOCATIONS) -vpath %.h $(VPATH_LOCATIONS) -vpath %.H $(VPATH_LOCATIONS) -vpath %.F $(VPATH_LOCATIONS) -vpath %.f $(VPATH_LOCATIONS) -vpath %.f90 $(VPATH_LOCATIONS) - -# -# Python and NumPy -# - -PYINCLUDE := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()') -NPINCLUDE := $(shell python -c 'import numpy; print numpy.get_include()') -PYLIBS := $(shell python-config --ldflags) - -INCLUDE_LOCATIONS += $(PYINCLUDE) $(NPINCLUDE) - -FORTLIBS = -ifeq ($(FCOMP), gfortran) - __gcc_lib_dir := $(dir $(shell gfortran -print-file-name=libgfortran.a)) - FORTLIBS += -L$(__gcc_lib_dir) -lgfortran -endif - -# -# Rules -# - -WRAPPER = src/boxlib_wrap_$(DIM).cpp -PYSO = $(OUT)/_bl$(DIM).so - -all: $(PYSO) - -$(PYSO): $(objForExecs) $(objEXETempDir)/boxlib_wrap_$(DIM).o - $(CXX) -shared -o $@ $^ ${SHARED_LIBRARIES} ${PYLIBS} ${FORTLIBS} - -wrapper: $(WRAPPER) -$(WRAPPER): swig/boxlib.i - swig -DDIM$(DIM) -python -c++ -Iswig -Icsrc $(includes) -o $@ -outdir boxlib $< - -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules diff --git a/Src/Python/GPackage.mak b/Src/Python/GPackage.mak deleted file mode 100644 index 51538b979..000000000 --- a/Src/Python/GPackage.mak +++ /dev/null @@ -1,11 +0,0 @@ -PYBOXLIB ?= $(BOXLIB_HOME)/Src/Python - -PYFBOXLIB = libpyfboxlib.so -PYCBOXLIB = libpycboxlib.so -PYBOXLIBS = $(PYFBOXLIB) $(PYCBOXLIB) - -f90sources += blobjects.f90 -f90sources += fboxlib.f90 -f90sources += boxlib_numpy_f.f90 - -VPATH_LOCATIONS += $(PYBOXLIB)/src diff --git a/Src/Python/README b/Src/Python/README deleted file mode 100644 index d781abda6..000000000 --- a/Src/Python/README +++ /dev/null @@ -1,94 +0,0 @@ -PyBoxLib -======== - -PyBoxLib is a Python wrapper of the C++ version of `BoxLib`_. - -An alternative version that wraps the Fortran version of `BoxLib`_ is -available in the 'F90' directory. - - -.. _`BoxLib`: https://ccse.lbl.gov/BoxLib/index.html - - -Install -======= - -$ python setup.py build -$ python setup.py install - -Compiling options ------------------ - -To compile PyBoxLib without MPI support, build using: - -$ python setup.py build --disable-mpi - -If you are building with MPI support, the MPI compilers wrapper -'mpicc' and 'mpic++' should be in your PATH. If not, you can set the -MPIHOME environment variable: - -$ env MPIHOME=$HOME/opt python setup.py build - - -Basic usage -=========== - -import boxlib -import sys - -ndim = 3 -size = 128 - -bx = boxlib.Box(lo=[1]*ndim, hi=[size]*ndim) -ba = boxlib.BoxArray(boxes=[bx]) -ba.maxSize(32) - -mf = boxlib.MultiFab(ba, ncomp=1, nghost=2) - -a = mf[0].get_array() -a[10,10,10,0] = 22.0 - -print a.shape - -mf.FillBoundary(0, mf1.nComp()) - - - -Technical overview -================== - -The Python wrappers to BoxLib are created using SWIG. There a few -convenience functions defined in the "boxlib" module that make -creating Boxes, BoxArrays, and MultiFabs a bit more Pythonic. - -Note that the dimension of all BoxLib objects is set at compile time. -As such, PyBoxLib compiles three versions of BoxLib (for 1, 2, and 3 -dimensions). The first time you call one of the convenience routines -(Box, BoxArray etc), PyBoxLib loads the appropriate shared library. - -To access the raw SWIG generate shared library, simply access the "bl" -object in boxlib, and index it with the dimensionality that you need. -For example, to call the XXX routine of the 1 dimensional BoxLib SWIG -wrapper, do the following: - ->>> import boxlib ->>> boxlib.bl[1].XXX - -All arrays are stored in Fortran order. PyBoxLib exposes the raw -arrays to Python through NumPy, and the ordering is set to Fortran -order. - - -Known issues -============ - -#. Once you create a BoxLib object (Box/MultiFab etc) of a given - dimension, all subsequent BoxLib objects must be of the same - dimension. In other words, once PyBoxLib loads one of the shared - libraries for a specific dimension, it can't load another. - - In particular, the length of the IntVects becomes corrupted. I'm - sure there is a way around this... - -#. The C++ version stores components in a non-interleaved format. - That is, in Fortran the indexing is a(i,j,k,c). diff --git a/Src/Python/boxlib/__init__.py b/Src/Python/boxlib/__init__.py deleted file mode 100644 index 34d035c53..000000000 --- a/Src/Python/boxlib/__init__.py +++ /dev/null @@ -1,66 +0,0 @@ -"""PyBoxLib. - -Please see the README file in BoxLib/Src/Python for a technical -overview. -""" - -import numpy as np - -class BOXLIB(object): - """Dimensionally aware BoxLib import wrapper.""" - def __init__(self): - self.mod = None - def __getitem__(self, dim): - if self.mod is None: - self.dim = dim - self.mod = __import__('bl%d' % dim, globals(), locals(), [], -1) - self.mod.StartParallel() - else: - if dim > 0: - assert(dim == self.dim) - return self.mod - -bl = BOXLIB() - -def rank(): - return bl[0].rank() - -def size(): - return bl[0].size() - -def Box(lo=[], hi=[]): - """Dimensionally aware Box wrapper.""" - dim = len(lo) - lo = bl[dim].IntVect(*lo) - hi = bl[dim].IntVect(*hi) - bx = bl[dim].Box(lo, hi) - return bx - -def RealBox(lo=[], hi=[]): - """Dimensionally aware Box wrapper.""" - dim = len(lo) - bx = bl[dim].RealBox(np.asarray(lo), np.asarray(hi)) - return bx - -def lo(bx): - lo = bx.smallEnd() - return [ lo[x] for x in range(len(lo)) ] - -def hi(bx): - hi = bx.bigEnd() - return [ hi[x] for x in range(len(hi)) ] - -def BoxArray(boxes): - """Dimensionally aware BoxArray wrapper.""" - dim = len(boxes[0].size()) - ba = bl[dim].BoxArray() - ba.resize(len(boxes)) - for i, bx in enumerate(boxes): - ba.set(i, bx) - return ba - -def MultiFab(ba, ncomp=1, nghost=0): - """Dimensionally aware MultiFab wrapper.""" - dim = len(ba.get(0).size()) - return bl[dim].MultiFab(ba, ncomp, nghost) - diff --git a/Src/Python/boxlib/bl1.py b/Src/Python/boxlib/bl1.py deleted file mode 100644 index 94a0a928f..000000000 --- a/Src/Python/boxlib/bl1.py +++ /dev/null @@ -1,366 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 2.0.11 -# -# Do not make changes to this file unless you know what you are doing--modify -# the SWIG interface file instead. - - - - - -from sys import version_info -if version_info >= (2,6,0): - def swig_import_helper(): - from os.path import dirname - import imp - fp = None - try: - fp, pathname, description = imp.find_module('_bl1', [dirname(__file__)]) - except ImportError: - import _bl1 - return _bl1 - if fp is not None: - try: - _mod = imp.load_module('_bl1', fp, pathname, description) - finally: - fp.close() - return _mod - _bl1 = swig_import_helper() - del swig_import_helper -else: - import _bl1 -del version_info -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1): - if (name == "thisown"): return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'SwigPyObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name,None) - if method: return method(self,value) - if (not static): - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - -def _swig_setattr(self,class_type,name,value): - return _swig_setattr_nondynamic(self,class_type,name,value,0) - -def _swig_getattr(self,class_type,name): - if (name == "thisown"): return self.this.own() - method = class_type.__swig_getmethods__.get(name,None) - if method: return method(self) - raise AttributeError(name) - -def _swig_repr(self): - try: strthis = "proxy of " + self.this.__repr__() - except: strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - -try: - _object = object - _newclass = 1 -except AttributeError: - class _object : pass - _newclass = 0 - - -BL_DIM = _bl1.BL_DIM - -def StartParallel(): - return _bl1.StartParallel() -StartParallel = _bl1.StartParallel - -def rank(): - return _bl1.rank() -rank = _bl1.rank - -def size(): - return _bl1.size() -size = _bl1.size - -def ReduceRealMax(*args): - return _bl1.ReduceRealMax(*args) -ReduceRealMax = _bl1.ReduceRealMax - -def open_ifstream(*args): - return _bl1.open_ifstream(*args) -open_ifstream = _bl1.open_ifstream - -def open_ofstream(*args): - return _bl1.open_ofstream(*args) -open_ofstream = _bl1.open_ofstream - -def close_ofstream(*args): - return _bl1.close_ofstream(*args) -close_ofstream = _bl1.close_ofstream - -def close_ifstream(*args): - return _bl1.close_ifstream(*args) -close_ifstream = _bl1.close_ifstream -class IntVect(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, IntVect, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, IntVect, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl1.new_IntVect(*args) - try: self.this.append(this) - except: self.this = this - def shift(self, *args): return _bl1.IntVect_shift(self, *args) - def writeOn(self, *args): return _bl1.IntVect_writeOn(self, *args) - def read(self, *args): return _bl1.IntVect_read(self, *args) - def __getitem__(self, *args): return _bl1.IntVect___getitem__(self, *args) - def __len__(self): return _bl1.IntVect___len__(self) - def __setitem__(self, *args): return _bl1.IntVect___setitem__(self, *args) - def __cmp__(self, *args): return _bl1.IntVect___cmp__(self, *args) - def __str__(self): return _bl1.IntVect___str__(self) - __swig_getmethods__["TheZeroVector"] = lambda x: _bl1.IntVect_TheZeroVector - if _newclass:TheZeroVector = staticmethod(_bl1.IntVect_TheZeroVector) - __swig_getmethods__["TheUnitVector"] = lambda x: _bl1.IntVect_TheUnitVector - if _newclass:TheUnitVector = staticmethod(_bl1.IntVect_TheUnitVector) - __swig_getmethods__["TheNodeVector"] = lambda x: _bl1.IntVect_TheNodeVector - if _newclass:TheNodeVector = staticmethod(_bl1.IntVect_TheNodeVector) - __swig_getmethods__["TheCellVector"] = lambda x: _bl1.IntVect_TheCellVector - if _newclass:TheCellVector = staticmethod(_bl1.IntVect_TheCellVector) - __swig_destroy__ = _bl1.delete_IntVect - __del__ = lambda self : None; -IntVect_swigregister = _bl1.IntVect_swigregister -IntVect_swigregister(IntVect) - -def IntVect_TheZeroVector(): - return _bl1.IntVect_TheZeroVector() -IntVect_TheZeroVector = _bl1.IntVect_TheZeroVector - -def IntVect_TheUnitVector(): - return _bl1.IntVect_TheUnitVector() -IntVect_TheUnitVector = _bl1.IntVect_TheUnitVector - -def IntVect_TheNodeVector(): - return _bl1.IntVect_TheNodeVector() -IntVect_TheNodeVector = _bl1.IntVect_TheNodeVector - -def IntVect_TheCellVector(): - return _bl1.IntVect_TheCellVector() -IntVect_TheCellVector = _bl1.IntVect_TheCellVector - -class Box(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Box, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Box, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl1.new_Box(*args) - try: self.this.append(this) - except: self.this = this - def smallEnd(self): return _bl1.Box_smallEnd(self) - def bigEnd(self): return _bl1.Box_bigEnd(self) - def type(self): return _bl1.Box_type(self) - def size(self): return _bl1.Box_size(self) - def ok(self): return _bl1.Box_ok(self) - def contains(self, *args): return _bl1.Box_contains(self, *args) - def intersects(self, *args): return _bl1.Box_intersects(self, *args) - def sameSize(self, *args): return _bl1.Box_sameSize(self, *args) - def sameType(self, *args): return _bl1.Box_sameType(self, *args) - def cellCentered(self): return _bl1.Box_cellCentered(self) - def numPts(self): return _bl1.Box_numPts(self) - def volume(self): return _bl1.Box_volume(self) - def index(self, *args): return _bl1.Box_index(self, *args) - def setSmall(self, *args): return _bl1.Box_setSmall(self, *args) - def setBig(self, *args): return _bl1.Box_setBig(self, *args) - def shift(self, *args): return _bl1.Box_shift(self, *args) - def shiftHalf(self, *args): return _bl1.Box_shiftHalf(self, *args) - def convert(self, *args): return _bl1.Box_convert(self, *args) - def surroundingNodes(self, *args): return _bl1.Box_surroundingNodes(self, *args) - def enclosedCells(self, *args): return _bl1.Box_enclosedCells(self, *args) - def minBox(self, *args): return _bl1.Box_minBox(self, *args) - def chop(self, *args): return _bl1.Box_chop(self, *args) - def grow(self, *args): return _bl1.Box_grow(self, *args) - def growLo(self, *args): return _bl1.Box_growLo(self, *args) - def growHi(self, *args): return _bl1.Box_growHi(self, *args) - def refine(self, *args): return _bl1.Box_refine(self, *args) - def coarsen(self, *args): return _bl1.Box_coarsen(self, *args) - def next(self, *args): return _bl1.Box_next(self, *args) - def read(self, *args): return _bl1.Box_read(self, *args) - def write(self, *args): return _bl1.Box_write(self, *args) - def __and__(self, *args): return _bl1.Box___and__(self, *args) - def writeOn(self, *args): return _bl1.Box_writeOn(self, *args) - def __str__(self): return _bl1.Box___str__(self) - def __cmp__(self, *args): return _bl1.Box___cmp__(self, *args) - __swig_destroy__ = _bl1.delete_Box - __del__ = lambda self : None; -Box_swigregister = _bl1.Box_swigregister -Box_swigregister(Box) - -class FArrayBox(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, FArrayBox, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, FArrayBox, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl1.new_FArrayBox(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl1.delete_FArrayBox - __del__ = lambda self : None; - def box(self): return _bl1.FArrayBox_box(self) - def nComp(self): return _bl1.FArrayBox_nComp(self) - def writeOn(self, *args): return _bl1.FArrayBox_writeOn(self, *args) - def norm(self, *args): return _bl1.FArrayBox_norm(self, *args) - def copy(self, *args): return _bl1.FArrayBox_copy(self, *args) - def readFrom(self, *args): return _bl1.FArrayBox_readFrom(self, *args) - def __str__(self): return _bl1.FArrayBox___str__(self) - def setVal(self, *args): return _bl1.FArrayBox_setVal(self, *args) - def min(self, *args): return _bl1.FArrayBox_min(self, *args) - def max(self, *args): return _bl1.FArrayBox_max(self, *args) - def minIndex(self, *args): return _bl1.FArrayBox_minIndex(self, *args) - def maxIndex(self, *args): return _bl1.FArrayBox_maxIndex(self, *args) - def sum(self, *args): return _bl1.FArrayBox_sum(self, *args) - def get_array(self): return _bl1.FArrayBox_get_array(self) - def valIV(self, *args): return _bl1.FArrayBox_valIV(self, *args) - def setValIV(self, *args): return _bl1.FArrayBox_setValIV(self, *args) - def floor(self, *args): return _bl1.FArrayBox_floor(self, *args) - def __add__(self, *args): return _bl1.FArrayBox___add__(self, *args) - def __sub__(self, *args): return _bl1.FArrayBox___sub__(self, *args) - def __mul__(self, *args): return _bl1.FArrayBox___mul__(self, *args) - def __div__(self, *args): return _bl1.FArrayBox___div__(self, *args) -FArrayBox_swigregister = _bl1.FArrayBox_swigregister -FArrayBox_swigregister(FArrayBox) - -class BoxArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, BoxArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, BoxArray, name) - __repr__ = _swig_repr - __swig_destroy__ = _bl1.delete_BoxArray - __del__ = lambda self : None; - def __init__(self, *args): - this = _bl1.new_BoxArray(*args) - try: self.this.append(this) - except: self.this = this - def resize(self, *args): return _bl1.BoxArray_resize(self, *args) - def define(self, *args): return _bl1.BoxArray_define(self, *args) - def writeOn(self, *args): return _bl1.BoxArray_writeOn(self, *args) - def readFrom(self, *args): return _bl1.BoxArray_readFrom(self, *args) - def size(self): return _bl1.BoxArray_size(self) - def get(self, *args): return _bl1.BoxArray_get(self, *args) - def set(self, *args): return _bl1.BoxArray_set(self, *args) - def maxSize(self, *args): return _bl1.BoxArray_maxSize(self, *args) - def ok(self): return _bl1.BoxArray_ok(self) - def isDisjoint(self): return _bl1.BoxArray_isDisjoint(self) - def contains(self, *args): return _bl1.BoxArray_contains(self, *args) - def minimalBox(self): return _bl1.BoxArray_minimalBox(self) - def refine(self, *args): return _bl1.BoxArray_refine(self, *args) - def coarsen(self, *args): return _bl1.BoxArray_coarsen(self, *args) - def __getitem__(self, *args): return _bl1.BoxArray___getitem__(self, *args) - def complementIn(self, *args): return _bl1.BoxArray_complementIn(self, *args) - def __and__(self, *args): return _bl1.BoxArray___and__(self, *args) - def __or__(self, *args): return _bl1.BoxArray___or__(self, *args) - def __len__(self): return _bl1.BoxArray___len__(self) - def __str__(self): return _bl1.BoxArray___str__(self) - def __cmp__(self, *args): return _bl1.BoxArray___cmp__(self, *args) -BoxArray_swigregister = _bl1.BoxArray_swigregister -BoxArray_swigregister(BoxArray) - -class SwigPyIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name) - def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - __swig_destroy__ = _bl1.delete_SwigPyIterator - __del__ = lambda self : None; - def value(self): return _bl1.SwigPyIterator_value(self) - def incr(self, n=1): return _bl1.SwigPyIterator_incr(self, n) - def decr(self, n=1): return _bl1.SwigPyIterator_decr(self, n) - def distance(self, *args): return _bl1.SwigPyIterator_distance(self, *args) - def equal(self, *args): return _bl1.SwigPyIterator_equal(self, *args) - def copy(self): return _bl1.SwigPyIterator_copy(self) - def next(self): return _bl1.SwigPyIterator_next(self) - def __next__(self): return _bl1.SwigPyIterator___next__(self) - def previous(self): return _bl1.SwigPyIterator_previous(self) - def advance(self, *args): return _bl1.SwigPyIterator_advance(self, *args) - def __eq__(self, *args): return _bl1.SwigPyIterator___eq__(self, *args) - def __ne__(self, *args): return _bl1.SwigPyIterator___ne__(self, *args) - def __iadd__(self, *args): return _bl1.SwigPyIterator___iadd__(self, *args) - def __isub__(self, *args): return _bl1.SwigPyIterator___isub__(self, *args) - def __add__(self, *args): return _bl1.SwigPyIterator___add__(self, *args) - def __sub__(self, *args): return _bl1.SwigPyIterator___sub__(self, *args) - def __iter__(self): return self -SwigPyIterator_swigregister = _bl1.SwigPyIterator_swigregister -SwigPyIterator_swigregister(SwigPyIterator) - -class MultiFab(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, MultiFab, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, MultiFab, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl1.new_MultiFab(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl1.delete_MultiFab - __del__ = lambda self : None; - def define(self, *args): return _bl1.MultiFab_define(self, *args) - def ok(self): return _bl1.MultiFab_ok(self) - def nGrow(self): return _bl1.MultiFab_nGrow(self) - def boxArray(self): return _bl1.MultiFab_boxArray(self) - def size(self): return _bl1.MultiFab_size(self) - def nComp(self): return _bl1.MultiFab_nComp(self) - def min(self, *args): return _bl1.MultiFab_min(self, *args) - def max(self, *args): return _bl1.MultiFab_max(self, *args) - def copy(self, *args): return _bl1.MultiFab_copy(self, *args) - def setVal(self, *args): return _bl1.MultiFab_setVal(self, *args) - def setBndry(self, *args): return _bl1.MultiFab_setBndry(self, *args) - def FillBoundary(self, *args): return _bl1.MultiFab_FillBoundary(self, *args) - def sum(self, comp=0): return _bl1.MultiFab_sum(self, comp) - def writeOut(self, *args): return _bl1.MultiFab_writeOut(self, *args) - def copyComp(self, *args): return _bl1.MultiFab_copyComp(self, *args) - def __getitem__(self, *args): return _bl1.MultiFab___getitem__(self, *args) -MultiFab_swigregister = _bl1.MultiFab_swigregister -MultiFab_swigregister(MultiFab) - -class RealBox(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, RealBox, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, RealBox, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl1.new_RealBox(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl1.delete_RealBox - __del__ = lambda self : None; -RealBox_swigregister = _bl1.RealBox_swigregister -RealBox_swigregister(RealBox) - -class Geometry(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Geometry, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Geometry, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl1.new_Geometry(*args) - try: self.this.append(this) - except: self.this = this - def FillPeriodicBoundary(self, *args): return _bl1.Geometry_FillPeriodicBoundary(self, *args) - __swig_destroy__ = _bl1.delete_Geometry - __del__ = lambda self : None; -Geometry_swigregister = _bl1.Geometry_swigregister -Geometry_swigregister(Geometry) - -# This file is compatible with both classic and new-style classes. - - diff --git a/Src/Python/boxlib/bl2.py b/Src/Python/boxlib/bl2.py deleted file mode 100644 index 264d56aa8..000000000 --- a/Src/Python/boxlib/bl2.py +++ /dev/null @@ -1,366 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 2.0.11 -# -# Do not make changes to this file unless you know what you are doing--modify -# the SWIG interface file instead. - - - - - -from sys import version_info -if version_info >= (2,6,0): - def swig_import_helper(): - from os.path import dirname - import imp - fp = None - try: - fp, pathname, description = imp.find_module('_bl2', [dirname(__file__)]) - except ImportError: - import _bl2 - return _bl2 - if fp is not None: - try: - _mod = imp.load_module('_bl2', fp, pathname, description) - finally: - fp.close() - return _mod - _bl2 = swig_import_helper() - del swig_import_helper -else: - import _bl2 -del version_info -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1): - if (name == "thisown"): return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'SwigPyObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name,None) - if method: return method(self,value) - if (not static): - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - -def _swig_setattr(self,class_type,name,value): - return _swig_setattr_nondynamic(self,class_type,name,value,0) - -def _swig_getattr(self,class_type,name): - if (name == "thisown"): return self.this.own() - method = class_type.__swig_getmethods__.get(name,None) - if method: return method(self) - raise AttributeError(name) - -def _swig_repr(self): - try: strthis = "proxy of " + self.this.__repr__() - except: strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - -try: - _object = object - _newclass = 1 -except AttributeError: - class _object : pass - _newclass = 0 - - -BL_DIM = _bl2.BL_DIM - -def StartParallel(): - return _bl2.StartParallel() -StartParallel = _bl2.StartParallel - -def rank(): - return _bl2.rank() -rank = _bl2.rank - -def size(): - return _bl2.size() -size = _bl2.size - -def ReduceRealMax(*args): - return _bl2.ReduceRealMax(*args) -ReduceRealMax = _bl2.ReduceRealMax - -def open_ifstream(*args): - return _bl2.open_ifstream(*args) -open_ifstream = _bl2.open_ifstream - -def open_ofstream(*args): - return _bl2.open_ofstream(*args) -open_ofstream = _bl2.open_ofstream - -def close_ofstream(*args): - return _bl2.close_ofstream(*args) -close_ofstream = _bl2.close_ofstream - -def close_ifstream(*args): - return _bl2.close_ifstream(*args) -close_ifstream = _bl2.close_ifstream -class IntVect(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, IntVect, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, IntVect, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl2.new_IntVect(*args) - try: self.this.append(this) - except: self.this = this - def shift(self, *args): return _bl2.IntVect_shift(self, *args) - def writeOn(self, *args): return _bl2.IntVect_writeOn(self, *args) - def read(self, *args): return _bl2.IntVect_read(self, *args) - def __getitem__(self, *args): return _bl2.IntVect___getitem__(self, *args) - def __len__(self): return _bl2.IntVect___len__(self) - def __setitem__(self, *args): return _bl2.IntVect___setitem__(self, *args) - def __cmp__(self, *args): return _bl2.IntVect___cmp__(self, *args) - def __str__(self): return _bl2.IntVect___str__(self) - __swig_getmethods__["TheZeroVector"] = lambda x: _bl2.IntVect_TheZeroVector - if _newclass:TheZeroVector = staticmethod(_bl2.IntVect_TheZeroVector) - __swig_getmethods__["TheUnitVector"] = lambda x: _bl2.IntVect_TheUnitVector - if _newclass:TheUnitVector = staticmethod(_bl2.IntVect_TheUnitVector) - __swig_getmethods__["TheNodeVector"] = lambda x: _bl2.IntVect_TheNodeVector - if _newclass:TheNodeVector = staticmethod(_bl2.IntVect_TheNodeVector) - __swig_getmethods__["TheCellVector"] = lambda x: _bl2.IntVect_TheCellVector - if _newclass:TheCellVector = staticmethod(_bl2.IntVect_TheCellVector) - __swig_destroy__ = _bl2.delete_IntVect - __del__ = lambda self : None; -IntVect_swigregister = _bl2.IntVect_swigregister -IntVect_swigregister(IntVect) - -def IntVect_TheZeroVector(): - return _bl2.IntVect_TheZeroVector() -IntVect_TheZeroVector = _bl2.IntVect_TheZeroVector - -def IntVect_TheUnitVector(): - return _bl2.IntVect_TheUnitVector() -IntVect_TheUnitVector = _bl2.IntVect_TheUnitVector - -def IntVect_TheNodeVector(): - return _bl2.IntVect_TheNodeVector() -IntVect_TheNodeVector = _bl2.IntVect_TheNodeVector - -def IntVect_TheCellVector(): - return _bl2.IntVect_TheCellVector() -IntVect_TheCellVector = _bl2.IntVect_TheCellVector - -class Box(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Box, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Box, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl2.new_Box(*args) - try: self.this.append(this) - except: self.this = this - def smallEnd(self): return _bl2.Box_smallEnd(self) - def bigEnd(self): return _bl2.Box_bigEnd(self) - def type(self): return _bl2.Box_type(self) - def size(self): return _bl2.Box_size(self) - def ok(self): return _bl2.Box_ok(self) - def contains(self, *args): return _bl2.Box_contains(self, *args) - def intersects(self, *args): return _bl2.Box_intersects(self, *args) - def sameSize(self, *args): return _bl2.Box_sameSize(self, *args) - def sameType(self, *args): return _bl2.Box_sameType(self, *args) - def cellCentered(self): return _bl2.Box_cellCentered(self) - def numPts(self): return _bl2.Box_numPts(self) - def volume(self): return _bl2.Box_volume(self) - def index(self, *args): return _bl2.Box_index(self, *args) - def setSmall(self, *args): return _bl2.Box_setSmall(self, *args) - def setBig(self, *args): return _bl2.Box_setBig(self, *args) - def shift(self, *args): return _bl2.Box_shift(self, *args) - def shiftHalf(self, *args): return _bl2.Box_shiftHalf(self, *args) - def convert(self, *args): return _bl2.Box_convert(self, *args) - def surroundingNodes(self, *args): return _bl2.Box_surroundingNodes(self, *args) - def enclosedCells(self, *args): return _bl2.Box_enclosedCells(self, *args) - def minBox(self, *args): return _bl2.Box_minBox(self, *args) - def chop(self, *args): return _bl2.Box_chop(self, *args) - def grow(self, *args): return _bl2.Box_grow(self, *args) - def growLo(self, *args): return _bl2.Box_growLo(self, *args) - def growHi(self, *args): return _bl2.Box_growHi(self, *args) - def refine(self, *args): return _bl2.Box_refine(self, *args) - def coarsen(self, *args): return _bl2.Box_coarsen(self, *args) - def next(self, *args): return _bl2.Box_next(self, *args) - def read(self, *args): return _bl2.Box_read(self, *args) - def write(self, *args): return _bl2.Box_write(self, *args) - def __and__(self, *args): return _bl2.Box___and__(self, *args) - def writeOn(self, *args): return _bl2.Box_writeOn(self, *args) - def __str__(self): return _bl2.Box___str__(self) - def __cmp__(self, *args): return _bl2.Box___cmp__(self, *args) - __swig_destroy__ = _bl2.delete_Box - __del__ = lambda self : None; -Box_swigregister = _bl2.Box_swigregister -Box_swigregister(Box) - -class FArrayBox(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, FArrayBox, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, FArrayBox, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl2.new_FArrayBox(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl2.delete_FArrayBox - __del__ = lambda self : None; - def box(self): return _bl2.FArrayBox_box(self) - def nComp(self): return _bl2.FArrayBox_nComp(self) - def writeOn(self, *args): return _bl2.FArrayBox_writeOn(self, *args) - def norm(self, *args): return _bl2.FArrayBox_norm(self, *args) - def copy(self, *args): return _bl2.FArrayBox_copy(self, *args) - def readFrom(self, *args): return _bl2.FArrayBox_readFrom(self, *args) - def __str__(self): return _bl2.FArrayBox___str__(self) - def setVal(self, *args): return _bl2.FArrayBox_setVal(self, *args) - def min(self, *args): return _bl2.FArrayBox_min(self, *args) - def max(self, *args): return _bl2.FArrayBox_max(self, *args) - def minIndex(self, *args): return _bl2.FArrayBox_minIndex(self, *args) - def maxIndex(self, *args): return _bl2.FArrayBox_maxIndex(self, *args) - def sum(self, *args): return _bl2.FArrayBox_sum(self, *args) - def get_array(self): return _bl2.FArrayBox_get_array(self) - def valIV(self, *args): return _bl2.FArrayBox_valIV(self, *args) - def setValIV(self, *args): return _bl2.FArrayBox_setValIV(self, *args) - def floor(self, *args): return _bl2.FArrayBox_floor(self, *args) - def __add__(self, *args): return _bl2.FArrayBox___add__(self, *args) - def __sub__(self, *args): return _bl2.FArrayBox___sub__(self, *args) - def __mul__(self, *args): return _bl2.FArrayBox___mul__(self, *args) - def __div__(self, *args): return _bl2.FArrayBox___div__(self, *args) -FArrayBox_swigregister = _bl2.FArrayBox_swigregister -FArrayBox_swigregister(FArrayBox) - -class BoxArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, BoxArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, BoxArray, name) - __repr__ = _swig_repr - __swig_destroy__ = _bl2.delete_BoxArray - __del__ = lambda self : None; - def __init__(self, *args): - this = _bl2.new_BoxArray(*args) - try: self.this.append(this) - except: self.this = this - def resize(self, *args): return _bl2.BoxArray_resize(self, *args) - def define(self, *args): return _bl2.BoxArray_define(self, *args) - def writeOn(self, *args): return _bl2.BoxArray_writeOn(self, *args) - def readFrom(self, *args): return _bl2.BoxArray_readFrom(self, *args) - def size(self): return _bl2.BoxArray_size(self) - def get(self, *args): return _bl2.BoxArray_get(self, *args) - def set(self, *args): return _bl2.BoxArray_set(self, *args) - def maxSize(self, *args): return _bl2.BoxArray_maxSize(self, *args) - def ok(self): return _bl2.BoxArray_ok(self) - def isDisjoint(self): return _bl2.BoxArray_isDisjoint(self) - def contains(self, *args): return _bl2.BoxArray_contains(self, *args) - def minimalBox(self): return _bl2.BoxArray_minimalBox(self) - def refine(self, *args): return _bl2.BoxArray_refine(self, *args) - def coarsen(self, *args): return _bl2.BoxArray_coarsen(self, *args) - def __getitem__(self, *args): return _bl2.BoxArray___getitem__(self, *args) - def complementIn(self, *args): return _bl2.BoxArray_complementIn(self, *args) - def __and__(self, *args): return _bl2.BoxArray___and__(self, *args) - def __or__(self, *args): return _bl2.BoxArray___or__(self, *args) - def __len__(self): return _bl2.BoxArray___len__(self) - def __str__(self): return _bl2.BoxArray___str__(self) - def __cmp__(self, *args): return _bl2.BoxArray___cmp__(self, *args) -BoxArray_swigregister = _bl2.BoxArray_swigregister -BoxArray_swigregister(BoxArray) - -class SwigPyIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name) - def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - __swig_destroy__ = _bl2.delete_SwigPyIterator - __del__ = lambda self : None; - def value(self): return _bl2.SwigPyIterator_value(self) - def incr(self, n=1): return _bl2.SwigPyIterator_incr(self, n) - def decr(self, n=1): return _bl2.SwigPyIterator_decr(self, n) - def distance(self, *args): return _bl2.SwigPyIterator_distance(self, *args) - def equal(self, *args): return _bl2.SwigPyIterator_equal(self, *args) - def copy(self): return _bl2.SwigPyIterator_copy(self) - def next(self): return _bl2.SwigPyIterator_next(self) - def __next__(self): return _bl2.SwigPyIterator___next__(self) - def previous(self): return _bl2.SwigPyIterator_previous(self) - def advance(self, *args): return _bl2.SwigPyIterator_advance(self, *args) - def __eq__(self, *args): return _bl2.SwigPyIterator___eq__(self, *args) - def __ne__(self, *args): return _bl2.SwigPyIterator___ne__(self, *args) - def __iadd__(self, *args): return _bl2.SwigPyIterator___iadd__(self, *args) - def __isub__(self, *args): return _bl2.SwigPyIterator___isub__(self, *args) - def __add__(self, *args): return _bl2.SwigPyIterator___add__(self, *args) - def __sub__(self, *args): return _bl2.SwigPyIterator___sub__(self, *args) - def __iter__(self): return self -SwigPyIterator_swigregister = _bl2.SwigPyIterator_swigregister -SwigPyIterator_swigregister(SwigPyIterator) - -class MultiFab(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, MultiFab, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, MultiFab, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl2.new_MultiFab(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl2.delete_MultiFab - __del__ = lambda self : None; - def define(self, *args): return _bl2.MultiFab_define(self, *args) - def ok(self): return _bl2.MultiFab_ok(self) - def nGrow(self): return _bl2.MultiFab_nGrow(self) - def boxArray(self): return _bl2.MultiFab_boxArray(self) - def size(self): return _bl2.MultiFab_size(self) - def nComp(self): return _bl2.MultiFab_nComp(self) - def min(self, *args): return _bl2.MultiFab_min(self, *args) - def max(self, *args): return _bl2.MultiFab_max(self, *args) - def copy(self, *args): return _bl2.MultiFab_copy(self, *args) - def setVal(self, *args): return _bl2.MultiFab_setVal(self, *args) - def setBndry(self, *args): return _bl2.MultiFab_setBndry(self, *args) - def FillBoundary(self, *args): return _bl2.MultiFab_FillBoundary(self, *args) - def sum(self, comp=0): return _bl2.MultiFab_sum(self, comp) - def writeOut(self, *args): return _bl2.MultiFab_writeOut(self, *args) - def copyComp(self, *args): return _bl2.MultiFab_copyComp(self, *args) - def __getitem__(self, *args): return _bl2.MultiFab___getitem__(self, *args) -MultiFab_swigregister = _bl2.MultiFab_swigregister -MultiFab_swigregister(MultiFab) - -class RealBox(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, RealBox, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, RealBox, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl2.new_RealBox(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl2.delete_RealBox - __del__ = lambda self : None; -RealBox_swigregister = _bl2.RealBox_swigregister -RealBox_swigregister(RealBox) - -class Geometry(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Geometry, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Geometry, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl2.new_Geometry(*args) - try: self.this.append(this) - except: self.this = this - def FillPeriodicBoundary(self, *args): return _bl2.Geometry_FillPeriodicBoundary(self, *args) - __swig_destroy__ = _bl2.delete_Geometry - __del__ = lambda self : None; -Geometry_swigregister = _bl2.Geometry_swigregister -Geometry_swigregister(Geometry) - -# This file is compatible with both classic and new-style classes. - - diff --git a/Src/Python/boxlib/bl3.py b/Src/Python/boxlib/bl3.py deleted file mode 100644 index 3a36e996b..000000000 --- a/Src/Python/boxlib/bl3.py +++ /dev/null @@ -1,366 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 2.0.11 -# -# Do not make changes to this file unless you know what you are doing--modify -# the SWIG interface file instead. - - - - - -from sys import version_info -if version_info >= (2,6,0): - def swig_import_helper(): - from os.path import dirname - import imp - fp = None - try: - fp, pathname, description = imp.find_module('_bl3', [dirname(__file__)]) - except ImportError: - import _bl3 - return _bl3 - if fp is not None: - try: - _mod = imp.load_module('_bl3', fp, pathname, description) - finally: - fp.close() - return _mod - _bl3 = swig_import_helper() - del swig_import_helper -else: - import _bl3 -del version_info -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1): - if (name == "thisown"): return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'SwigPyObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name,None) - if method: return method(self,value) - if (not static): - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - -def _swig_setattr(self,class_type,name,value): - return _swig_setattr_nondynamic(self,class_type,name,value,0) - -def _swig_getattr(self,class_type,name): - if (name == "thisown"): return self.this.own() - method = class_type.__swig_getmethods__.get(name,None) - if method: return method(self) - raise AttributeError(name) - -def _swig_repr(self): - try: strthis = "proxy of " + self.this.__repr__() - except: strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - -try: - _object = object - _newclass = 1 -except AttributeError: - class _object : pass - _newclass = 0 - - -BL_DIM = _bl3.BL_DIM - -def StartParallel(): - return _bl3.StartParallel() -StartParallel = _bl3.StartParallel - -def rank(): - return _bl3.rank() -rank = _bl3.rank - -def size(): - return _bl3.size() -size = _bl3.size - -def ReduceRealMax(*args): - return _bl3.ReduceRealMax(*args) -ReduceRealMax = _bl3.ReduceRealMax - -def open_ifstream(*args): - return _bl3.open_ifstream(*args) -open_ifstream = _bl3.open_ifstream - -def open_ofstream(*args): - return _bl3.open_ofstream(*args) -open_ofstream = _bl3.open_ofstream - -def close_ofstream(*args): - return _bl3.close_ofstream(*args) -close_ofstream = _bl3.close_ofstream - -def close_ifstream(*args): - return _bl3.close_ifstream(*args) -close_ifstream = _bl3.close_ifstream -class IntVect(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, IntVect, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, IntVect, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl3.new_IntVect(*args) - try: self.this.append(this) - except: self.this = this - def shift(self, *args): return _bl3.IntVect_shift(self, *args) - def writeOn(self, *args): return _bl3.IntVect_writeOn(self, *args) - def read(self, *args): return _bl3.IntVect_read(self, *args) - def __getitem__(self, *args): return _bl3.IntVect___getitem__(self, *args) - def __len__(self): return _bl3.IntVect___len__(self) - def __setitem__(self, *args): return _bl3.IntVect___setitem__(self, *args) - def __cmp__(self, *args): return _bl3.IntVect___cmp__(self, *args) - def __str__(self): return _bl3.IntVect___str__(self) - __swig_getmethods__["TheZeroVector"] = lambda x: _bl3.IntVect_TheZeroVector - if _newclass:TheZeroVector = staticmethod(_bl3.IntVect_TheZeroVector) - __swig_getmethods__["TheUnitVector"] = lambda x: _bl3.IntVect_TheUnitVector - if _newclass:TheUnitVector = staticmethod(_bl3.IntVect_TheUnitVector) - __swig_getmethods__["TheNodeVector"] = lambda x: _bl3.IntVect_TheNodeVector - if _newclass:TheNodeVector = staticmethod(_bl3.IntVect_TheNodeVector) - __swig_getmethods__["TheCellVector"] = lambda x: _bl3.IntVect_TheCellVector - if _newclass:TheCellVector = staticmethod(_bl3.IntVect_TheCellVector) - __swig_destroy__ = _bl3.delete_IntVect - __del__ = lambda self : None; -IntVect_swigregister = _bl3.IntVect_swigregister -IntVect_swigregister(IntVect) - -def IntVect_TheZeroVector(): - return _bl3.IntVect_TheZeroVector() -IntVect_TheZeroVector = _bl3.IntVect_TheZeroVector - -def IntVect_TheUnitVector(): - return _bl3.IntVect_TheUnitVector() -IntVect_TheUnitVector = _bl3.IntVect_TheUnitVector - -def IntVect_TheNodeVector(): - return _bl3.IntVect_TheNodeVector() -IntVect_TheNodeVector = _bl3.IntVect_TheNodeVector - -def IntVect_TheCellVector(): - return _bl3.IntVect_TheCellVector() -IntVect_TheCellVector = _bl3.IntVect_TheCellVector - -class Box(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Box, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Box, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl3.new_Box(*args) - try: self.this.append(this) - except: self.this = this - def smallEnd(self): return _bl3.Box_smallEnd(self) - def bigEnd(self): return _bl3.Box_bigEnd(self) - def type(self): return _bl3.Box_type(self) - def size(self): return _bl3.Box_size(self) - def ok(self): return _bl3.Box_ok(self) - def contains(self, *args): return _bl3.Box_contains(self, *args) - def intersects(self, *args): return _bl3.Box_intersects(self, *args) - def sameSize(self, *args): return _bl3.Box_sameSize(self, *args) - def sameType(self, *args): return _bl3.Box_sameType(self, *args) - def cellCentered(self): return _bl3.Box_cellCentered(self) - def numPts(self): return _bl3.Box_numPts(self) - def volume(self): return _bl3.Box_volume(self) - def index(self, *args): return _bl3.Box_index(self, *args) - def setSmall(self, *args): return _bl3.Box_setSmall(self, *args) - def setBig(self, *args): return _bl3.Box_setBig(self, *args) - def shift(self, *args): return _bl3.Box_shift(self, *args) - def shiftHalf(self, *args): return _bl3.Box_shiftHalf(self, *args) - def convert(self, *args): return _bl3.Box_convert(self, *args) - def surroundingNodes(self, *args): return _bl3.Box_surroundingNodes(self, *args) - def enclosedCells(self, *args): return _bl3.Box_enclosedCells(self, *args) - def minBox(self, *args): return _bl3.Box_minBox(self, *args) - def chop(self, *args): return _bl3.Box_chop(self, *args) - def grow(self, *args): return _bl3.Box_grow(self, *args) - def growLo(self, *args): return _bl3.Box_growLo(self, *args) - def growHi(self, *args): return _bl3.Box_growHi(self, *args) - def refine(self, *args): return _bl3.Box_refine(self, *args) - def coarsen(self, *args): return _bl3.Box_coarsen(self, *args) - def next(self, *args): return _bl3.Box_next(self, *args) - def read(self, *args): return _bl3.Box_read(self, *args) - def write(self, *args): return _bl3.Box_write(self, *args) - def __and__(self, *args): return _bl3.Box___and__(self, *args) - def writeOn(self, *args): return _bl3.Box_writeOn(self, *args) - def __str__(self): return _bl3.Box___str__(self) - def __cmp__(self, *args): return _bl3.Box___cmp__(self, *args) - __swig_destroy__ = _bl3.delete_Box - __del__ = lambda self : None; -Box_swigregister = _bl3.Box_swigregister -Box_swigregister(Box) - -class FArrayBox(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, FArrayBox, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, FArrayBox, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl3.new_FArrayBox(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl3.delete_FArrayBox - __del__ = lambda self : None; - def box(self): return _bl3.FArrayBox_box(self) - def nComp(self): return _bl3.FArrayBox_nComp(self) - def writeOn(self, *args): return _bl3.FArrayBox_writeOn(self, *args) - def norm(self, *args): return _bl3.FArrayBox_norm(self, *args) - def copy(self, *args): return _bl3.FArrayBox_copy(self, *args) - def readFrom(self, *args): return _bl3.FArrayBox_readFrom(self, *args) - def __str__(self): return _bl3.FArrayBox___str__(self) - def setVal(self, *args): return _bl3.FArrayBox_setVal(self, *args) - def min(self, *args): return _bl3.FArrayBox_min(self, *args) - def max(self, *args): return _bl3.FArrayBox_max(self, *args) - def minIndex(self, *args): return _bl3.FArrayBox_minIndex(self, *args) - def maxIndex(self, *args): return _bl3.FArrayBox_maxIndex(self, *args) - def sum(self, *args): return _bl3.FArrayBox_sum(self, *args) - def get_array(self): return _bl3.FArrayBox_get_array(self) - def valIV(self, *args): return _bl3.FArrayBox_valIV(self, *args) - def setValIV(self, *args): return _bl3.FArrayBox_setValIV(self, *args) - def floor(self, *args): return _bl3.FArrayBox_floor(self, *args) - def __add__(self, *args): return _bl3.FArrayBox___add__(self, *args) - def __sub__(self, *args): return _bl3.FArrayBox___sub__(self, *args) - def __mul__(self, *args): return _bl3.FArrayBox___mul__(self, *args) - def __div__(self, *args): return _bl3.FArrayBox___div__(self, *args) -FArrayBox_swigregister = _bl3.FArrayBox_swigregister -FArrayBox_swigregister(FArrayBox) - -class BoxArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, BoxArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, BoxArray, name) - __repr__ = _swig_repr - __swig_destroy__ = _bl3.delete_BoxArray - __del__ = lambda self : None; - def __init__(self, *args): - this = _bl3.new_BoxArray(*args) - try: self.this.append(this) - except: self.this = this - def resize(self, *args): return _bl3.BoxArray_resize(self, *args) - def define(self, *args): return _bl3.BoxArray_define(self, *args) - def writeOn(self, *args): return _bl3.BoxArray_writeOn(self, *args) - def readFrom(self, *args): return _bl3.BoxArray_readFrom(self, *args) - def size(self): return _bl3.BoxArray_size(self) - def get(self, *args): return _bl3.BoxArray_get(self, *args) - def set(self, *args): return _bl3.BoxArray_set(self, *args) - def maxSize(self, *args): return _bl3.BoxArray_maxSize(self, *args) - def ok(self): return _bl3.BoxArray_ok(self) - def isDisjoint(self): return _bl3.BoxArray_isDisjoint(self) - def contains(self, *args): return _bl3.BoxArray_contains(self, *args) - def minimalBox(self): return _bl3.BoxArray_minimalBox(self) - def refine(self, *args): return _bl3.BoxArray_refine(self, *args) - def coarsen(self, *args): return _bl3.BoxArray_coarsen(self, *args) - def __getitem__(self, *args): return _bl3.BoxArray___getitem__(self, *args) - def complementIn(self, *args): return _bl3.BoxArray_complementIn(self, *args) - def __and__(self, *args): return _bl3.BoxArray___and__(self, *args) - def __or__(self, *args): return _bl3.BoxArray___or__(self, *args) - def __len__(self): return _bl3.BoxArray___len__(self) - def __str__(self): return _bl3.BoxArray___str__(self) - def __cmp__(self, *args): return _bl3.BoxArray___cmp__(self, *args) -BoxArray_swigregister = _bl3.BoxArray_swigregister -BoxArray_swigregister(BoxArray) - -class SwigPyIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name) - def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") - __repr__ = _swig_repr - __swig_destroy__ = _bl3.delete_SwigPyIterator - __del__ = lambda self : None; - def value(self): return _bl3.SwigPyIterator_value(self) - def incr(self, n=1): return _bl3.SwigPyIterator_incr(self, n) - def decr(self, n=1): return _bl3.SwigPyIterator_decr(self, n) - def distance(self, *args): return _bl3.SwigPyIterator_distance(self, *args) - def equal(self, *args): return _bl3.SwigPyIterator_equal(self, *args) - def copy(self): return _bl3.SwigPyIterator_copy(self) - def next(self): return _bl3.SwigPyIterator_next(self) - def __next__(self): return _bl3.SwigPyIterator___next__(self) - def previous(self): return _bl3.SwigPyIterator_previous(self) - def advance(self, *args): return _bl3.SwigPyIterator_advance(self, *args) - def __eq__(self, *args): return _bl3.SwigPyIterator___eq__(self, *args) - def __ne__(self, *args): return _bl3.SwigPyIterator___ne__(self, *args) - def __iadd__(self, *args): return _bl3.SwigPyIterator___iadd__(self, *args) - def __isub__(self, *args): return _bl3.SwigPyIterator___isub__(self, *args) - def __add__(self, *args): return _bl3.SwigPyIterator___add__(self, *args) - def __sub__(self, *args): return _bl3.SwigPyIterator___sub__(self, *args) - def __iter__(self): return self -SwigPyIterator_swigregister = _bl3.SwigPyIterator_swigregister -SwigPyIterator_swigregister(SwigPyIterator) - -class MultiFab(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, MultiFab, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, MultiFab, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl3.new_MultiFab(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl3.delete_MultiFab - __del__ = lambda self : None; - def define(self, *args): return _bl3.MultiFab_define(self, *args) - def ok(self): return _bl3.MultiFab_ok(self) - def nGrow(self): return _bl3.MultiFab_nGrow(self) - def boxArray(self): return _bl3.MultiFab_boxArray(self) - def size(self): return _bl3.MultiFab_size(self) - def nComp(self): return _bl3.MultiFab_nComp(self) - def min(self, *args): return _bl3.MultiFab_min(self, *args) - def max(self, *args): return _bl3.MultiFab_max(self, *args) - def copy(self, *args): return _bl3.MultiFab_copy(self, *args) - def setVal(self, *args): return _bl3.MultiFab_setVal(self, *args) - def setBndry(self, *args): return _bl3.MultiFab_setBndry(self, *args) - def FillBoundary(self, *args): return _bl3.MultiFab_FillBoundary(self, *args) - def sum(self, comp=0): return _bl3.MultiFab_sum(self, comp) - def writeOut(self, *args): return _bl3.MultiFab_writeOut(self, *args) - def copyComp(self, *args): return _bl3.MultiFab_copyComp(self, *args) - def __getitem__(self, *args): return _bl3.MultiFab___getitem__(self, *args) -MultiFab_swigregister = _bl3.MultiFab_swigregister -MultiFab_swigregister(MultiFab) - -class RealBox(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, RealBox, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, RealBox, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl3.new_RealBox(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _bl3.delete_RealBox - __del__ = lambda self : None; -RealBox_swigregister = _bl3.RealBox_swigregister -RealBox_swigregister(RealBox) - -class Geometry(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Geometry, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Geometry, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _bl3.new_Geometry(*args) - try: self.this.append(this) - except: self.this = this - def FillPeriodicBoundary(self, *args): return _bl3.Geometry_FillPeriodicBoundary(self, *args) - __swig_destroy__ = _bl3.delete_Geometry - __del__ = lambda self : None; -Geometry_swigregister = _bl3.Geometry_swigregister -Geometry_swigregister(Geometry) - -# This file is compatible with both classic and new-style classes. - - diff --git a/Src/Python/contrib/chemSupport.H b/Src/Python/contrib/chemSupport.H deleted file mode 100644 index 3926826f2..000000000 --- a/Src/Python/contrib/chemSupport.H +++ /dev/null @@ -1,11 +0,0 @@ - -#include -#include - -std::list -GetPathDiagramEdges (const ChemDriver& cd, - const std::string& trace_element_name, - bool unmap_edge_reactions = true, - bool one_based_reaction_numbering = true, - int verbose = false, - bool hack_mech_splitting_rules = true); diff --git a/Src/Python/contrib/chemSupport.cpp b/Src/Python/contrib/chemSupport.cpp deleted file mode 100644 index 00776cc56..000000000 --- a/Src/Python/contrib/chemSupport.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include - -#include - -std::list -GetPathDiagramEdges (const ChemDriver& cd, - const std::string& trace_element_name, - bool unmap_edge_reactions, - bool one_based_reaction_numbering, - int verbose, - bool hack_mech_splitting_rules) -{ - std::list edges; - - if (verbose) { - std::cout << "Getting path diagram edges (" - << "Element: " << trace_element_name << ", " - << "Unmap edge reactions: " << unmap_edge_reactions << ", " - << "One-based reaction numbering: " << one_based_reaction_numbering << ", " - << "Verbose edge generation: " << verbose << ", " - << "Apply special reaction splitting rules: " << hack_mech_splitting_rules << ")" << std::endl; - } - - if (unmap_edge_reactions) { - - // Build inverse reaction map - // - // Given: - // map[old_number] = new_number - // - // Construct - // map[new_number] = old_number - // - const Array& reaction_map = cd.reactionMap(); - Array new_to_old(cd.numReactions()); - for (int i=0; i edges_new = cd.getEdges(trace_element_name, verbose, hack_mech_splitting_rules); - - for (std::list::const_iterator it=edges_new.begin(), End=edges_new.end(); it!=End; ++it) { - const Array >& RWL_new = it->RateWeightList(); - int nr = RWL_new.size(); - Array > RWL_old(nr); - for (int i=0; i& rw_new = RWL_new[i]; - int new_rxn_id = rw_new.first; - int old_rxn_id = new_to_old[new_rxn_id]; - if (one_based_reaction_numbering) old_rxn_id++; - int rxn_weight = rw_new.second; - RWL_old[i] = std::pair(old_rxn_id,rxn_weight); - } - edges.push_back(ChemDriver::Edge(it->left(),it->right(),RWL_old)); - } - } - else { - edges = cd.getEdges(trace_element_name, verbose, hack_mech_splitting_rules); - } - - return edges; -} diff --git a/Src/Python/contrib/support.H b/Src/Python/contrib/support.H deleted file mode 100644 index 69d8f8a2b..000000000 --- a/Src/Python/contrib/support.H +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _support_H_ -#define _support_H_ 1 - -#include -#include - -void -SAXPYjpdf(FArrayBox& dest, - Real scale, - const FArrayBox& src); - -std::vector -condMean(FArrayBox& src, - bool cdir); - -extern int _charArrayLen; - -char * -makePGM( FArrayBox* fab, int icomp, double usemin, double usemax); - -// helper functions for manipulating BoxArray's -BoxArray * -complementIn(const BoxArray& ba1, const BoxArray& ba2); -BoxArray * -join(const BoxArray &ba1, const BoxArray &ba2); -//BoxArray * -//intersect( const BoxArray &ba1, const BoxArray &ba2); - -void -dummyFunc(); - -// transfers between coarse and fine grids -void tocoarse(int ratio,FArrayBox&fine,FArrayBox&crse,IntVect&iv); -void tofine(int ratio,FArrayBox&crse,FArrayBox&fine,IntVect&iv,Real defval); -void injectCoarse(FArrayBox&fine,int ratio, const IntVect&iv, - FArrayBox&crse, const Box&tbox); -// conditional vector merges -void cvmgnfab(FArrayBox&res,FArrayBox&n,FArrayBox&p,FArrayBox&trg); -void cvmgpfab(FArrayBox&res,FArrayBox&p,FArrayBox&n,FArrayBox&trg); -// misc -void gradfillfab(FArrayBox&fab, const IntVect&iv); - -#endif diff --git a/Src/Python/contrib/support.cpp b/Src/Python/contrib/support.cpp deleted file mode 100644 index bdede7fce..000000000 --- a/Src/Python/contrib/support.cpp +++ /dev/null @@ -1,798 +0,0 @@ -#include -#include -#include -#include - -#include "support.H" - -#include -#include -#include -#include -#include - -void -SAXPYjpdf(FArrayBox& dest, - Real scale, - const FArrayBox& src) -{ - if (dest.box() != src.box() || dest.nComp() != 3 || src.nComp() != 3) { - BoxLib::Abort("Bad boxes"); - } - - const Box& box = src.box(); - if (scale < 0) { - // Must "flip" data in src fab before adding - // FIXME: We simply assume that the bins were build symmetric around zero for this - - if (box.length(1)%2 != 0) { - BoxLib::Abort("Box length in j must be even"); - } - int jm = (box.smallEnd()[1] + box.bigEnd()[1] + 1)/2; - Box sbox(box); sbox.setSmall(1,jm); - for (IntVect iv=sbox.smallEnd(), End=sbox.bigEnd(); iv<=End; sbox.next(iv)) { - IntVect ivr(D_DECL(iv[0],2*jm - iv[1] - 1,iv[2])); - - dest(iv,0) -= scale * src(ivr,0); - dest(ivr,0) -= scale * src(iv,0); - - dest(iv,1) -= scale * src(ivr,1); - dest(ivr,1) -= scale * src(iv,1); - - dest(iv,2) = scale * src(ivr,2); - dest(ivr,2) = scale * src(iv,2); - } - } - else { - dest.saxpy(scale, src, box, box, 0, 0, 3); - } -} - -std::vector -condMean(FArrayBox& src, - bool cdir) -{ - const Box& box = src.box(); - const IntVect se=box.smallEnd(); - const IntVect be=box.bigEnd(); - - std::vector cm(be[cdir]-se[cdir]+1); - bool idir = !cdir; - int jm = (se[idir] + be[idir] + 1)/2; - for (int i=se[cdir]; i<=be[cdir]; ++i) { - Real s, v; s = v = 0; - for (int j=se[idir]; j<=be[idir]; ++j) { - IntVect iv; iv[cdir]=i; iv[idir]=j; - v += src(iv,0); - s += src(iv,1+idir); - } - cm[i-se[cdir]] = (v != 0 ? s / v : 0); - } - return cm; -} - -// fill fab with uniform gradient -// cell(i,j) -> i*iv[0]+j*iv[1] -// occasionally useful -#if (BL_SPACEDIM==2) -void gradfillfab(FArrayBox&fab, const IntVect&iv){ - int iv0 = iv[0]; - int iv1 = iv[1]; - Box bx = fab.box(); - int nc = fab.nComp(); - int i,j; - int ilo = bx.loVect()[0]; - int jlo = bx.loVect()[1]; - int ihi = bx.hiVect()[0]; - int jhi = bx.hiVect()[1]; - int ilen = ihi-ilo+1; - int jlen = jhi-jlo+1; - Real *ptr = fab.dataPtr(); - for(int n=0; n0 on a point by point basis -// res = n if trg<= 0 on a point by point basis -// is implicit assumption that all fab's are exactly the same size -#if (BL_SPACEDIM==2) -void cvmgpfab(FArrayBox&res,FArrayBox&p,FArrayBox&n,FArrayBox&trg) -{ - Box bx = res.box(); - int nc = res.nComp(); - int i,j; - int ilo = bx.loVect()[0]; - int jlo = bx.loVect()[1]; - int ihi = bx.hiVect()[0]; - int jhi = bx.hiVect()[1]; - int ilen = ihi-ilo+1; - int jlen = jhi-jlo+1; - Real *rptr = res.dataPtr(); - Real *pptr = p.dataPtr(); - Real *nptr = n.dataPtr(); - Real *tptr = trg.dataPtr(); - int istart = 0; - int iend = ihi-ilo+ilen*(jhi-jlo+jlen*(nc-1)); - for( i=istart; i<=iend; i++){ - if( tptr[i]>0. ){ - rptr[i] = pptr[i]; - } - else{ - rptr[i] = nptr[i]; - } - } -} -#elif (BL_SPACEDIM==3) -void cvmgpfab(FArrayBox&res,FArrayBox&p,FArrayBox&n,FArrayBox&trg) -{ - Box bx = res.box(); - int nc = res.nComp(); - int i,j,k; - int ilo = bx.loVect()[0]; - int jlo = bx.loVect()[1]; - int klo = bx.loVect()[2]; - int ihi = bx.hiVect()[0]; - int jhi = bx.hiVect()[1]; - int khi = bx.hiVect()[2]; - int ilen = ihi-ilo+1; - int jlen = jhi-jlo+1; - int klen = khi-klo+1; - Real *rptr = res.dataPtr(); - Real *pptr = p.dataPtr(); - Real *nptr = n.dataPtr(); - Real *tptr = trg.dataPtr(); - int istart = 0; - int iend = ihi-ilo+ilen*(jhi-jlo+jlen*(khi-klo+klen*(nc-1))); - for( i=istart; i<=iend; i++){ - if( tptr[i]>0. ){ - rptr[i] = pptr[i]; - } - else{ - rptr[i] = nptr[i]; - } - } -} -#else -whoa! this cant happen -#endif - -// do a conditional vector merge operation on fab's and put into res -// res = n if trg<0 on a point by point basis -// res = p if trg>= 0 on a point by point basis -// is implicit assumption that all fab's are exactly the same size -#if (BL_SPACEDIM==2) -void cvmgnfab(FArrayBox&res,FArrayBox&n,FArrayBox&p,FArrayBox&trg) -{ - Box bx = res.box(); - int nc = res.nComp(); - int i,j; - int ilo = bx.loVect()[0]; - int jlo = bx.loVect()[1]; - int ihi = bx.hiVect()[0]; - int jhi = bx.hiVect()[1]; - int ilen = ihi-ilo+1; - int jlen = jhi-jlo+1; - Real *rptr = res.dataPtr(); - Real *pptr = p.dataPtr(); - Real *nptr = n.dataPtr(); - Real *tptr = trg.dataPtr(); - int istart = 0; - int iend = ihi-ilo+ilen*(jhi-jlo+jlen*(nc-1)); - for( i=istart; i<=iend; i++){ - if( tptr[i]<0. ){ - rptr[i] = nptr[i]; - } - else{ - rptr[i] = pptr[i]; - } - } -} -#elif (BL_SPACEDIM==3) -void cvmgnfab(FArrayBox&res,FArrayBox&n,FArrayBox&p,FArrayBox&trg) -{ - Box bx = res.box(); - int nc = res.nComp(); - int i,j,k; - int ilo = bx.loVect()[0]; - int jlo = bx.loVect()[1]; - int klo = bx.loVect()[2]; - int ihi = bx.hiVect()[0]; - int jhi = bx.hiVect()[1]; - int khi = bx.hiVect()[2]; - int ilen = ihi-ilo+1; - int jlen = jhi-jlo+1; - int klen = khi-klo+1; - Real *rptr = res.dataPtr(); - Real *pptr = p.dataPtr(); - Real *nptr = n.dataPtr(); - Real *tptr = trg.dataPtr(); - int istart = 0; - int iend = ihi-ilo+ilen*(jhi-jlo+jlen*(khi-klo+klen*(nc-1))); - for( i=istart; i<=iend; i++){ - if( tptr[i]<0. ){ - rptr[i] = nptr[i]; - } - else{ - rptr[i] = pptr[i]; - } - } -} -#else -whoa! this cant happen -#endif - -#if (BL_SPACEDIM==2) -void tocoarse(int ratio,FArrayBox&fine,FArrayBox&crse,IntVect&iv) -{ - // error checking - const Box & cbox = crse.box(); - const Box & fbox = fine.box(); - if( BoxLib::refine(cbox,ratio) != fbox){ - BoxLib::Error("tocoarse: coarse and fine boxes incommensurate"); - } - int ioff = iv[0]; - int joff = iv[1]; - if( ioff < 0 || ioff >= ratio || joff < 0 || joff >= ratio ){ - BoxLib::Error("tocoarse: offset improper for ratio"); - } - int nc = crse.nComp(); - if( nc != fine.nComp() ){ - BoxLib::Error("tocoarse: number of components not match"); - } - int i,j; - int cilo = cbox.loVect()[0]; - int cjlo = cbox.loVect()[1]; - int cihi = cbox.hiVect()[0]; - int cjhi = cbox.hiVect()[1]; - int cilen = cihi-cilo+1; - int cjlen = cjhi-cjlo+1; - Real *cptr = crse.dataPtr(); - int filo = fbox.loVect()[0]; - int fjlo = fbox.loVect()[1]; - int fihi = fbox.hiVect()[0]; - int fjhi = fbox.hiVect()[1]; - int filen = fihi-filo+1; - int fjlen = fjhi-fjlo+1; - Real *fptr = fine.dataPtr(); - for( int n=0; n=ratio||joff<0||joff>=ratio||koff<0||koff>=ratio){ - BoxLib::Error("tocoarse: offset improper for ratio"); - } - int nc = crse.nComp(); - if( nc != fine.nComp() ){ - BoxLib::Error("tocoarse: number of components not match"); - } - int i,j,k; - int cilo = cbox.loVect()[0]; - int cjlo = cbox.loVect()[1]; - int cklo = cbox.loVect()[2]; - int cihi = cbox.hiVect()[0]; - int cjhi = cbox.hiVect()[1]; - int ckhi = cbox.hiVect()[2]; - int cilen = cihi-cilo+1; - int cjlen = cjhi-cjlo+1; - int cklen = ckhi-cklo+1; - Real *cptr = crse.dataPtr(); - int filo = fbox.loVect()[0]; - int fjlo = fbox.loVect()[1]; - int fklo = fbox.loVect()[2]; - int fihi = fbox.hiVect()[0]; - int fjhi = fbox.hiVect()[1]; - int fkhi = fbox.hiVect()[2]; - int filen = fihi-filo+1; - int fjlen = fjhi-fjlo+1; - int fklen = fkhi-fklo+1; - Real *fptr = fine.dataPtr(); - for( int n=0; n= ratio || joff < 0 || joff >= ratio ){ - BoxLib::Error("tofine: offset improper for ratio"); - } - int nc = crse.nComp(); - if( nc != fine.nComp() ){ - BoxLib::Error("tofine: number of components not match"); - } - int i,j; - int cilo = cbox.loVect()[0]; - int cjlo = cbox.loVect()[1]; - int cihi = cbox.hiVect()[0]; - int cjhi = cbox.hiVect()[1]; - int cilen = cihi-cilo+1; - int cjlen = cjhi-cjlo+1; - Real *cptr = crse.dataPtr(); - int filo = fbox.loVect()[0]; - int fjlo = fbox.loVect()[1]; - int fihi = fbox.hiVect()[0]; - int fjhi = fbox.hiVect()[1]; - int filen = fihi-filo+1; - int fjlen = fjhi-fjlo+1; - Real *fptr = fine.dataPtr(); - fine.setVal(defval); - for( int n=0; n=ratio||joff<0||joff>=ratio||koff<0||koff>=ratio){ - BoxLib::Error("tofine: offset improper for ratio"); - } - int nc = crse.nComp(); - if( nc != fine.nComp() ){ - BoxLib::Error("tofine: number of components not match"); - } - int i,j,k; - int cilo = cbox.loVect()[0]; - int cjlo = cbox.loVect()[1]; - int cklo = cbox.loVect()[2]; - int cihi = cbox.hiVect()[0]; - int cjhi = cbox.hiVect()[1]; - int ckhi = cbox.hiVect()[2]; - int cilen = cihi-cilo+1; - int cjlen = cjhi-cjlo+1; - int cklen = ckhi-cklo+1; - Real *cptr = crse.dataPtr(); - int filo = fbox.loVect()[0]; - int fjlo = fbox.loVect()[1]; - int fklo = fbox.loVect()[2]; - int fihi = fbox.hiVect()[0]; - int fjhi = fbox.hiVect()[1]; - int fkhi = fbox.hiVect()[2]; - int filen = fihi-filo+1; - int fjlen = fjhi-fjlo+1; - int fklen = fkhi-fklo+1; - Real *fptr = fine.dataPtr(); - fine.setVal(defval); - for( int n=0; n= ratio || joff < 0 || joff >= ratio ){ - BoxLib::Error("injectCoarse: offset improper for ratio"); - } - int nc = crse.nComp(); - if( nc != fine.nComp() ){ - BoxLib::Error("injectCoarse: number of components not match"); - } - int i,j; - int cilo = cbox.loVect()[0]; - int cjlo = cbox.loVect()[1]; - int cihi = cbox.hiVect()[0]; - int cjhi = cbox.hiVect()[1]; - int cilen = cihi-cilo+1; - int cjlen = cjhi-cjlo+1; - Real *cptr = crse.dataPtr(); - int filo = fbox.loVect()[0]; - int fjlo = fbox.loVect()[1]; - int fihi = fbox.hiVect()[0]; - int fjhi = fbox.hiVect()[1]; - int filen = fihi-filo+1; - int fjlen = fjhi-fjlo+1; - Real *fptr = fine.dataPtr(); - int tilo = tbox.loVect()[0]; - int tjlo = tbox.loVect()[1]; - int tihi = tbox.hiVect()[0]; - int tjhi = tbox.hiVect()[1]; - // run over coarse grid points in tbox and stuff it in fine - for( int n=0; n= filo && fioff <= fihi && fjoff >= fjlo && fjoff <= fjhi ){ - int foffset = fioff-filo+filen*(fjoff-fjlo+fjlen*n); - fptr[foffset] = cptr[coffset]; - } - } - } - } -} -#elif (BL_SPACEDIM==3) -void injectCoarse(FArrayBox&fine,int ratio, const IntVect&iv, - FArrayBox&crse,const Box&tbox) -{ - // error checking - if( !tbox.ok() ) return; - const Box & cbox = crse.box(); - const Box & fbox = fine.box(); - if( ! cbox.contains(tbox) ){ - BoxLib::Error("tofine: coarse and target boxes incommensurate"); - } - // test to make sure that tbox image + iv is in fbox - Box timage = BoxLib::refine(tbox,ratio); - const IntVect &tsm = timage.smallEnd(); - IntVect testiv = tsm+iv; - if( !fbox.contains(testiv) ) return; - - int ioff = iv[0]; - int joff = iv[1]; - int koff = iv[2]; - if(ioff<0||ioff>=ratio||joff<0||joff>=ratio||koff<0||koff>=ratio){ - BoxLib::Error("tofine: offset improper for ratio"); - } - int nc = crse.nComp(); - if( nc != fine.nComp() ){ - BoxLib::Error("tofine: number of components not match"); - } - int i,j,k; - int cilo = cbox.loVect()[0]; - int cjlo = cbox.loVect()[1]; - int cklo = cbox.loVect()[2]; - int cihi = cbox.hiVect()[0]; - int cjhi = cbox.hiVect()[1]; - int ckhi = cbox.hiVect()[2]; - int cilen = cihi-cilo+1; - int cjlen = cjhi-cjlo+1; - int cklen = ckhi-cklo+1; - Real *cptr = crse.dataPtr(); - int filo = fbox.loVect()[0]; - int fjlo = fbox.loVect()[1]; - int fklo = fbox.loVect()[2]; - int fihi = fbox.hiVect()[0]; - int fjhi = fbox.hiVect()[1]; - int fkhi = fbox.hiVect()[2]; - int filen = fihi-filo+1; - int fjlen = fjhi-fjlo+1; - int fklen = fkhi-fklo+1; - Real *fptr = fine.dataPtr(); - int tilo = tbox.loVect()[0]; - int tjlo = tbox.loVect()[1]; - int tklo = tbox.loVect()[2]; - int tihi = tbox.hiVect()[0]; - int tjhi = tbox.hiVect()[1]; - int tkhi = tbox.hiVect()[2]; - // run over coarse grid points in tbox and stuff it in fine - for( int n=0; n= filo && fioff <= fihi && - fjoff >= fjlo && fjoff <= fjhi && - fkoff >= fklo && fkoff <= fkhi ) { - int foffset = fioff-filo+filen* - (fjoff-fjlo+fjlen*(fkoff-fklo+fklen*n)); - fptr[foffset] = cptr[coffset]; - } - } - } - } - } -} -#else -whoa! this cant happen -#endif - -void -dummyFunc() -{ - std::cerr << "the impossible has happened: dummyFunc has been called!"< - -#if (BL_SPACEDIM==2) -char * -makePGM( FArrayBox* _fab, int icomp, double usemin, double usemax) -{ - FArrayBox &fab = *_fab; - char tmp[512]; // use for temp storage of header - Box bx = fab.box(); - int width = bx.length(0); - int height = bx.length(1); - int npts = bx.numPts(); - sprintf(tmp,"P5\n%d\n%d\n255\n",width,height); - int len = std::strlen(tmp); - // now allocate the big buffer - //char *ptr = new char[len+npts]; - char *ptr = (char *)malloc(len+npts); - strcpy(ptr,tmp); - char *nextchar = ptr+len; - Real *nextreal = fab.dataPtr(icomp); - - int i,j; - int ilo = bx.loVect()[0]; - int jlo = bx.loVect()[1]; - int ihi = bx.hiVect()[0]; - int jhi = bx.hiVect()[1]; - int ilen = (ihi-ilo+1); - - // this reverses j direction to agree with graphics idiom - for( j=jlo; j<=jhi; ++j){ - for(i=ilo; i<=ihi; ++i){ - int val = (int) - ((nextreal[i-ilo+(jhi-j)*ilen]-usemin)/(usemax-usemin)*255); - if( val < 0 ) val = 0; - if( val > 255 ) val = 255; - nextchar[i-ilo+(jhi-j)*ilen] = (char)val; - } - } - - _charArrayLen = len+npts; - return ptr; -} -#elif (BL_SPACEDIM==3) -char * -makePGM( FArrayBox* _fab, int icomp, double usemin, double usemax) -{ - FArrayBox &fab = *_fab; - char tmp[512]; // use for temp storage of header - Box bx = fab.box(); - int width,height; - if( bx.length(0)==1 ){ - width = bx.length(1); - height = bx.length(2); - } - else if(bx.length(1)==1){ - width = bx.length(0); - height = bx.length(2); - } - else{ - width = bx.length(0); - height = bx.length(1); - } - int npts = width*height; - sprintf(tmp,"P5\n%d\n%d\n255\n",width,height); - int len = strlen(tmp); - // now allocate the big buffer - char *ptr = (char *)malloc(len+npts); - strcpy(ptr,tmp); - char *nextchar = ptr+len; - Real *nextreal = fab.dataPtr(icomp); - - int i,j,k; - int ilo = bx.loVect()[0]; - int jlo = bx.loVect()[1]; - int klo = bx.loVect()[2]; - int ihi = bx.hiVect()[0]; - int jhi = bx.hiVect()[1]; - int khi = bx.hiVect()[2]; - int ilen = (ihi-ilo+1); - int jlen = (jhi-jlo+1); - - if( bx.length(0)==1 ){ - for( k=klo; k<=khi; ++k){ - for(j=jlo; j<=jhi; ++j){ - int val = (int) - ((nextreal[j-jlo+(khi-k)*jlen]-usemin)/(usemax-usemin)*255); - if( val < 0 ) val = 0; - if( val > 255 ) val = 255; - nextchar[j-jlo+(khi-k)*jlen] = (char)val; - } - } - } - else if( bx.length(1)==1 ){ - for( k=klo; k<=khi; ++k){ - for(i=ilo; i<=ihi; ++i){ - int val = (int) - ((nextreal[i-ilo+(khi-k)*ilen]-usemin)/(usemax-usemin)*255); - if( val < 0 ) val = 0; - if( val > 255 ) val = 255; - nextchar[i-ilo+(khi-k)*ilen] = (char)val; - } - } - } - else { - for( j=jlo; j<=jhi; ++j){ - for(i=ilo; i<=ihi; ++i){ - int val = (int) - ((nextreal[i-ilo+(jhi-j)*ilen]-usemin)/(usemax-usemin)*255); - if( val < 0 ) val = 0; - if( val > 255 ) val = 255; - nextchar[i-ilo+(jhi-j)*ilen] = (char)val; - } - } - } - - _charArrayLen = len+npts; - return ptr; -} -#else -whoa! this cant happen -#endif - - -// this is to fix up some problems with tkintr and swig -extern "C" { - char * getprogramname(); - char * Py_GetProgramName(); - char * PyString_FromStringAndSize(); -}; - -static void dummy_stuff_() -{ - PyString_FromStringAndSize(); -} - -#if 0 -char * -Py_GetProgramName() -{ - return getprogramname(); -} -#endif diff --git a/Src/Python/setup.py b/Src/Python/setup.py deleted file mode 100644 index 84122acc9..000000000 --- a/Src/Python/setup.py +++ /dev/null @@ -1,75 +0,0 @@ -'''PyBoxLib setup script.''' - -import glob -import os -import re - -from distutils.core import setup -from distutils.extension import Extension -from distutils.command.install import install -from distutils.command.build import build -from distutils.spawn import find_executable - -from subprocess import call - -import numpy as np - - -class build_boxlib(build): - - user_options = build.user_options + [ ('disable-mpi', None, "disable MPI support") ] - boolean_options = build.boolean_options + [ 'disable-mpi' ] - - def initialize_options(self): - build.initialize_options(self) - self.disable_mpi = 0 - - - def run(self): - build.run(self) - - use_mpi = self.disable_mpi == 0 - - print 'running build_boxlib' - self.mkpath(self.build_temp) - def compile(): - print '*' * 80 - if use_mpi: - cc = os.environ.get('CC', 'mpicc') - cxx = os.environ.get('CXX', 'mpic++') - mpihome = os.environ.get('MPIHOME', None) - if mpihome is None: - mpicc = find_executable('mpicc') - if mpicc is None: - raise ValueError("'mpicc' not found. Please install MPI so that 'mpicc' and 'mpicxx' are in your PATH, or set MPIHOME appropriately.") - mpihome = os.path.dirname(os.path.dirname(mpicc)) - call([ 'make', 'MPI_HOME=' + mpihome, 'CC=' + cc, 'CXX=' + cxx, 'OUT=' + self.build_temp ]) - else: - call([ 'make', 'USE_MPI=FALSE', 'OUT=' + self.build_temp ]) - print '*' * 80 - - self.execute(compile, [], 'compiling boxlib') - - self.mkpath(self.build_lib) - target_files = [ '_bl1.so', '_bl2.so', '_bl3.so' ] - if not self.dry_run: - for target in target_files: - self.copy_file(os.path.join(self.build_temp, target), - os.path.join(self.build_lib, 'boxlib')) - - -setup( - - name = "PyBoxLib", - packages = ['boxlib'], - author = "Matthew Emmett and Marc Day", - author_email = "mwemmett@lbl.gov", - description = "Python wrappers for BoxLib.", - license = "XXX", - keywords = "BoxLib", - url = "https://ccse.lbl.gov/BoxLib/", - - cmdclass = { - 'build': build_boxlib, - } - ) diff --git a/Src/Python/src/boxlib_wrap_1.cpp b/Src/Python/src/boxlib_wrap_1.cpp deleted file mode 100644 index 9e9f037a6..000000000 --- a/Src/Python/src/boxlib_wrap_1.cpp +++ /dev/null @@ -1,13848 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.11 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - -#define SWIGPYTHON -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE - - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - - -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG -#else -# include -#endif - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) -#define PyString_Check(name) PyBytes_Check(name) -#define PyString_FromString(x) PyUnicode_FromString(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) -#define PyString_AsString(str) PyBytes_AsString(str) -#define PyString_Size(str) PyBytes_Size(str) -#define PyString_InternFromString(key) PyUnicode_InternFromString(key) -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - -#ifdef __cplusplus -} -#endif - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) - -#ifdef SWIGPYTHON_BUILTIN -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) -#else -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) -#endif - -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) - -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -#if defined(SWIGPYTHON_BUILTIN) - -SWIGINTERN void -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { - PyObject *s = PyString_InternFromString(key); - PyList_Append(seq, s); - Py_DECREF(s); -} - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); - if (public_interface) - SwigPyBuiltin_AddPublicSymbol(public_interface, name); -} - -#else - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); -} - -#endif - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - if (min <= 1 && max >= 1) { - register int i; - objs[0] = args; - for (i = 1; i < max; ++i) { - objs[i] = 0; - } - return 2; - } - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - register int i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) - -#ifdef __cplusplus -extern "C" { -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; - PyTypeObject *pytype; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - data->pytype = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -#ifdef SWIGPYTHON_BUILTIN - PyObject *dict; -#endif -} SwigPyObject; - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { -# ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif -# if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -# else - PyString_ConcatAndDel(&repr,nrep); -# endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); - return res; -} - - -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); - -#ifdef SWIGPYTHON_BUILTIN -static swig_type_info *SwigPyObject_stype = 0; -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - SwigPyClientData *cd; - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - assert(cd); - assert(cd->pytype); - return cd->pytype; -} -#else -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); - return type; -} -#endif - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { -#ifdef SWIGPYTHON_BUILTIN - PyTypeObject *target_tp = SwigPyObject_type(); - if (PyType_IsSubtype(op->ob_type, target_tp)) - return 1; - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); -#else - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -#endif -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -SwigPyObject_TypeOnce(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpyobject_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpyobject_type) < 0) - return NULL; -#endif - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == SwigPyPacked_TypeOnce()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_TypeOnce(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpypacked_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpypacked_type) < 0) - return NULL; -#endif - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - PyObject *obj; - - if (SwigPyObject_Check(pyobj)) - return (SwigPyObject *) pyobj; - -#ifdef SWIGPYTHON_BUILTIN - (void)obj; -# ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - pyobj = PyWeakref_GET_OBJECT(pyobj); - if (pyobj && SwigPyObject_Check(pyobj)) - return (SwigPyObject*) pyobj; - } -# endif - return NULL; -#else - - obj = 0; - -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; -#endif -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - int res; - SwigPyObject *sobj; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; - - if (!obj) - return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { - if (ptr) - *ptr = 0; - return SWIG_OK; - } - - res = SWIG_ERROR; - - sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - res = SWIG_OK; - } else { - if (implicit_conv) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } - } - return res; -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } -#else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { - SwigPyClientData *clientdata; - PyObject * robj; - int own; - - if (!ptr) - return SWIG_Py_Void(); - - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - if (clientdata && clientdata->pytype) { - SwigPyObject *newobj; - if (flags & SWIG_BUILTIN_TP_INIT) { - newobj = (SwigPyObject*) self; - if (newobj->ptr) { - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); - while (newobj->next) - newobj = (SwigPyObject *) newobj->next; - newobj->next = next_self; - newobj = (SwigPyObject *)next_self; - } - } else { - newobj = PyObject_New(SwigPyObject, clientdata->pytype); - } - if (newobj) { - newobj->ptr = ptr; - newobj->ty = type; - newobj->own = own; - newobj->next = 0; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - return (PyObject*) newobj; - } - return SWIG_Py_Void(); - } - - assert(!(flags & SWIG_BUILTIN_TP_INIT)); - - robj = SwigPyObject_New(ptr, type, own); - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); - robj = inst; - } - return robj; -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else -# ifdef SWIGPY_USE_CAPSULE - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE -SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif -{ -#ifdef SWIGPY_USE_CAPSULE - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); - swig_this = NULL; -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); -#endif -#ifdef SWIGPY_USE_CAPSULE - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#endif -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { -#ifdef SWIGPY_USE_CAPSULE - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif - } else { - swig_module_info *swig_module = SWIG_GetModule(0); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE - obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : ""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - -#ifdef SWIGPYTHON_BUILTIN -SWIGRUNTIME int -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { - PyTypeObject *tp = obj->ob_type; - PyObject *descr; - PyObject *encoded_name; - descrsetfunc f; - int res = -1; - -# ifdef Py_USING_UNICODE - if (PyString_Check(name)) { - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); - if (!name) - return -1; - } else if (!PyUnicode_Check(name)) -# else - if (!PyString_Check(name)) -# endif - { - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); - return -1; - } else { - Py_INCREF(name); - } - - if (!tp->tp_dict) { - if (PyType_Ready(tp) < 0) - goto done; - } - - descr = _PyType_Lookup(tp, name); - f = NULL; - if (descr != NULL) - f = descr->ob_type->tp_descr_set; - if (!f) { - if (PyString_Check(name)) { - encoded_name = name; - Py_INCREF(name); - } else { - encoded_name = PyUnicode_AsUTF8String(name); - } - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); - } else { - res = f(descr, obj, value); - } - - done: - Py_DECREF(name); - return res; -} -#endif - - -#ifdef __cplusplus -} -#endif - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_Box swig_types[0] -#define SWIGTYPE_p_BoxArray swig_types[1] -#define SWIGTYPE_p_FArrayBox swig_types[2] -#define SWIGTYPE_p_FabAlloc swig_types[3] -#define SWIGTYPE_p_Geometry swig_types[4] -#define SWIGTYPE_p_IntVect swig_types[5] -#define SWIGTYPE_p_MultiFab swig_types[6] -#define SWIGTYPE_p_RealBox swig_types[7] -#define SWIGTYPE_p_char swig_types[8] -#define SWIGTYPE_p_double swig_types[9] -#define SWIGTYPE_p_std__ifstream swig_types[10] -#define SWIGTYPE_p_std__invalid_argument swig_types[11] -#define SWIGTYPE_p_std__istream swig_types[12] -#define SWIGTYPE_p_std__ofstream swig_types[13] -#define SWIGTYPE_p_std__ostream swig_types[14] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[15] -static swig_type_info *swig_types[17]; -static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif -#endif - -/*----------------------------------------------- - @(target):= _bl1.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__bl1 - -#else -# define SWIG_init init_bl1 - -#endif -#define SWIG_name "_bl1" - -#define SWIGVERSION 0x020011 -#define SWIG_VERSION SWIGVERSION - - -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) - - -#include - - -namespace swig { - class SwigPtr_PyObject { - protected: - PyObject *_obj; - - public: - SwigPtr_PyObject() :_obj(0) - { - } - - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) - { - Py_XINCREF(_obj); - } - - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) - { - if (initial_ref) { - Py_XINCREF(_obj); - } - } - - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) - { - Py_XINCREF(item._obj); - Py_XDECREF(_obj); - _obj = item._obj; - return *this; - } - - ~SwigPtr_PyObject() - { - Py_XDECREF(_obj); - } - - operator PyObject *() const - { - return _obj; - } - - PyObject *operator->() const - { - return _obj; - } - }; -} - - -namespace swig { - struct SwigVar_PyObject : SwigPtr_PyObject { - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } - - SwigVar_PyObject & operator = (PyObject* obj) - { - Py_XDECREF(_obj); - _obj = obj; - return *this; - } - }; -} - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SWIG_FILE_WITH_INIT - - -#ifndef SWIG_FILE_WITH_INIT -# define NO_IMPORT_ARRAY -#endif -#include "stdio.h" -#include - - -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} - - - void StartParallel() { - ParallelDescriptor::StartParallel(); - } - int rank() { - return ParallelDescriptor::MyProc(); - } - int size() { - return ParallelDescriptor::NProcs(); - } - Real ReduceRealMax (Real lval) { - Real rvar = lval; - ParallelDescriptor::ReduceRealMax(rvar); - return rvar; - } - - -SWIGINTERN int -SWIG_AsVal_double (PyObject *obj, double *val) -{ - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) *val = PyFloat_AsDouble(obj); - return SWIG_OK; - } else if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } -#endif - return res; -} - - - #define SWIG_From_double PyFloat_FromDouble - - - std::ifstream & open_ifstream(const char *filename) { - std::ifstream *infile = new std::ifstream(filename); - return *infile; - } - - -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - - -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 - if (PyUnicode_Check(obj)) -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - PyBytes_AsStringAndSize(obj, &cstr, &len); - if(alloc) *alloc = SWIG_NEWOBJ; -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } - else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif - *cptr = SWIG_Python_str_AsChar(obj); - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 - Py_XDECREF(obj); -#endif - return SWIG_OK; - } else { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - - - - - std::ofstream & open_ofstream(const char *filename) { - std::ofstream *outfile = new std::ofstream(filename); - return *outfile; - } - - - void close_ofstream(std::ofstream& str) { - str.close(); - } - - - void close_ifstream(std::ifstream & str) { - str.close(); - } - - -#include - - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - -#include - - -#include - - -SWIGINTERNINLINE int -SWIG_CanCastAsInteger(double *d, double min, double max) { - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff/summ; - if (reps < 8*DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) -{ - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< int >(v); - } - } - return res; -} - -SWIGINTERN void IntVect_writeOn(IntVect *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN void IntVect_read(IntVect *self,std::ifstream *ifs){ - *ifs >> *self; - } -SWIGINTERN int IntVect___getitem__(IntVect *self,int index){ - return (*self)[index]; - } -SWIGINTERN int IntVect___len__(IntVect volatile *self){ return BL_SPACEDIM; } -SWIGINTERN void IntVect___setitem__(IntVect *self,int index,int val){ - (*self).setVal(index,val); - } -SWIGINTERN int IntVect___cmp__(IntVect *self,IntVect const *other){ - if( (*self) == (*other) ) { - return 0; - } - if( (*self) <= (*other) ) { - return -1; - } - return 1; - } -SWIGINTERN std::string IntVect_display(IntVect *self){ - std::ostringstream str; - str << *self; - return str.str(); - } - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); -#else - return PyString_FromStringAndSize(carray, static_cast< int >(size)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - -SWIGINTERNINLINE PyObject* - SWIG_From_bool (bool value) -{ - return PyBool_FromLong(value ? 1 : 0); -} - - - #define SWIG_From_long PyLong_FromLong - -SWIGINTERN void Box_read(Box *self,std::ifstream *ifs){ - *ifs >> *self; - } -SWIGINTERN void Box_write(Box *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN Box Box___and__(Box *self,Box *right){ - Box result; - result = *self & *right; - return result; - } -SWIGINTERN void Box_writeOn(Box *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN std::string Box_display(Box *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN int Box___cmp__(Box *self,Box const *other){ - if(*self == *other) return 0; - else if( self->smallEnd().lexLT(other->smallEnd())){ - return 1; - } - else { - return -1; - } - } -SWIGINTERN std::string FArrayBox_display(FArrayBox *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN PyObject *FArrayBox_get_array(FArrayBox *self){ - double *ptr = self->dataPtr(); - PyObject *arr = 0; - npy_intp dims[BL_SPACEDIM+1]; - - const IntVect size = self->box().size(); - for (int i=0; inComp(); - arr = PyArray_NewFromDescr(&PyArray_Type, - PyArray_DescrFromType(NPY_DOUBLE), BL_SPACEDIM+1, dims, NULL, - ptr, NPY_FORTRAN|NPY_WRITEABLE, NULL); - - Py_INCREF(arr); - return arr; - } -SWIGINTERN double FArrayBox_valIV(FArrayBox *self,IntVect const *p,int n){ - return (*self)(*p,n); - } -SWIGINTERN void FArrayBox_setValIV__SWIG_0(FArrayBox *self,double x,IntVect const *p,int n=1){ - (*self)(*p,n) = x; - } -SWIGINTERN void FArrayBox_floor(FArrayBox *self,double val){ - Box bx = self->box(); - int nc = self->nComp(); - for (IntVect iv=bx.smallEnd(), End=bx.bigEnd(); iv<=End; bx.next(iv)) { - for (int n=0; nbox(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) += *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___sub__(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) -= *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___mul____SWIG_0(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) *= *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___mul____SWIG_1(FArrayBox *self,double right){ - Box bx = self->box(); - int nvar = self->nComp(); - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - result->mult(right); - return result; - } -SWIGINTERN FArrayBox *FArrayBox___div__(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) /= *right; - return result; - } -SWIGINTERN Box BoxArray___getitem__(BoxArray *self,int index){ - return (*self)[index]; - } -SWIGINTERN BoxArray BoxArray_complementIn(BoxArray *self,Box const &b){ - return BoxLib::complementIn(b,*self); - } -SWIGINTERN BoxArray BoxArray___and__(BoxArray *self,BoxArray const &right){ - BoxArray res = BoxLib::intersect(*self,right); - return res; - } -SWIGINTERN BoxArray BoxArray___or__(BoxArray *self,BoxArray const &right){ - BoxList bl(*self); - bl.join(BoxList(right)); - return BoxArray(bl); - } -SWIGINTERN int BoxArray___len__(BoxArray *self){ return (*self).size(); } -SWIGINTERN std::string BoxArray_display(BoxArray *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN int BoxArray___cmp__(BoxArray *self,BoxArray const *other){ - if( (*self)==(*other)) return 0; - else return 1; - } - -#include - -#if PY_VERSION_HEX >= 0x03020000 -# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) -#else -# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) -#endif - - -#include - - -#if defined(__GNUC__) -# if __GNUC__ == 2 && __GNUC_MINOR <= 96 -# define SWIG_STD_NOMODERN_STL -# endif -#endif - - -#include -#include -#include - - - #include - - -namespace swig { - struct stop_iteration { - }; - - struct SwigPyIterator { - private: - SwigPtr_PyObject _seq; - - protected: - SwigPyIterator(PyObject *seq) : _seq(seq) - { - } - - public: - virtual ~SwigPyIterator() {} - - // Access iterator method, required by Python - virtual PyObject *value() const = 0; - - // Forward iterator method, required by Python - virtual SwigPyIterator *incr(size_t n = 1) = 0; - - // Backward iterator method, very common in C++, but not required in Python - virtual SwigPyIterator *decr(size_t /*n*/ = 1) - { - throw stop_iteration(); - } - - // Random access iterator methods, but not required in Python - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const - { - throw std::invalid_argument("operation not supported"); - } - - virtual bool equal (const SwigPyIterator &/*x*/) const - { - throw std::invalid_argument("operation not supported"); - } - - // C++ common/needed methods - virtual SwigPyIterator *copy() const = 0; - - PyObject *next() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads - PyObject *obj = value(); - incr(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; - } - - /* Make an alias for Python 3.x */ - PyObject *__next__() - { - return next(); - } - - PyObject *previous() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads - decr(); - PyObject *obj = value(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; - } - - SwigPyIterator *advance(ptrdiff_t n) - { - return (n > 0) ? incr(n) : decr(-n); - } - - bool operator == (const SwigPyIterator& x) const - { - return equal(x); - } - - bool operator != (const SwigPyIterator& x) const - { - return ! operator==(x); - } - - SwigPyIterator& operator += (ptrdiff_t n) - { - return *advance(n); - } - - SwigPyIterator& operator -= (ptrdiff_t n) - { - return *advance(-n); - } - - SwigPyIterator* operator + (ptrdiff_t n) const - { - return copy()->advance(n); - } - - SwigPyIterator* operator - (ptrdiff_t n) const - { - return copy()->advance(-n); - } - - ptrdiff_t operator - (const SwigPyIterator& x) const - { - return x.distance(*this); - } - - static swig_type_info* descriptor() { - static int init = 0; - static swig_type_info* desc = 0; - if (!init) { - desc = SWIG_TypeQuery("swig::SwigPyIterator *"); - init = 1; - } - return desc; - } - }; - -#if defined(SWIGPYTHON_BUILTIN) - inline PyObject* make_output_iterator_builtin (PyObject *pyself) - { - Py_INCREF(pyself); - return pyself; - } -#endif -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); -#if PY_VERSION_HEX >= 0x03000000 - { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (v < 0) { - return SWIG_OverflowError; - } - } else { - PyErr_Clear(); - } - } -#endif - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) *val = (unsigned long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); - return res; -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_ptrdiff_t (ptrdiff_t value) -{ - return SWIG_From_long (static_cast< long >(value)); -} - - -SWIGINTERNINLINE int -SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) -{ - long v; - int res = SWIG_AsVal_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); - return res; -} - - -#include - - -#include - - -#include - - -#include - - -#include - -SWIGINTERN void MultiFab_define__SWIG_0(MultiFab *self,BoxArray const &bxs,int nvar,int ngrow,FabAlloc mem_mode=Fab_allocate){ - self->FabArray::define(bxs,nvar,ngrow,mem_mode); - } - -SWIGINTERN int -SWIG_AsVal_bool (PyObject *obj, bool *val) -{ - int r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; -} - -SWIGINTERN double MultiFab_sum__SWIG_0(MultiFab const *self,int comp=0){ - const BoxArray &ba = self->boxArray(); - double retval = 0; - for(MFIter mfi(*self);mfi.isValid(); ++mfi){ - int idx = mfi.index(); - const Box &bx = ba[idx]; - const FArrayBox &fab = (*self)[mfi]; - retval += fab.sum(bx,comp,1); - } - ParallelDescriptor::ReduceRealSum(retval); - return retval; - } -SWIGINTERN void MultiFab_writeOut(MultiFab *self,char *name){ - std::string str(name); - VisMF::Write(*self,str,VisMF::OneFilePerCPU); - } -SWIGINTERN void MultiFab_copyComp(MultiFab *self,MultiFab *src,int src_comp,int dest_comp,int num_comp){ - self->copy(*src,src_comp,dest_comp,num_comp); - } -SWIGINTERN FArrayBox *MultiFab___getitem__(MultiFab *self,int index){ - if ((*self).DistributionMap()[index]==ParallelDescriptor::MyProc() ) { - return &((*self)[index]); - } - return 0; - } - -/* Support older NumPy data type names -*/ -#if NDARRAY_VERSION < 0x01000000 -#define NPY_BOOL PyArray_BOOL -#define NPY_BYTE PyArray_BYTE -#define NPY_UBYTE PyArray_UBYTE -#define NPY_SHORT PyArray_SHORT -#define NPY_USHORT PyArray_USHORT -#define NPY_INT PyArray_INT -#define NPY_UINT PyArray_UINT -#define NPY_LONG PyArray_LONG -#define NPY_ULONG PyArray_ULONG -#define NPY_LONGLONG PyArray_LONGLONG -#define NPY_ULONGLONG PyArray_ULONGLONG -#define NPY_FLOAT PyArray_FLOAT -#define NPY_DOUBLE PyArray_DOUBLE -#define NPY_LONGDOUBLE PyArray_LONGDOUBLE -#define NPY_CFLOAT PyArray_CFLOAT -#define NPY_CDOUBLE PyArray_CDOUBLE -#define NPY_CLONGDOUBLE PyArray_CLONGDOUBLE -#define NPY_OBJECT PyArray_OBJECT -#define NPY_STRING PyArray_STRING -#define NPY_UNICODE PyArray_UNICODE -#define NPY_VOID PyArray_VOID -#define NPY_NTYPES PyArray_NTYPES -#define NPY_NOTYPE PyArray_NOTYPE -#define NPY_CHAR PyArray_CHAR -#define NPY_USERDEF PyArray_USERDEF -#define npy_intp intp - -#define NPY_MAX_BYTE MAX_BYTE -#define NPY_MIN_BYTE MIN_BYTE -#define NPY_MAX_UBYTE MAX_UBYTE -#define NPY_MAX_SHORT MAX_SHORT -#define NPY_MIN_SHORT MIN_SHORT -#define NPY_MAX_USHORT MAX_USHORT -#define NPY_MAX_INT MAX_INT -#define NPY_MIN_INT MIN_INT -#define NPY_MAX_UINT MAX_UINT -#define NPY_MAX_LONG MAX_LONG -#define NPY_MIN_LONG MIN_LONG -#define NPY_MAX_ULONG MAX_ULONG -#define NPY_MAX_LONGLONG MAX_LONGLONG -#define NPY_MIN_LONGLONG MIN_LONGLONG -#define NPY_MAX_ULONGLONG MAX_ULONGLONG -#define NPY_MAX_INTP MAX_INTP -#define NPY_MIN_INTP MIN_INTP - -#define NPY_FARRAY FARRAY -#define NPY_F_CONTIGUOUS F_CONTIGUOUS -#endif - - -/* Macros to extract array attributes. - */ -#define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) -#define array_type(a) (int)(PyArray_TYPE(a)) -#define array_numdims(a) (((PyArrayObject *)a)->nd) -#define array_dimensions(a) (((PyArrayObject *)a)->dimensions) -#define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) -#define array_data(a) (((PyArrayObject *)a)->data) -#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) -#define array_is_native(a) (PyArray_ISNOTSWAPPED(a)) -#define array_is_fortran(a) (PyArray_ISFORTRAN(a)) - - - /* Given a PyObject, return a string describing its type. - */ - const char* pytype_string(PyObject* py_obj) { - if (py_obj == NULL ) return "C NULL value"; - if (py_obj == Py_None ) return "Python None" ; - if (PyCallable_Check(py_obj)) return "callable" ; - if (PyString_Check( py_obj)) return "string" ; - if (PyInt_Check( py_obj)) return "int" ; - if (PyFloat_Check( py_obj)) return "float" ; - if (PyDict_Check( py_obj)) return "dict" ; - if (PyList_Check( py_obj)) return "list" ; - if (PyTuple_Check( py_obj)) return "tuple" ; - if (PyFile_Check( py_obj)) return "file" ; - if (PyModule_Check( py_obj)) return "module" ; - if (PyInstance_Check(py_obj)) return "instance" ; - - return "unkown type"; - } - - /* Given a NumPy typecode, return a string describing the type. - */ - const char* typecode_string(int typecode) { - static const char* type_names[25] = {"bool", "byte", "unsigned byte", - "short", "unsigned short", "int", - "unsigned int", "long", "unsigned long", - "long long", "unsigned long long", - "float", "double", "long double", - "complex float", "complex double", - "complex long double", "object", - "string", "unicode", "void", "ntypes", - "notype", "char", "unknown"}; - return typecode < 24 ? type_names[typecode] : type_names[24]; - } - - /* Make sure input has correct numpy type. Allow character and byte - * to match. Also allow int and long to match. This is deprecated. - * You should use PyArray_EquivTypenums() instead. - */ - int type_match(int actual_type, int desired_type) { - return PyArray_EquivTypenums(actual_type, desired_type); - } - - - /* Given a PyObject pointer, cast it to a PyArrayObject pointer if - * legal. If not, set the python error string appropriately and - * return NULL. - */ - PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) - { - PyArrayObject* ary = NULL; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input), typecode))) - { - ary = (PyArrayObject*) input; - } - else if is_array(input) - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = typecode_string(array_type(input)); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. Array of type '%s' given", - desired_type, actual_type); - ary = NULL; - } - else - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = pytype_string(input); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. A '%s' was given", - desired_type, actual_type); - ary = NULL; - } - return ary; - } - - /* Convert the given PyObject to a NumPy array with the given - * typecode. On success, return a valid PyArrayObject* with the - * correct type. On failure, the python error string will be set and - * the routine returns NULL. - */ - PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, - int* is_new_object) - { - PyArrayObject* ary = NULL; - PyObject* py_obj; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input),typecode))) - { - ary = (PyArrayObject*) input; - *is_new_object = 0; - } - else - { - py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT); - /* If NULL, PyArray_FromObject will have set python error value.*/ - ary = (PyArrayObject*) py_obj; - *is_new_object = 1; - } - return ary; - } - - /* Given a PyArrayObject, check to see if it is contiguous. If so, - * return the input pointer and flag it as not a new object. If it is - * not contiguous, create a new PyArrayObject using the original data, - * flag it as a new object and return the pointer. - */ - PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_contiguous(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, - array_type(ary), - min_dims, - max_dims); - *is_new_object = 1; - } - return result; - } - - /* Given a PyArrayObject, check to see if it is Fortran-contiguous. - * If so, return the input pointer, but do not flag it as not a new - * object. If it is not Fortran-contiguous, create a new - * PyArrayObject using the original data, flag it as a new object - * and return the pointer. - */ - PyArrayObject* make_fortran(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_fortran(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - Py_INCREF(ary->descr); - result = (PyArrayObject*) PyArray_FromArray(ary, ary->descr, NPY_FORTRAN); - *is_new_object = 1; - } - return result; - } - - /* Convert a given PyObject to a contiguous PyArrayObject of the - * specified type. If the input object is not a contiguous - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_contiguous(ary1, &is_new2, 0, 0); - if ( is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - - /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the - * specified type. If the input object is not a Fortran-ordered - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_fortran(ary1, &is_new2, 0, 0); - if (is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - - - - /* Test whether a python object is contiguous. If array is - * contiguous, return 1. Otherwise, set the python error string and - * return 0. - */ - int require_contiguous(PyArrayObject* ary) - { - int contiguous = 1; - if (!array_is_contiguous(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must be contiguous. A non-contiguous array was given"); - contiguous = 0; - } - return contiguous; - } - - /* Require that a numpy array is not byte-swapped. If the array is - * not byte-swapped, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_native(PyArrayObject* ary) - { - int native = 1; - if (!array_is_native(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must have native byteorder. " - "A byte-swapped array was given"); - native = 0; - } - return native; - } - - /* Require the given PyArrayObject to have a specified number of - * dimensions. If the array has the specified number of dimensions, - * return 1. Otherwise, set the python error string and return 0. - */ - int require_dimensions(PyArrayObject* ary, int exact_dimensions) - { - int success = 1; - if (array_numdims(ary) != exact_dimensions) - { - PyErr_Format(PyExc_TypeError, - "Array must have %d dimensions. Given array has %d dimensions", - exact_dimensions, array_numdims(ary)); - success = 0; - } - return success; - } - - /* Require the given PyArrayObject to have one of a list of specified - * number of dimensions. If the array has one of the specified number - * of dimensions, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) - { - int success = 0; - int i; - char dims_str[255] = ""; - char s[255]; - for (i = 0; i < n && !success; i++) - { - if (array_numdims(ary) == exact_dimensions[i]) - { - success = 1; - } - } - if (!success) - { - for (i = 0; i < n-1; i++) - { - sprintf(s, "%d, ", exact_dimensions[i]); - strcat(dims_str,s); - } - sprintf(s, " or %d", exact_dimensions[n-1]); - strcat(dims_str,s); - PyErr_Format(PyExc_TypeError, - "Array must have %s dimensions. Given array has %d dimensions", - dims_str, array_numdims(ary)); - } - return success; - } - - /* Require the given PyArrayObject to have a specified shape. If the - * array has the specified shape, return 1. Otherwise, set the python - * error string and return 0. - */ - int require_size(PyArrayObject* ary, npy_intp* size, int n) - { - int i; - int success = 1; - int len; - char desired_dims[255] = "["; - char s[255]; - char actual_dims[255] = "["; - for(i=0; i < n;i++) - { - if (size[i] != -1 && size[i] != array_size(ary,i)) - { - success = 0; - } - } - if (!success) - { - for (i = 0; i < n; i++) - { - if (size[i] == -1) - { - sprintf(s, "*,"); - } - else - { - sprintf(s, "%ld,", (long int)size[i]); - } - strcat(desired_dims,s); - } - len = strlen(desired_dims); - desired_dims[len-1] = ']'; - for (i = 0; i < n; i++) - { - sprintf(s, "%ld,", (long int)array_size(ary,i)); - strcat(actual_dims,s); - } - len = strlen(actual_dims); - actual_dims[len-1] = ']'; - PyErr_Format(PyExc_TypeError, - "Array must have shape of %s. Given array has shape of %s", - desired_dims, actual_dims); - } - return success; - } - - /* Require the given PyArrayObject to to be FORTRAN ordered. If the - * the PyArrayObject is already FORTRAN ordered, do nothing. Else, - * set the FORTRAN ordering flag and recompute the strides. - */ - int require_fortran(PyArrayObject* ary) - { - int success = 1; - int nd = array_numdims(ary); - int i; - if (array_is_fortran(ary)) return success; - /* Set the FORTRAN ordered flag */ - ary->flags = NPY_FARRAY; - /* Recompute the strides */ - ary->strides[0] = ary->strides[nd-1]; - for (i=1; i < nd; ++i) - ary->strides[i] = ary->strides[i-1] * array_size(ary,i-1); - return success; - } - - -#ifdef __cplusplus -extern "C" { -#endif -SWIGINTERN PyObject *_wrap_StartParallel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - - if (!PyArg_ParseTuple(args,(char *)":StartParallel")) SWIG_fail; - StartParallel(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; - - if (!PyArg_ParseTuple(args,(char *)":rank")) SWIG_fail; - result = (int)rank(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; - - if (!PyArg_ParseTuple(args,(char *)":size")) SWIG_fail; - result = (int)size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ReduceRealMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Real arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - Real result; - - if (!PyArg_ParseTuple(args,(char *)"O:ReduceRealMax",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ReduceRealMax" "', argument " "1"" of type '" "Real""'"); - } - arg1 = static_cast< Real >(val1); - result = (Real)ReduceRealMax(arg1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_open_ifstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - std::ifstream *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:open_ifstream",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_ifstream" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = reinterpret_cast< char * >(buf1); - result = (std::ifstream *) &open_ifstream((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_open_ofstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - std::ofstream *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:open_ofstream",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_ofstream" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = reinterpret_cast< char * >(buf1); - result = (std::ofstream *) &open_ofstream((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_close_ofstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::ofstream *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:close_ofstream",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ofstream, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close_ofstream" "', argument " "1"" of type '" "std::ofstream &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "close_ofstream" "', argument " "1"" of type '" "std::ofstream &""'"); - } - arg1 = reinterpret_cast< std::ofstream * >(argp1); - close_ofstream(*arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_close_ifstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::ifstream *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:close_ifstream",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ifstream, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close_ifstream" "', argument " "1"" of type '" "std::ifstream &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "close_ifstream" "', argument " "1"" of type '" "std::ifstream &""'"); - } - arg1 = reinterpret_cast< std::ifstream * >(argp1); - close_ifstream(*arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVect",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVect" "', argument " "1"" of type '" "int""'"); - } - arg1 = static_cast< int >(val1); - result = (IntVect *)new IntVect(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVect",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVect" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVect" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = (IntVect *)new IntVect((IntVect const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_IntVect__SWIG_1(self, args); - } - } - if (argc == 1) { - int _v; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_IntVect__SWIG_0(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IntVect'.\n" - " Possible C/C++ prototypes are:\n" - " IntVect::IntVect(int)\n" - " IntVect::IntVect(IntVect const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_IntVect_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVect_shift",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_shift" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect_shift" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVect_shift" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (IntVect *) &(arg1)->shift(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_writeOn" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect_writeOn" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - IntVect_writeOn(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - std::ifstream *arg2 = (std::ifstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect_read",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_read" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect_read" "', argument " "2"" of type '" "std::ifstream *""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - IntVect_read(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___getitem__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (int)IntVect___getitem__(arg1,arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:IntVect___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___len__" "', argument " "1"" of type '" "IntVect volatile *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = (int)IntVect___len__((IntVect volatile *)arg1); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVect___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___setitem__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect___setitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVect___setitem__" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - IntVect___setitem__(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - IntVect *arg2 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___cmp__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect___cmp__" "', argument " "2"" of type '" "IntVect const *""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (int)IntVect___cmp__(arg1,(IntVect const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:IntVect___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___str__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = IntVect_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheZeroVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheZeroVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheZeroVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheUnitVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheUnitVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheUnitVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheNodeVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheNodeVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheNodeVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheCellVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheCellVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheCellVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IntVect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVect",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVect" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IntVect_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IntVect, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_Box",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *)new Box((IntVect const &)*arg1,(IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - IntVect *arg2 = 0 ; - IntVect *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:new_Box",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Box" "', argument " "3"" of type '" "IntVect const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "3"" of type '" "IntVect const &""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - result = (Box *)new Box((IntVect const &)*arg1,(IntVect const &)*arg2,(IntVect const &)*arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_Box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (Box *)new Box((Box const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_2(self, args); - } - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Box'.\n" - " Possible C/C++ prototypes are:\n" - " Box::Box(IntVect const &,IntVect const &)\n" - " Box::Box(IntVect const &,IntVect const &,IntVect const &)\n" - " Box::Box(Box const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_smallEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_smallEnd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_smallEnd" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->smallEnd(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_bigEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_bigEnd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_bigEnd" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->bigEnd(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_type",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_type" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->type(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_size" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->size(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_contains" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (bool)((Box const *)arg1)->contains((IntVect const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_ok" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (bool)((Box const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_contains" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_contains" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_contains" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->contains((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Box_contains__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Box_contains__SWIG_1(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_contains'.\n" - " Possible C/C++ prototypes are:\n" - " Box::contains(IntVect const &) const\n" - " Box::contains(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_intersects",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_intersects" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_intersects" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_intersects" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->intersects((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_sameSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_sameSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_sameSize" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_sameSize" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_sameSize" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->sameSize((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_sameType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_sameType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_sameType" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_sameType" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_sameType" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->sameType((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_cellCentered(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_cellCentered",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_cellCentered" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (bool)((Box const *)arg1)->cellCentered(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_numPts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_numPts",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_numPts" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (long)((Box const *)arg1)->numPts(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_volume",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_volume" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (long)((Box const *)arg1)->volume(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_index",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_index" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_index" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_index" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (long)((Box const *)arg1)->index((IntVect const &)*arg2); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_setSmall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_setSmall",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_setSmall" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_setSmall" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_setSmall" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->setSmall((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_setBig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_setBig",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_setBig" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_setBig" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_setBig" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->setBig((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_shift",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_shift" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_shift" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_shift" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->shift(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_shiftHalf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_shiftHalf",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_shiftHalf" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_shiftHalf" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_shiftHalf" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->shiftHalf(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_convert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_convert",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_convert" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_convert" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_convert" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->convert((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_surroundingNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_surroundingNodes",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_surroundingNodes" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_surroundingNodes" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->surroundingNodes(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_enclosedCells(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_enclosedCells",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_enclosedCells" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_enclosedCells" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->enclosedCells(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_minBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_minBox",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_minBox" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_minBox" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_minBox" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (Box *) &(arg1)->minBox((Box const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_chop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_chop",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_chop" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_chop" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_chop" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (arg1)->chop(arg2,arg3); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_grow",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_grow" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_grow" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->grow(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_grow",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_grow" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_grow" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_grow" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->grow(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_grow__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_grow__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_grow'.\n" - " Possible C/C++ prototypes are:\n" - " Box::grow(int)\n" - " Box::grow(int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_growLo",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growLo" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growLo" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_growLo" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->growLo(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_growLo",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growLo" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growLo" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->growLo(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growLo__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growLo__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_growLo'.\n" - " Possible C/C++ prototypes are:\n" - " Box::growLo(int,int)\n" - " Box::growLo(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_growHi",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growHi" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growHi" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_growHi" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->growHi(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_growHi",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growHi" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growHi" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->growHi(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growHi__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growHi__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_growHi'.\n" - " Possible C/C++ prototypes are:\n" - " Box::growHi(int,int)\n" - " Box::growHi(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_refine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_refine",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_refine" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_refine" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->refine(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_coarsen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_coarsen",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_coarsen" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_coarsen" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->coarsen(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_next",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_next" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_next" "', argument " "2"" of type '" "IntVect &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_next" "', argument " "2"" of type '" "IntVect &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - ((Box const *)arg1)->next(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ifstream *arg2 = (std::ifstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_read",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_read" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_read" "', argument " "2"" of type '" "std::ifstream *""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - Box_read(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_write",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_write" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_write" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - Box_write(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box___and__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___and__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box___and__" "', argument " "2"" of type '" "Box *""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = Box___and__(arg1,arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_writeOn" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_writeOn" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - Box_writeOn(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___str__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = Box_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___cmp__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box___cmp__" "', argument " "2"" of type '" "Box const *""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (int)Box___cmp__(arg1,(Box const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Box" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Box_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Box, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_FArrayBox__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_FArrayBox",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FArrayBox" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FArrayBox" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FArrayBox" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (FArrayBox *)new FArrayBox((Box const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FArrayBox__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_FArrayBox")) SWIG_fail; - result = (FArrayBox *)new FArrayBox(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FArrayBox(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_FArrayBox__SWIG_1(self, args); - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_FArrayBox__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_FArrayBox'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::FArrayBox(Box const &,int)\n" - " FArrayBox::FArrayBox()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_FArrayBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_FArrayBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FArrayBox" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_box" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->box(); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_nComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_nComp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_nComp" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (int)((FArrayBox const *)arg1)->nComp(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::ofstream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_writeOn" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ofstream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_writeOn" "', argument " "2"" of type '" "std::ofstream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_writeOn" "', argument " "2"" of type '" "std::ofstream &""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - ((FArrayBox const *)arg1)->writeOn(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::istream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_readFrom" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__istream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - arg2 = reinterpret_cast< std::istream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_norm",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_norm" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_norm" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_norm" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_norm" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (double)((FArrayBox const *)arg1)->norm(arg2,arg3,arg4); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:FArrayBox_copy",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_copy" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FArrayBox_copy" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->copy(*arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - Box *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_copy",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "Box &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "Box &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - (arg1)->copy(*arg2,*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_copy",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - (arg1)->copy(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_copy__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_copy__SWIG_1(self, args); - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_copy__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_copy'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::copy(FArrayBox &,int,int,int)\n" - " FArrayBox::copy(FArrayBox &,Box &)\n" - " FArrayBox::copy(FArrayBox &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::ifstream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_readFrom" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ifstream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::ifstream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::ifstream &""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__istream, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_readFrom__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__ifstream, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_readFrom__SWIG_1(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_readFrom'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::readFrom(std::istream &)\n" - " FArrayBox::readFrom(std::ifstream &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___str__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = FArrayBox_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:FArrayBox_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FArrayBox_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_setVal",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->setVal(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_setVal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setVal(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_3(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_2(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_1(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_setVal'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::setVal(double,Box const &,int,int)\n" - " FArrayBox::setVal(double,Box const &,int)\n" - " FArrayBox::setVal(double,int)\n" - " FArrayBox::setVal(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->min(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_min",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (double)((FArrayBox const *)arg1)->min(); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_min",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_min" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->min((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (double)((FArrayBox const *)arg1)->min((Box const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_min__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_min__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_min__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_min__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_min'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::min(int) const\n" - " FArrayBox::min() const\n" - " FArrayBox::min(Box const &,int) const\n" - " FArrayBox::min(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->max(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_max",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (double)((FArrayBox const *)arg1)->max(); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_max",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_max" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->max((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (double)((FArrayBox const *)arg1)->max((Box const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_max__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_max__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_max__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_max__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_max'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::max(int) const\n" - " FArrayBox::max() const\n" - " FArrayBox::max(Box const &,int) const\n" - " FArrayBox::max(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_minIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = ((FArrayBox const *)arg1)->minIndex(arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_minIndex",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->minIndex(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_minIndex",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_minIndex" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = ((FArrayBox const *)arg1)->minIndex((Box const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_minIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = ((FArrayBox const *)arg1)->minIndex((Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_minIndex'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::minIndex(int) const\n" - " FArrayBox::minIndex() const\n" - " FArrayBox::minIndex(Box const &,int) const\n" - " FArrayBox::minIndex(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_maxIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = ((FArrayBox const *)arg1)->maxIndex(arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_maxIndex",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->maxIndex(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_maxIndex",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_maxIndex" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = ((FArrayBox const *)arg1)->maxIndex((Box const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_maxIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = ((FArrayBox const *)arg1)->maxIndex((Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_maxIndex'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::maxIndex(int) const\n" - " FArrayBox::maxIndex() const\n" - " FArrayBox::maxIndex(Box const &,int) const\n" - " FArrayBox::maxIndex(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_sum",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->sum(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_sum",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->sum(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_sum",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_sum" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (double)((FArrayBox const *)arg1)->sum((Box const &)*arg2,arg3,arg4); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_sum",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->sum((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_3(self, args); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_0(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_2(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_sum'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::sum(int,int) const\n" - " FArrayBox::sum(int) const\n" - " FArrayBox::sum(Box const &,int,int) const\n" - " FArrayBox::sum(Box const &,int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_get_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_get_array",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_get_array" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (PyObject *)FArrayBox_get_array(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_valIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - IntVect *arg2 = (IntVect *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_valIV",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_valIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_valIV" "', argument " "2"" of type '" "IntVect const *""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_valIV" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)FArrayBox_valIV(arg1,(IntVect const *)arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - IntVect *arg3 = (IntVect *) 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_setValIV",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setValIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setValIV" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setValIV" "', argument " "3"" of type '" "IntVect const *""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setValIV" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - FArrayBox_setValIV__SWIG_0(arg1,arg2,(IntVect const *)arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - IntVect *arg3 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_setValIV",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setValIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setValIV" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setValIV" "', argument " "3"" of type '" "IntVect const *""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - FArrayBox_setValIV__SWIG_0(arg1,arg2,(IntVect const *)arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_setValIV__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setValIV__SWIG_0(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_setValIV'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::setValIV(double,IntVect const *,int)\n" - " FArrayBox::setValIV(double,IntVect const *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_floor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_floor",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_floor" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_floor" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - FArrayBox_floor(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___add__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___add__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___add__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___sub__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___sub__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___sub__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___mul__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___mul__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___mul____SWIG_0(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___mul__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox___mul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - result = (FArrayBox *)FArrayBox___mul____SWIG_1(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul__(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox___mul____SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox___mul____SWIG_1(self, args); - } - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___div__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___div__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___div__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FArrayBox_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_FArrayBox, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_BoxArray__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_BoxArray")) SWIG_fail; - result = (BoxArray *)new BoxArray(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_BoxArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_BoxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoxArray" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BoxArray__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_BoxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_BoxArray, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BoxArray" "', argument " "1"" of type '" "BoxArray &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BoxArray" "', argument " "1"" of type '" "BoxArray &""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (BoxArray *)new BoxArray(*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BoxArray(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_BoxArray__SWIG_0(self, args); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_BoxArray__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_BoxArray'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::BoxArray()\n" - " BoxArray::BoxArray(BoxArray &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_resize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_resize" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_define(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_define",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_define" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - (arg1)->define((BoxArray const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - std::ostream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_writeOn" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_writeOn" "', argument " "2"" of type '" "std::ostream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_writeOn" "', argument " "2"" of type '" "std::ostream &""'"); - } - arg2 = reinterpret_cast< std::ostream * >(argp2); - (arg1)->writeOn(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_readFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - std::istream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_readFrom" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__istream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - arg2 = reinterpret_cast< std::istream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_size" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (int)(arg1)->size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_get",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_get" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_get" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (arg1)->get(arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - Box *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:BoxArray_set",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_set" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BoxArray_set" "', argument " "3"" of type '" "Box &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_set" "', argument " "3"" of type '" "Box &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - (arg1)->set(arg2,*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_maxSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_maxSize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (BoxArray *) &(arg1)->maxSize(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_maxSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_maxSize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (BoxArray *) &(arg1)->maxSize((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_maxSize__SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BoxArray_maxSize__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'BoxArray_maxSize'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::maxSize(int)\n" - " BoxArray::maxSize(IntVect const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_ok" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (bool)((BoxArray const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_isDisjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_isDisjoint",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_isDisjoint" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (bool)((BoxArray const *)arg1)->isDisjoint(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((IntVect const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((BoxArray const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_2(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'BoxArray_contains'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::contains(IntVect const &) const\n" - " BoxArray::contains(Box const &) const\n" - " BoxArray::contains(BoxArray const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_minimalBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_minimalBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_minimalBox" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (arg1)->minimalBox(); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_refine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_refine",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_refine" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_refine" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->refine(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_coarsen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_coarsen",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_coarsen" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_coarsen" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->coarsen(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___getitem__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = BoxArray___getitem__(arg1,arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_complementIn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_complementIn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_complementIn" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_complementIn" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_complementIn" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = BoxArray_complementIn(arg1,(Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___and__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___and__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___and__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray___and__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = BoxArray___and__(arg1,(BoxArray const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___or__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___or__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___or__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___or__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray___or__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = BoxArray___or__(arg1,(BoxArray const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___len__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (int)BoxArray___len__(arg1); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___str__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = BoxArray_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___cmp__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___cmp__" "', argument " "2"" of type '" "BoxArray const *""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = (int)BoxArray___cmp__(arg1,(BoxArray const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *BoxArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_BoxArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->incr(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (swig::SwigPyIterator *)(arg1)->incr(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator_incr__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator_incr__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n" - " Possible C/C++ prototypes are:\n" - " swig::SwigPyIterator::incr(size_t)\n" - " swig::SwigPyIterator::incr()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->decr(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (swig::SwigPyIterator *)(arg1)->decr(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator_decr__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator_decr__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n" - " Possible C/C++ prototypes are:\n" - " swig::SwigPyIterator::decr(size_t)\n" - " swig::SwigPyIterator::decr()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - ptrdiff_t result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - try { - result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); - } - catch(std::invalid_argument &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; - } - - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - try { - result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); - } - catch(std::invalid_argument &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; - } - - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->next(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->__next__(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->previous(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->advance(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - ptrdiff_t result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator___sub____SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator___sub____SWIG_0(self, args); - } - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_MultiFab__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - MultiFab *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:new_MultiFab",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MultiFab" "', argument " "1"" of type '" "BoxArray const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MultiFab" "', argument " "1"" of type '" "BoxArray const &""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiFab" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MultiFab" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (MultiFab *)new MultiFab((BoxArray const &)*arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiFab, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MultiFab__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_MultiFab")) SWIG_fail; - result = (MultiFab *)new MultiFab(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiFab, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MultiFab(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_MultiFab__SWIG_1(self, args); - } - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_MultiFab__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MultiFab'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::MultiFab(BoxArray const &,int,int)\n" - " MultiFab::MultiFab()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_MultiFab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_MultiFab",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiFab" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - BoxArray *arg2 = 0 ; - int arg3 ; - int arg4 ; - FabAlloc arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - void *argp5 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_define",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_define" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_define" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_define" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - { - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_FabAlloc, 0 | 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MultiFab_define" "', argument " "5"" of type '" "FabAlloc""'"); - } - if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "5"" of type '" "FabAlloc""'"); - } else { - FabAlloc * temp = reinterpret_cast< FabAlloc * >(argp5); - arg5 = *temp; - if (SWIG_IsNewObj(res5)) delete temp; - } - } - MultiFab_define__SWIG_0(arg1,(BoxArray const &)*arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - BoxArray *arg2 = 0 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_define",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_define" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_define" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_define" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - MultiFab_define__SWIG_0(arg1,(BoxArray const &)*arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_define__SWIG_1(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_FabAlloc, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_define__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_define'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::define(BoxArray const &,int,int,FabAlloc)\n" - " MultiFab::define(BoxArray const &,int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_ok" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (bool)((MultiFab const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_nGrow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_nGrow",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_nGrow" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->nGrow(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_boxArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_boxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_boxArray" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (BoxArray *) &((MultiFab const *)arg1)->boxArray(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_size" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_nComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_nComp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_nComp" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->nComp(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_min",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_min" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_min" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((MultiFab const *)arg1)->min(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_min" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((MultiFab const *)arg1)->min(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_min__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_min__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_min'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::min(int,int) const\n" - " MultiFab::min(int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_max",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_max" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_max" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((MultiFab const *)arg1)->max(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_max" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((MultiFab const *)arg1)->max(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_max__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_max__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_max'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::max(int,int) const\n" - " MultiFab::max(int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - MultiFab *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_copy",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_copy" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_copy" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_copy" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - (arg1)->copy(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_setVal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setVal(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - int arg6 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "MultiFab_setVal" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5,arg6); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_setVal",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->setVal(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[7]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 6) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_5(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_6(self, args); - } - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_2(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_4(self, args); - } - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_1(self, args); - } - } - } - } - } - } - if (argc == 6) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_3(self, args); - } - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_setVal'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::setVal(double)\n" - " MultiFab::setVal(double,int,int,int)\n" - " MultiFab::setVal(double,int,int)\n" - " MultiFab::setVal(double,Box const &,int,int,int)\n" - " MultiFab::setVal(double,Box const &,int,int)\n" - " MultiFab::setVal(double,int)\n" - " MultiFab::setVal(double,Box const &,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_setBndry",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setBndry" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setBndry" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setBndry(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setBndry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setBndry" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setBndry" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setBndry" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setBndry" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setBndry(arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setBndry__SWIG_0(self, args); - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setBndry__SWIG_1(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_setBndry'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::setBndry(double)\n" - " MultiFab::setBndry(double,int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_FillBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_FillBoundary" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->FillBoundary(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - bool arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_FillBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_FillBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - (arg1)->FillBoundary(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_FillBoundary",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->FillBoundary(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_FillBoundary",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - (arg1)->FillBoundary(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_3(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_0(self, args); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_FillBoundary'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::FillBoundary(int,int)\n" - " MultiFab::FillBoundary(bool,bool)\n" - " MultiFab::FillBoundary(bool)\n" - " MultiFab::FillBoundary()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_sum",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_sum" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)MultiFab_sum__SWIG_0((MultiFab const *)arg1,arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_sum",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_sum" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (double)MultiFab_sum__SWIG_0((MultiFab const *)arg1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_sum__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_sum__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_sum'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::sum(int) const\n" - " MultiFab::sum() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_writeOut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_writeOut",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_writeOut" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_writeOut" "', argument " "2"" of type '" "char *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - MultiFab_writeOut(arg1,arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_copyComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - MultiFab *arg2 = (MultiFab *) 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_copyComp",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_copyComp" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_copyComp" "', argument " "2"" of type '" "MultiFab *""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_copyComp" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_copyComp" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_copyComp" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - MultiFab_copyComp(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab___getitem__" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (FArrayBox *)MultiFab___getitem__(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MultiFab_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_MultiFab, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_RealBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Real *arg1 ; - Real *arg2 ; - PyArrayObject *array1 = NULL ; - int is_new_object1 = 0 ; - PyArrayObject *array2 = NULL ; - int is_new_object2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - RealBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_RealBox",&obj0,&obj1)) SWIG_fail; - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array1 = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, - &is_new_object1); - if (!array1 || !require_dimensions(array1, 1) || - !require_size(array1, size, 1)) SWIG_fail; - arg1 = (double *) array_data(array1); - } - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array2 = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, - &is_new_object2); - if (!array2 || !require_dimensions(array2, 1) || - !require_size(array2, size, 1)) SWIG_fail; - arg2 = (double *) array_data(array2); - } - result = (RealBox *)new RealBox(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RealBox, SWIG_POINTER_NEW | 0 ); - { - if (is_new_object1 && array1) - { - Py_DECREF(array1); - } - } - { - if (is_new_object2 && array2) - { - Py_DECREF(array2); - } - } - return resultobj; -fail: - { - if (is_new_object1 && array1) - { - Py_DECREF(array1); - } - } - { - if (is_new_object2 && array2) - { - Py_DECREF(array2); - } - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RealBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - RealBox *arg1 = (RealBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_RealBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RealBox, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RealBox" "', argument " "1"" of type '" "RealBox *""'"); - } - arg1 = reinterpret_cast< RealBox * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RealBox_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_RealBox, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - RealBox *arg2 = (RealBox *) 0 ; - int arg3 ; - int *arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyArrayObject *array4 = NULL ; - int is_new_object4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - Geometry *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:new_Geometry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Geometry" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Geometry" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_RealBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "RealBox const *""'"); - } - arg2 = reinterpret_cast< RealBox * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Geometry" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array4 = obj_to_array_contiguous_allow_conversion(obj3, NPY_INT, - &is_new_object4); - if (!array4 || !require_dimensions(array4, 1) || - !require_size(array4, size, 1)) SWIG_fail; - arg4 = (int *) array_data(array4); - } - result = (Geometry *)new Geometry((Box const &)*arg1,(RealBox const *)arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Geometry, SWIG_POINTER_NEW | 0 ); - { - if (is_new_object4 && array4) - { - Py_DECREF(array4); - } - } - return resultobj; -fail: - { - if (is_new_object4 && array4) - { - Py_DECREF(array4); - } - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - bool arg3 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:Geometry_FillPeriodicBoundary",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - (arg1)->FillPeriodicBoundary(*arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Geometry_FillPeriodicBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - (arg1)->FillPeriodicBoundary(*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_FillPeriodicBoundary",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - (arg1)->FillPeriodicBoundary(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_0(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Geometry_FillPeriodicBoundary'.\n" - " Possible C/C++ prototypes are:\n" - " Geometry::FillPeriodicBoundary(MultiFab &,bool,bool)\n" - " Geometry::FillPeriodicBoundary(MultiFab &,bool)\n" - " Geometry::FillPeriodicBoundary(MultiFab &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Geometry",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Geometry, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"StartParallel", _wrap_StartParallel, METH_VARARGS, NULL}, - { (char *)"rank", _wrap_rank, METH_VARARGS, NULL}, - { (char *)"size", _wrap_size, METH_VARARGS, NULL}, - { (char *)"ReduceRealMax", _wrap_ReduceRealMax, METH_VARARGS, NULL}, - { (char *)"open_ifstream", _wrap_open_ifstream, METH_VARARGS, NULL}, - { (char *)"open_ofstream", _wrap_open_ofstream, METH_VARARGS, NULL}, - { (char *)"close_ofstream", _wrap_close_ofstream, METH_VARARGS, NULL}, - { (char *)"close_ifstream", _wrap_close_ifstream, METH_VARARGS, NULL}, - { (char *)"new_IntVect", _wrap_new_IntVect, METH_VARARGS, NULL}, - { (char *)"IntVect_shift", _wrap_IntVect_shift, METH_VARARGS, NULL}, - { (char *)"IntVect_writeOn", _wrap_IntVect_writeOn, METH_VARARGS, NULL}, - { (char *)"IntVect_read", _wrap_IntVect_read, METH_VARARGS, NULL}, - { (char *)"IntVect___getitem__", _wrap_IntVect___getitem__, METH_VARARGS, NULL}, - { (char *)"IntVect___len__", _wrap_IntVect___len__, METH_VARARGS, NULL}, - { (char *)"IntVect___setitem__", _wrap_IntVect___setitem__, METH_VARARGS, NULL}, - { (char *)"IntVect___cmp__", _wrap_IntVect___cmp__, METH_VARARGS, NULL}, - { (char *)"IntVect___str__", _wrap_IntVect___str__, METH_VARARGS, NULL}, - { (char *)"IntVect_TheZeroVector", _wrap_IntVect_TheZeroVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheUnitVector", _wrap_IntVect_TheUnitVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheNodeVector", _wrap_IntVect_TheNodeVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheCellVector", _wrap_IntVect_TheCellVector, METH_VARARGS, NULL}, - { (char *)"delete_IntVect", _wrap_delete_IntVect, METH_VARARGS, NULL}, - { (char *)"IntVect_swigregister", IntVect_swigregister, METH_VARARGS, NULL}, - { (char *)"new_Box", _wrap_new_Box, METH_VARARGS, NULL}, - { (char *)"Box_smallEnd", _wrap_Box_smallEnd, METH_VARARGS, NULL}, - { (char *)"Box_bigEnd", _wrap_Box_bigEnd, METH_VARARGS, NULL}, - { (char *)"Box_type", _wrap_Box_type, METH_VARARGS, NULL}, - { (char *)"Box_size", _wrap_Box_size, METH_VARARGS, NULL}, - { (char *)"Box_ok", _wrap_Box_ok, METH_VARARGS, NULL}, - { (char *)"Box_contains", _wrap_Box_contains, METH_VARARGS, NULL}, - { (char *)"Box_intersects", _wrap_Box_intersects, METH_VARARGS, NULL}, - { (char *)"Box_sameSize", _wrap_Box_sameSize, METH_VARARGS, NULL}, - { (char *)"Box_sameType", _wrap_Box_sameType, METH_VARARGS, NULL}, - { (char *)"Box_cellCentered", _wrap_Box_cellCentered, METH_VARARGS, NULL}, - { (char *)"Box_numPts", _wrap_Box_numPts, METH_VARARGS, NULL}, - { (char *)"Box_volume", _wrap_Box_volume, METH_VARARGS, NULL}, - { (char *)"Box_index", _wrap_Box_index, METH_VARARGS, NULL}, - { (char *)"Box_setSmall", _wrap_Box_setSmall, METH_VARARGS, NULL}, - { (char *)"Box_setBig", _wrap_Box_setBig, METH_VARARGS, NULL}, - { (char *)"Box_shift", _wrap_Box_shift, METH_VARARGS, NULL}, - { (char *)"Box_shiftHalf", _wrap_Box_shiftHalf, METH_VARARGS, NULL}, - { (char *)"Box_convert", _wrap_Box_convert, METH_VARARGS, NULL}, - { (char *)"Box_surroundingNodes", _wrap_Box_surroundingNodes, METH_VARARGS, NULL}, - { (char *)"Box_enclosedCells", _wrap_Box_enclosedCells, METH_VARARGS, NULL}, - { (char *)"Box_minBox", _wrap_Box_minBox, METH_VARARGS, NULL}, - { (char *)"Box_chop", _wrap_Box_chop, METH_VARARGS, NULL}, - { (char *)"Box_grow", _wrap_Box_grow, METH_VARARGS, NULL}, - { (char *)"Box_growLo", _wrap_Box_growLo, METH_VARARGS, NULL}, - { (char *)"Box_growHi", _wrap_Box_growHi, METH_VARARGS, NULL}, - { (char *)"Box_refine", _wrap_Box_refine, METH_VARARGS, NULL}, - { (char *)"Box_coarsen", _wrap_Box_coarsen, METH_VARARGS, NULL}, - { (char *)"Box_next", _wrap_Box_next, METH_VARARGS, NULL}, - { (char *)"Box_read", _wrap_Box_read, METH_VARARGS, NULL}, - { (char *)"Box_write", _wrap_Box_write, METH_VARARGS, NULL}, - { (char *)"Box___and__", _wrap_Box___and__, METH_VARARGS, NULL}, - { (char *)"Box_writeOn", _wrap_Box_writeOn, METH_VARARGS, NULL}, - { (char *)"Box___str__", _wrap_Box___str__, METH_VARARGS, NULL}, - { (char *)"Box___cmp__", _wrap_Box___cmp__, METH_VARARGS, NULL}, - { (char *)"delete_Box", _wrap_delete_Box, METH_VARARGS, NULL}, - { (char *)"Box_swigregister", Box_swigregister, METH_VARARGS, NULL}, - { (char *)"new_FArrayBox", _wrap_new_FArrayBox, METH_VARARGS, NULL}, - { (char *)"delete_FArrayBox", _wrap_delete_FArrayBox, METH_VARARGS, NULL}, - { (char *)"FArrayBox_box", _wrap_FArrayBox_box, METH_VARARGS, NULL}, - { (char *)"FArrayBox_nComp", _wrap_FArrayBox_nComp, METH_VARARGS, NULL}, - { (char *)"FArrayBox_writeOn", _wrap_FArrayBox_writeOn, METH_VARARGS, NULL}, - { (char *)"FArrayBox_norm", _wrap_FArrayBox_norm, METH_VARARGS, NULL}, - { (char *)"FArrayBox_copy", _wrap_FArrayBox_copy, METH_VARARGS, NULL}, - { (char *)"FArrayBox_readFrom", _wrap_FArrayBox_readFrom, METH_VARARGS, NULL}, - { (char *)"FArrayBox___str__", _wrap_FArrayBox___str__, METH_VARARGS, NULL}, - { (char *)"FArrayBox_setVal", _wrap_FArrayBox_setVal, METH_VARARGS, NULL}, - { (char *)"FArrayBox_min", _wrap_FArrayBox_min, METH_VARARGS, NULL}, - { (char *)"FArrayBox_max", _wrap_FArrayBox_max, METH_VARARGS, NULL}, - { (char *)"FArrayBox_minIndex", _wrap_FArrayBox_minIndex, METH_VARARGS, NULL}, - { (char *)"FArrayBox_maxIndex", _wrap_FArrayBox_maxIndex, METH_VARARGS, NULL}, - { (char *)"FArrayBox_sum", _wrap_FArrayBox_sum, METH_VARARGS, NULL}, - { (char *)"FArrayBox_get_array", _wrap_FArrayBox_get_array, METH_VARARGS, NULL}, - { (char *)"FArrayBox_valIV", _wrap_FArrayBox_valIV, METH_VARARGS, NULL}, - { (char *)"FArrayBox_setValIV", _wrap_FArrayBox_setValIV, METH_VARARGS, NULL}, - { (char *)"FArrayBox_floor", _wrap_FArrayBox_floor, METH_VARARGS, NULL}, - { (char *)"FArrayBox___add__", _wrap_FArrayBox___add__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___sub__", _wrap_FArrayBox___sub__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___mul__", _wrap_FArrayBox___mul__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___div__", _wrap_FArrayBox___div__, METH_VARARGS, NULL}, - { (char *)"FArrayBox_swigregister", FArrayBox_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_BoxArray", _wrap_delete_BoxArray, METH_VARARGS, NULL}, - { (char *)"new_BoxArray", _wrap_new_BoxArray, METH_VARARGS, NULL}, - { (char *)"BoxArray_resize", _wrap_BoxArray_resize, METH_VARARGS, NULL}, - { (char *)"BoxArray_define", _wrap_BoxArray_define, METH_VARARGS, NULL}, - { (char *)"BoxArray_writeOn", _wrap_BoxArray_writeOn, METH_VARARGS, NULL}, - { (char *)"BoxArray_readFrom", _wrap_BoxArray_readFrom, METH_VARARGS, NULL}, - { (char *)"BoxArray_size", _wrap_BoxArray_size, METH_VARARGS, NULL}, - { (char *)"BoxArray_get", _wrap_BoxArray_get, METH_VARARGS, NULL}, - { (char *)"BoxArray_set", _wrap_BoxArray_set, METH_VARARGS, NULL}, - { (char *)"BoxArray_maxSize", _wrap_BoxArray_maxSize, METH_VARARGS, NULL}, - { (char *)"BoxArray_ok", _wrap_BoxArray_ok, METH_VARARGS, NULL}, - { (char *)"BoxArray_isDisjoint", _wrap_BoxArray_isDisjoint, METH_VARARGS, NULL}, - { (char *)"BoxArray_contains", _wrap_BoxArray_contains, METH_VARARGS, NULL}, - { (char *)"BoxArray_minimalBox", _wrap_BoxArray_minimalBox, METH_VARARGS, NULL}, - { (char *)"BoxArray_refine", _wrap_BoxArray_refine, METH_VARARGS, NULL}, - { (char *)"BoxArray_coarsen", _wrap_BoxArray_coarsen, METH_VARARGS, NULL}, - { (char *)"BoxArray___getitem__", _wrap_BoxArray___getitem__, METH_VARARGS, NULL}, - { (char *)"BoxArray_complementIn", _wrap_BoxArray_complementIn, METH_VARARGS, NULL}, - { (char *)"BoxArray___and__", _wrap_BoxArray___and__, METH_VARARGS, NULL}, - { (char *)"BoxArray___or__", _wrap_BoxArray___or__, METH_VARARGS, NULL}, - { (char *)"BoxArray___len__", _wrap_BoxArray___len__, METH_VARARGS, NULL}, - { (char *)"BoxArray___str__", _wrap_BoxArray___str__, METH_VARARGS, NULL}, - { (char *)"BoxArray___cmp__", _wrap_BoxArray___cmp__, METH_VARARGS, NULL}, - { (char *)"BoxArray_swigregister", BoxArray_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL}, - { (char *)"new_MultiFab", _wrap_new_MultiFab, METH_VARARGS, NULL}, - { (char *)"delete_MultiFab", _wrap_delete_MultiFab, METH_VARARGS, NULL}, - { (char *)"MultiFab_define", _wrap_MultiFab_define, METH_VARARGS, NULL}, - { (char *)"MultiFab_ok", _wrap_MultiFab_ok, METH_VARARGS, NULL}, - { (char *)"MultiFab_nGrow", _wrap_MultiFab_nGrow, METH_VARARGS, NULL}, - { (char *)"MultiFab_boxArray", _wrap_MultiFab_boxArray, METH_VARARGS, NULL}, - { (char *)"MultiFab_size", _wrap_MultiFab_size, METH_VARARGS, NULL}, - { (char *)"MultiFab_nComp", _wrap_MultiFab_nComp, METH_VARARGS, NULL}, - { (char *)"MultiFab_min", _wrap_MultiFab_min, METH_VARARGS, NULL}, - { (char *)"MultiFab_max", _wrap_MultiFab_max, METH_VARARGS, NULL}, - { (char *)"MultiFab_copy", _wrap_MultiFab_copy, METH_VARARGS, NULL}, - { (char *)"MultiFab_setVal", _wrap_MultiFab_setVal, METH_VARARGS, NULL}, - { (char *)"MultiFab_setBndry", _wrap_MultiFab_setBndry, METH_VARARGS, NULL}, - { (char *)"MultiFab_FillBoundary", _wrap_MultiFab_FillBoundary, METH_VARARGS, NULL}, - { (char *)"MultiFab_sum", _wrap_MultiFab_sum, METH_VARARGS, NULL}, - { (char *)"MultiFab_writeOut", _wrap_MultiFab_writeOut, METH_VARARGS, NULL}, - { (char *)"MultiFab_copyComp", _wrap_MultiFab_copyComp, METH_VARARGS, NULL}, - { (char *)"MultiFab___getitem__", _wrap_MultiFab___getitem__, METH_VARARGS, NULL}, - { (char *)"MultiFab_swigregister", MultiFab_swigregister, METH_VARARGS, NULL}, - { (char *)"new_RealBox", _wrap_new_RealBox, METH_VARARGS, NULL}, - { (char *)"delete_RealBox", _wrap_delete_RealBox, METH_VARARGS, NULL}, - { (char *)"RealBox_swigregister", RealBox_swigregister, METH_VARARGS, NULL}, - { (char *)"new_Geometry", _wrap_new_Geometry, METH_VARARGS, NULL}, - { (char *)"Geometry_FillPeriodicBoundary", _wrap_Geometry_FillPeriodicBoundary, METH_VARARGS, NULL}, - { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, NULL}, - { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static swig_type_info _swigt__p_Box = {"_p_Box", "Box *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_BoxArray = {"_p_BoxArray", "BoxArray *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FArrayBox = {"_p_FArrayBox", "FArrayBox *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FabAlloc = {"_p_FabAlloc", "FabAlloc *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Geometry = {"_p_Geometry", "Geometry *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_IntVect = {"_p_IntVect", "IntVect *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_MultiFab = {"_p_MultiFab", "MultiFab *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_RealBox = {"_p_RealBox", "RealBox *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *|Real *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ifstream = {"_p_std__ifstream", "std::ifstream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__istream = {"_p_std__istream", "std::istream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ofstream = {"_p_std__ofstream", "std::ofstream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_Box, - &_swigt__p_BoxArray, - &_swigt__p_FArrayBox, - &_swigt__p_FabAlloc, - &_swigt__p_Geometry, - &_swigt__p_IntVect, - &_swigt__p_MultiFab, - &_swigt__p_RealBox, - &_swigt__p_char, - &_swigt__p_double, - &_swigt__p_std__ifstream, - &_swigt__p_std__invalid_argument, - &_swigt__p_std__istream, - &_swigt__p_std__ofstream, - &_swigt__p_std__ostream, - &_swigt__p_swig__SwigPyIterator, -}; - -static swig_cast_info _swigc__p_Box[] = { {&_swigt__p_Box, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_BoxArray[] = { {&_swigt__p_BoxArray, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FArrayBox[] = { {&_swigt__p_FArrayBox, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FabAlloc[] = { {&_swigt__p_FabAlloc, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Geometry[] = { {&_swigt__p_Geometry, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_IntVect[] = { {&_swigt__p_IntVect, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_MultiFab[] = { {&_swigt__p_MultiFab, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_RealBox[] = { {&_swigt__p_RealBox, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ifstream[] = { {&_swigt__p_std__ifstream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__istream[] = { {&_swigt__p_std__istream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ofstream[] = { {&_swigt__p_std__ofstream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_Box, - _swigc__p_BoxArray, - _swigc__p_FArrayBox, - _swigc__p_FabAlloc, - _swigc__p_Geometry, - _swigc__p_IntVect, - _swigc__p_MultiFab, - _swigc__p_RealBox, - _swigc__p_char, - _swigc__p_double, - _swigc__p_std__ifstream, - _swigc__p_std__invalid_argument, - _swigc__p_std__istream, - _swigc__p_std__ofstream, - _swigc__p_std__ostream, - _swigc__p_swig__SwigPyIterator, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -static swig_const_info swig_const_table[] = { -{0, 0, 0, 0.0, 0, 0}}; - -#ifdef __cplusplus -} -#endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif - -#if 0 -#define SWIGRUNTIME_DEBUG -#endif - - -SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int found, init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; - iter=module_head; - do { - if (iter==&swig_module) { - found=1; - break; - } - iter=iter->next; - } while (iter!= module_head); - - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void -SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -#if 0 -{ - /* c-mode */ -#endif -} -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError,"Unknown C global variable"); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError,"Unknown C global variable"); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&varlink_type) < 0) - return NULL; -#endif - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - strncpy(gv->name,name,size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch(constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ - - SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (c && (c = strstr(c, "swig_ptr: "))) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, - strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - -#ifdef __cplusplus -} -#endif - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -#endif - -SWIGEXPORT -#if PY_VERSION_HEX >= 0x03000000 -PyObject* -#else -void -#endif -SWIG_init(void) { - PyObject *m, *d, *md; -#if PY_VERSION_HEX >= 0x03000000 - static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 - PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, - NULL, - -1, - SwigMethods, - NULL, - NULL, - NULL, - NULL - }; -#endif - -#if defined(SWIGPYTHON_BUILTIN) - static SwigPyClientData SwigPyObject_clientdata = { - 0, 0, 0, 0, 0, 0, 0 - }; - static PyGetSetDef this_getset_def = { - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL - }; - static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own - }; - static PyGetSetDef thisown_getset_def = { - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure - }; - PyObject *metatype_args; - PyTypeObject *builtin_pytype; - int builtin_base_count; - swig_type_info *builtin_basetype; - PyObject *tuple; - PyGetSetDescrObject *static_getset; - PyTypeObject *metatype; - SwigPyClientData *cd; - PyObject *public_interface, *public_symbol; - PyObject *this_descr; - PyObject *thisown_descr; - int i; - - (void)builtin_pytype; - (void)builtin_base_count; - (void)builtin_basetype; - (void)tuple; - (void)static_getset; - - /* metatype is used to implement static member variables. */ - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); - assert(metatype_args); - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); - assert(metatype); - Py_DECREF(metatype_args); - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; - assert(PyType_Ready(metatype) >= 0); -#endif - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 - m = PyModule_Create(&SWIG_module); -#else - m = Py_InitModule((char *) SWIG_name, SwigMethods); -#endif - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - if (!cd) { - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); -# if PY_VERSION_HEX >= 0x03000000 - return NULL; -# else - return; -# endif - } - - /* All objects have a 'this' attribute */ - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); - (void)this_descr; - - /* All objects have a 'thisown' attribute */ - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); - (void)thisown_descr; - - public_interface = PyList_New(0); - public_symbol = 0; - (void)public_symbol; - - PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); - for (i = 0; SwigMethods[i].ml_name != NULL; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); - for (i = 0; swig_const_table[i].name != 0; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); -#endif - - SWIG_InstallConstants(d,swig_const_table); - - - import_array(); - - SWIG_Python_SetConstant(d, "BL_DIM",SWIG_From_int(static_cast< int >(1))); -#if PY_VERSION_HEX >= 0x03000000 - return m; -#else - return; -#endif -} - diff --git a/Src/Python/src/boxlib_wrap_2.cpp b/Src/Python/src/boxlib_wrap_2.cpp deleted file mode 100644 index 2401982ff..000000000 --- a/Src/Python/src/boxlib_wrap_2.cpp +++ /dev/null @@ -1,13863 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.11 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - -#define SWIGPYTHON -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE - - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - - -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG -#else -# include -#endif - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) -#define PyString_Check(name) PyBytes_Check(name) -#define PyString_FromString(x) PyUnicode_FromString(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) -#define PyString_AsString(str) PyBytes_AsString(str) -#define PyString_Size(str) PyBytes_Size(str) -#define PyString_InternFromString(key) PyUnicode_InternFromString(key) -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - -#ifdef __cplusplus -} -#endif - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) - -#ifdef SWIGPYTHON_BUILTIN -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) -#else -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) -#endif - -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) - -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -#if defined(SWIGPYTHON_BUILTIN) - -SWIGINTERN void -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { - PyObject *s = PyString_InternFromString(key); - PyList_Append(seq, s); - Py_DECREF(s); -} - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); - if (public_interface) - SwigPyBuiltin_AddPublicSymbol(public_interface, name); -} - -#else - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); -} - -#endif - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - if (min <= 1 && max >= 1) { - register int i; - objs[0] = args; - for (i = 1; i < max; ++i) { - objs[i] = 0; - } - return 2; - } - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - register int i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) - -#ifdef __cplusplus -extern "C" { -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; - PyTypeObject *pytype; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - data->pytype = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -#ifdef SWIGPYTHON_BUILTIN - PyObject *dict; -#endif -} SwigPyObject; - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { -# ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif -# if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -# else - PyString_ConcatAndDel(&repr,nrep); -# endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); - return res; -} - - -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); - -#ifdef SWIGPYTHON_BUILTIN -static swig_type_info *SwigPyObject_stype = 0; -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - SwigPyClientData *cd; - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - assert(cd); - assert(cd->pytype); - return cd->pytype; -} -#else -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); - return type; -} -#endif - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { -#ifdef SWIGPYTHON_BUILTIN - PyTypeObject *target_tp = SwigPyObject_type(); - if (PyType_IsSubtype(op->ob_type, target_tp)) - return 1; - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); -#else - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -#endif -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -SwigPyObject_TypeOnce(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpyobject_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpyobject_type) < 0) - return NULL; -#endif - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == SwigPyPacked_TypeOnce()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_TypeOnce(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpypacked_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpypacked_type) < 0) - return NULL; -#endif - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - PyObject *obj; - - if (SwigPyObject_Check(pyobj)) - return (SwigPyObject *) pyobj; - -#ifdef SWIGPYTHON_BUILTIN - (void)obj; -# ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - pyobj = PyWeakref_GET_OBJECT(pyobj); - if (pyobj && SwigPyObject_Check(pyobj)) - return (SwigPyObject*) pyobj; - } -# endif - return NULL; -#else - - obj = 0; - -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; -#endif -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - int res; - SwigPyObject *sobj; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; - - if (!obj) - return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { - if (ptr) - *ptr = 0; - return SWIG_OK; - } - - res = SWIG_ERROR; - - sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - res = SWIG_OK; - } else { - if (implicit_conv) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } - } - return res; -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } -#else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { - SwigPyClientData *clientdata; - PyObject * robj; - int own; - - if (!ptr) - return SWIG_Py_Void(); - - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - if (clientdata && clientdata->pytype) { - SwigPyObject *newobj; - if (flags & SWIG_BUILTIN_TP_INIT) { - newobj = (SwigPyObject*) self; - if (newobj->ptr) { - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); - while (newobj->next) - newobj = (SwigPyObject *) newobj->next; - newobj->next = next_self; - newobj = (SwigPyObject *)next_self; - } - } else { - newobj = PyObject_New(SwigPyObject, clientdata->pytype); - } - if (newobj) { - newobj->ptr = ptr; - newobj->ty = type; - newobj->own = own; - newobj->next = 0; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - return (PyObject*) newobj; - } - return SWIG_Py_Void(); - } - - assert(!(flags & SWIG_BUILTIN_TP_INIT)); - - robj = SwigPyObject_New(ptr, type, own); - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); - robj = inst; - } - return robj; -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else -# ifdef SWIGPY_USE_CAPSULE - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE -SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif -{ -#ifdef SWIGPY_USE_CAPSULE - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); - swig_this = NULL; -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); -#endif -#ifdef SWIGPY_USE_CAPSULE - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#endif -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { -#ifdef SWIGPY_USE_CAPSULE - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif - } else { - swig_module_info *swig_module = SWIG_GetModule(0); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE - obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : ""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - -#ifdef SWIGPYTHON_BUILTIN -SWIGRUNTIME int -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { - PyTypeObject *tp = obj->ob_type; - PyObject *descr; - PyObject *encoded_name; - descrsetfunc f; - int res = -1; - -# ifdef Py_USING_UNICODE - if (PyString_Check(name)) { - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); - if (!name) - return -1; - } else if (!PyUnicode_Check(name)) -# else - if (!PyString_Check(name)) -# endif - { - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); - return -1; - } else { - Py_INCREF(name); - } - - if (!tp->tp_dict) { - if (PyType_Ready(tp) < 0) - goto done; - } - - descr = _PyType_Lookup(tp, name); - f = NULL; - if (descr != NULL) - f = descr->ob_type->tp_descr_set; - if (!f) { - if (PyString_Check(name)) { - encoded_name = name; - Py_INCREF(name); - } else { - encoded_name = PyUnicode_AsUTF8String(name); - } - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); - } else { - res = f(descr, obj, value); - } - - done: - Py_DECREF(name); - return res; -} -#endif - - -#ifdef __cplusplus -} -#endif - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_Box swig_types[0] -#define SWIGTYPE_p_BoxArray swig_types[1] -#define SWIGTYPE_p_FArrayBox swig_types[2] -#define SWIGTYPE_p_FabAlloc swig_types[3] -#define SWIGTYPE_p_Geometry swig_types[4] -#define SWIGTYPE_p_IntVect swig_types[5] -#define SWIGTYPE_p_MultiFab swig_types[6] -#define SWIGTYPE_p_RealBox swig_types[7] -#define SWIGTYPE_p_char swig_types[8] -#define SWIGTYPE_p_double swig_types[9] -#define SWIGTYPE_p_std__ifstream swig_types[10] -#define SWIGTYPE_p_std__invalid_argument swig_types[11] -#define SWIGTYPE_p_std__istream swig_types[12] -#define SWIGTYPE_p_std__ofstream swig_types[13] -#define SWIGTYPE_p_std__ostream swig_types[14] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[15] -static swig_type_info *swig_types[17]; -static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif -#endif - -/*----------------------------------------------- - @(target):= _bl2.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__bl2 - -#else -# define SWIG_init init_bl2 - -#endif -#define SWIG_name "_bl2" - -#define SWIGVERSION 0x020011 -#define SWIG_VERSION SWIGVERSION - - -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) - - -#include - - -namespace swig { - class SwigPtr_PyObject { - protected: - PyObject *_obj; - - public: - SwigPtr_PyObject() :_obj(0) - { - } - - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) - { - Py_XINCREF(_obj); - } - - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) - { - if (initial_ref) { - Py_XINCREF(_obj); - } - } - - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) - { - Py_XINCREF(item._obj); - Py_XDECREF(_obj); - _obj = item._obj; - return *this; - } - - ~SwigPtr_PyObject() - { - Py_XDECREF(_obj); - } - - operator PyObject *() const - { - return _obj; - } - - PyObject *operator->() const - { - return _obj; - } - }; -} - - -namespace swig { - struct SwigVar_PyObject : SwigPtr_PyObject { - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } - - SwigVar_PyObject & operator = (PyObject* obj) - { - Py_XDECREF(_obj); - _obj = obj; - return *this; - } - }; -} - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SWIG_FILE_WITH_INIT - - -#ifndef SWIG_FILE_WITH_INIT -# define NO_IMPORT_ARRAY -#endif -#include "stdio.h" -#include - - -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} - - - void StartParallel() { - ParallelDescriptor::StartParallel(); - } - int rank() { - return ParallelDescriptor::MyProc(); - } - int size() { - return ParallelDescriptor::NProcs(); - } - Real ReduceRealMax (Real lval) { - Real rvar = lval; - ParallelDescriptor::ReduceRealMax(rvar); - return rvar; - } - - -SWIGINTERN int -SWIG_AsVal_double (PyObject *obj, double *val) -{ - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) *val = PyFloat_AsDouble(obj); - return SWIG_OK; - } else if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } -#endif - return res; -} - - - #define SWIG_From_double PyFloat_FromDouble - - - std::ifstream & open_ifstream(const char *filename) { - std::ifstream *infile = new std::ifstream(filename); - return *infile; - } - - -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - - -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 - if (PyUnicode_Check(obj)) -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - PyBytes_AsStringAndSize(obj, &cstr, &len); - if(alloc) *alloc = SWIG_NEWOBJ; -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } - else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif - *cptr = SWIG_Python_str_AsChar(obj); - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 - Py_XDECREF(obj); -#endif - return SWIG_OK; - } else { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - - - - - std::ofstream & open_ofstream(const char *filename) { - std::ofstream *outfile = new std::ofstream(filename); - return *outfile; - } - - - void close_ofstream(std::ofstream& str) { - str.close(); - } - - - void close_ifstream(std::ifstream & str) { - str.close(); - } - - -#include - - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - -#include - - -#include - - -SWIGINTERNINLINE int -SWIG_CanCastAsInteger(double *d, double min, double max) { - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff/summ; - if (reps < 8*DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) -{ - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< int >(v); - } - } - return res; -} - -SWIGINTERN void IntVect_writeOn(IntVect *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN void IntVect_read(IntVect *self,std::ifstream *ifs){ - *ifs >> *self; - } -SWIGINTERN int IntVect___getitem__(IntVect *self,int index){ - return (*self)[index]; - } -SWIGINTERN int IntVect___len__(IntVect volatile *self){ return BL_SPACEDIM; } -SWIGINTERN void IntVect___setitem__(IntVect *self,int index,int val){ - (*self).setVal(index,val); - } -SWIGINTERN int IntVect___cmp__(IntVect *self,IntVect const *other){ - if( (*self) == (*other) ) { - return 0; - } - if( (*self) <= (*other) ) { - return -1; - } - return 1; - } -SWIGINTERN std::string IntVect_display(IntVect *self){ - std::ostringstream str; - str << *self; - return str.str(); - } - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); -#else - return PyString_FromStringAndSize(carray, static_cast< int >(size)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - -SWIGINTERNINLINE PyObject* - SWIG_From_bool (bool value) -{ - return PyBool_FromLong(value ? 1 : 0); -} - - - #define SWIG_From_long PyLong_FromLong - -SWIGINTERN void Box_read(Box *self,std::ifstream *ifs){ - *ifs >> *self; - } -SWIGINTERN void Box_write(Box *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN Box Box___and__(Box *self,Box *right){ - Box result; - result = *self & *right; - return result; - } -SWIGINTERN void Box_writeOn(Box *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN std::string Box_display(Box *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN int Box___cmp__(Box *self,Box const *other){ - if(*self == *other) return 0; - else if( self->smallEnd().lexLT(other->smallEnd())){ - return 1; - } - else { - return -1; - } - } -SWIGINTERN std::string FArrayBox_display(FArrayBox *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN PyObject *FArrayBox_get_array(FArrayBox *self){ - double *ptr = self->dataPtr(); - PyObject *arr = 0; - npy_intp dims[BL_SPACEDIM+1]; - - const IntVect size = self->box().size(); - for (int i=0; inComp(); - arr = PyArray_NewFromDescr(&PyArray_Type, - PyArray_DescrFromType(NPY_DOUBLE), BL_SPACEDIM+1, dims, NULL, - ptr, NPY_FORTRAN|NPY_WRITEABLE, NULL); - - Py_INCREF(arr); - return arr; - } -SWIGINTERN double FArrayBox_valIV(FArrayBox *self,IntVect const *p,int n){ - return (*self)(*p,n); - } -SWIGINTERN void FArrayBox_setValIV__SWIG_0(FArrayBox *self,double x,IntVect const *p,int n=1){ - (*self)(*p,n) = x; - } -SWIGINTERN void FArrayBox_floor(FArrayBox *self,double val){ - Box bx = self->box(); - int nc = self->nComp(); - for (IntVect iv=bx.smallEnd(), End=bx.bigEnd(); iv<=End; bx.next(iv)) { - for (int n=0; nbox(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) += *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___sub__(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) -= *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___mul____SWIG_0(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) *= *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___mul____SWIG_1(FArrayBox *self,double right){ - Box bx = self->box(); - int nvar = self->nComp(); - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - result->mult(right); - return result; - } -SWIGINTERN FArrayBox *FArrayBox___div__(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) /= *right; - return result; - } -SWIGINTERN Box BoxArray___getitem__(BoxArray *self,int index){ - return (*self)[index]; - } -SWIGINTERN BoxArray BoxArray_complementIn(BoxArray *self,Box const &b){ - return BoxLib::complementIn(b,*self); - } -SWIGINTERN BoxArray BoxArray___and__(BoxArray *self,BoxArray const &right){ - BoxArray res = BoxLib::intersect(*self,right); - return res; - } -SWIGINTERN BoxArray BoxArray___or__(BoxArray *self,BoxArray const &right){ - BoxList bl(*self); - bl.join(BoxList(right)); - return BoxArray(bl); - } -SWIGINTERN int BoxArray___len__(BoxArray *self){ return (*self).size(); } -SWIGINTERN std::string BoxArray_display(BoxArray *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN int BoxArray___cmp__(BoxArray *self,BoxArray const *other){ - if( (*self)==(*other)) return 0; - else return 1; - } - -#include - -#if PY_VERSION_HEX >= 0x03020000 -# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) -#else -# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) -#endif - - -#include - - -#if defined(__GNUC__) -# if __GNUC__ == 2 && __GNUC_MINOR <= 96 -# define SWIG_STD_NOMODERN_STL -# endif -#endif - - -#include -#include -#include - - - #include - - -namespace swig { - struct stop_iteration { - }; - - struct SwigPyIterator { - private: - SwigPtr_PyObject _seq; - - protected: - SwigPyIterator(PyObject *seq) : _seq(seq) - { - } - - public: - virtual ~SwigPyIterator() {} - - // Access iterator method, required by Python - virtual PyObject *value() const = 0; - - // Forward iterator method, required by Python - virtual SwigPyIterator *incr(size_t n = 1) = 0; - - // Backward iterator method, very common in C++, but not required in Python - virtual SwigPyIterator *decr(size_t /*n*/ = 1) - { - throw stop_iteration(); - } - - // Random access iterator methods, but not required in Python - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const - { - throw std::invalid_argument("operation not supported"); - } - - virtual bool equal (const SwigPyIterator &/*x*/) const - { - throw std::invalid_argument("operation not supported"); - } - - // C++ common/needed methods - virtual SwigPyIterator *copy() const = 0; - - PyObject *next() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads - PyObject *obj = value(); - incr(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; - } - - /* Make an alias for Python 3.x */ - PyObject *__next__() - { - return next(); - } - - PyObject *previous() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads - decr(); - PyObject *obj = value(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; - } - - SwigPyIterator *advance(ptrdiff_t n) - { - return (n > 0) ? incr(n) : decr(-n); - } - - bool operator == (const SwigPyIterator& x) const - { - return equal(x); - } - - bool operator != (const SwigPyIterator& x) const - { - return ! operator==(x); - } - - SwigPyIterator& operator += (ptrdiff_t n) - { - return *advance(n); - } - - SwigPyIterator& operator -= (ptrdiff_t n) - { - return *advance(-n); - } - - SwigPyIterator* operator + (ptrdiff_t n) const - { - return copy()->advance(n); - } - - SwigPyIterator* operator - (ptrdiff_t n) const - { - return copy()->advance(-n); - } - - ptrdiff_t operator - (const SwigPyIterator& x) const - { - return x.distance(*this); - } - - static swig_type_info* descriptor() { - static int init = 0; - static swig_type_info* desc = 0; - if (!init) { - desc = SWIG_TypeQuery("swig::SwigPyIterator *"); - init = 1; - } - return desc; - } - }; - -#if defined(SWIGPYTHON_BUILTIN) - inline PyObject* make_output_iterator_builtin (PyObject *pyself) - { - Py_INCREF(pyself); - return pyself; - } -#endif -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); -#if PY_VERSION_HEX >= 0x03000000 - { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (v < 0) { - return SWIG_OverflowError; - } - } else { - PyErr_Clear(); - } - } -#endif - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) *val = (unsigned long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); - return res; -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_ptrdiff_t (ptrdiff_t value) -{ - return SWIG_From_long (static_cast< long >(value)); -} - - -SWIGINTERNINLINE int -SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) -{ - long v; - int res = SWIG_AsVal_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); - return res; -} - - -#include - - -#include - - -#include - - -#include - - -#include - -SWIGINTERN void MultiFab_define__SWIG_0(MultiFab *self,BoxArray const &bxs,int nvar,int ngrow,FabAlloc mem_mode=Fab_allocate){ - self->FabArray::define(bxs,nvar,ngrow,mem_mode); - } - -SWIGINTERN int -SWIG_AsVal_bool (PyObject *obj, bool *val) -{ - int r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; -} - -SWIGINTERN double MultiFab_sum__SWIG_0(MultiFab const *self,int comp=0){ - const BoxArray &ba = self->boxArray(); - double retval = 0; - for(MFIter mfi(*self);mfi.isValid(); ++mfi){ - int idx = mfi.index(); - const Box &bx = ba[idx]; - const FArrayBox &fab = (*self)[mfi]; - retval += fab.sum(bx,comp,1); - } - ParallelDescriptor::ReduceRealSum(retval); - return retval; - } -SWIGINTERN void MultiFab_writeOut(MultiFab *self,char *name){ - std::string str(name); - VisMF::Write(*self,str,VisMF::OneFilePerCPU); - } -SWIGINTERN void MultiFab_copyComp(MultiFab *self,MultiFab *src,int src_comp,int dest_comp,int num_comp){ - self->copy(*src,src_comp,dest_comp,num_comp); - } -SWIGINTERN FArrayBox *MultiFab___getitem__(MultiFab *self,int index){ - if ((*self).DistributionMap()[index]==ParallelDescriptor::MyProc() ) { - return &((*self)[index]); - } - return 0; - } - -/* Support older NumPy data type names -*/ -#if NDARRAY_VERSION < 0x01000000 -#define NPY_BOOL PyArray_BOOL -#define NPY_BYTE PyArray_BYTE -#define NPY_UBYTE PyArray_UBYTE -#define NPY_SHORT PyArray_SHORT -#define NPY_USHORT PyArray_USHORT -#define NPY_INT PyArray_INT -#define NPY_UINT PyArray_UINT -#define NPY_LONG PyArray_LONG -#define NPY_ULONG PyArray_ULONG -#define NPY_LONGLONG PyArray_LONGLONG -#define NPY_ULONGLONG PyArray_ULONGLONG -#define NPY_FLOAT PyArray_FLOAT -#define NPY_DOUBLE PyArray_DOUBLE -#define NPY_LONGDOUBLE PyArray_LONGDOUBLE -#define NPY_CFLOAT PyArray_CFLOAT -#define NPY_CDOUBLE PyArray_CDOUBLE -#define NPY_CLONGDOUBLE PyArray_CLONGDOUBLE -#define NPY_OBJECT PyArray_OBJECT -#define NPY_STRING PyArray_STRING -#define NPY_UNICODE PyArray_UNICODE -#define NPY_VOID PyArray_VOID -#define NPY_NTYPES PyArray_NTYPES -#define NPY_NOTYPE PyArray_NOTYPE -#define NPY_CHAR PyArray_CHAR -#define NPY_USERDEF PyArray_USERDEF -#define npy_intp intp - -#define NPY_MAX_BYTE MAX_BYTE -#define NPY_MIN_BYTE MIN_BYTE -#define NPY_MAX_UBYTE MAX_UBYTE -#define NPY_MAX_SHORT MAX_SHORT -#define NPY_MIN_SHORT MIN_SHORT -#define NPY_MAX_USHORT MAX_USHORT -#define NPY_MAX_INT MAX_INT -#define NPY_MIN_INT MIN_INT -#define NPY_MAX_UINT MAX_UINT -#define NPY_MAX_LONG MAX_LONG -#define NPY_MIN_LONG MIN_LONG -#define NPY_MAX_ULONG MAX_ULONG -#define NPY_MAX_LONGLONG MAX_LONGLONG -#define NPY_MIN_LONGLONG MIN_LONGLONG -#define NPY_MAX_ULONGLONG MAX_ULONGLONG -#define NPY_MAX_INTP MAX_INTP -#define NPY_MIN_INTP MIN_INTP - -#define NPY_FARRAY FARRAY -#define NPY_F_CONTIGUOUS F_CONTIGUOUS -#endif - - -/* Macros to extract array attributes. - */ -#define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) -#define array_type(a) (int)(PyArray_TYPE(a)) -#define array_numdims(a) (((PyArrayObject *)a)->nd) -#define array_dimensions(a) (((PyArrayObject *)a)->dimensions) -#define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) -#define array_data(a) (((PyArrayObject *)a)->data) -#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) -#define array_is_native(a) (PyArray_ISNOTSWAPPED(a)) -#define array_is_fortran(a) (PyArray_ISFORTRAN(a)) - - - /* Given a PyObject, return a string describing its type. - */ - const char* pytype_string(PyObject* py_obj) { - if (py_obj == NULL ) return "C NULL value"; - if (py_obj == Py_None ) return "Python None" ; - if (PyCallable_Check(py_obj)) return "callable" ; - if (PyString_Check( py_obj)) return "string" ; - if (PyInt_Check( py_obj)) return "int" ; - if (PyFloat_Check( py_obj)) return "float" ; - if (PyDict_Check( py_obj)) return "dict" ; - if (PyList_Check( py_obj)) return "list" ; - if (PyTuple_Check( py_obj)) return "tuple" ; - if (PyFile_Check( py_obj)) return "file" ; - if (PyModule_Check( py_obj)) return "module" ; - if (PyInstance_Check(py_obj)) return "instance" ; - - return "unkown type"; - } - - /* Given a NumPy typecode, return a string describing the type. - */ - const char* typecode_string(int typecode) { - static const char* type_names[25] = {"bool", "byte", "unsigned byte", - "short", "unsigned short", "int", - "unsigned int", "long", "unsigned long", - "long long", "unsigned long long", - "float", "double", "long double", - "complex float", "complex double", - "complex long double", "object", - "string", "unicode", "void", "ntypes", - "notype", "char", "unknown"}; - return typecode < 24 ? type_names[typecode] : type_names[24]; - } - - /* Make sure input has correct numpy type. Allow character and byte - * to match. Also allow int and long to match. This is deprecated. - * You should use PyArray_EquivTypenums() instead. - */ - int type_match(int actual_type, int desired_type) { - return PyArray_EquivTypenums(actual_type, desired_type); - } - - - /* Given a PyObject pointer, cast it to a PyArrayObject pointer if - * legal. If not, set the python error string appropriately and - * return NULL. - */ - PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) - { - PyArrayObject* ary = NULL; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input), typecode))) - { - ary = (PyArrayObject*) input; - } - else if is_array(input) - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = typecode_string(array_type(input)); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. Array of type '%s' given", - desired_type, actual_type); - ary = NULL; - } - else - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = pytype_string(input); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. A '%s' was given", - desired_type, actual_type); - ary = NULL; - } - return ary; - } - - /* Convert the given PyObject to a NumPy array with the given - * typecode. On success, return a valid PyArrayObject* with the - * correct type. On failure, the python error string will be set and - * the routine returns NULL. - */ - PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, - int* is_new_object) - { - PyArrayObject* ary = NULL; - PyObject* py_obj; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input),typecode))) - { - ary = (PyArrayObject*) input; - *is_new_object = 0; - } - else - { - py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT); - /* If NULL, PyArray_FromObject will have set python error value.*/ - ary = (PyArrayObject*) py_obj; - *is_new_object = 1; - } - return ary; - } - - /* Given a PyArrayObject, check to see if it is contiguous. If so, - * return the input pointer and flag it as not a new object. If it is - * not contiguous, create a new PyArrayObject using the original data, - * flag it as a new object and return the pointer. - */ - PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_contiguous(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, - array_type(ary), - min_dims, - max_dims); - *is_new_object = 1; - } - return result; - } - - /* Given a PyArrayObject, check to see if it is Fortran-contiguous. - * If so, return the input pointer, but do not flag it as not a new - * object. If it is not Fortran-contiguous, create a new - * PyArrayObject using the original data, flag it as a new object - * and return the pointer. - */ - PyArrayObject* make_fortran(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_fortran(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - Py_INCREF(ary->descr); - result = (PyArrayObject*) PyArray_FromArray(ary, ary->descr, NPY_FORTRAN); - *is_new_object = 1; - } - return result; - } - - /* Convert a given PyObject to a contiguous PyArrayObject of the - * specified type. If the input object is not a contiguous - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_contiguous(ary1, &is_new2, 0, 0); - if ( is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - - /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the - * specified type. If the input object is not a Fortran-ordered - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_fortran(ary1, &is_new2, 0, 0); - if (is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - - - - /* Test whether a python object is contiguous. If array is - * contiguous, return 1. Otherwise, set the python error string and - * return 0. - */ - int require_contiguous(PyArrayObject* ary) - { - int contiguous = 1; - if (!array_is_contiguous(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must be contiguous. A non-contiguous array was given"); - contiguous = 0; - } - return contiguous; - } - - /* Require that a numpy array is not byte-swapped. If the array is - * not byte-swapped, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_native(PyArrayObject* ary) - { - int native = 1; - if (!array_is_native(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must have native byteorder. " - "A byte-swapped array was given"); - native = 0; - } - return native; - } - - /* Require the given PyArrayObject to have a specified number of - * dimensions. If the array has the specified number of dimensions, - * return 1. Otherwise, set the python error string and return 0. - */ - int require_dimensions(PyArrayObject* ary, int exact_dimensions) - { - int success = 1; - if (array_numdims(ary) != exact_dimensions) - { - PyErr_Format(PyExc_TypeError, - "Array must have %d dimensions. Given array has %d dimensions", - exact_dimensions, array_numdims(ary)); - success = 0; - } - return success; - } - - /* Require the given PyArrayObject to have one of a list of specified - * number of dimensions. If the array has one of the specified number - * of dimensions, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) - { - int success = 0; - int i; - char dims_str[255] = ""; - char s[255]; - for (i = 0; i < n && !success; i++) - { - if (array_numdims(ary) == exact_dimensions[i]) - { - success = 1; - } - } - if (!success) - { - for (i = 0; i < n-1; i++) - { - sprintf(s, "%d, ", exact_dimensions[i]); - strcat(dims_str,s); - } - sprintf(s, " or %d", exact_dimensions[n-1]); - strcat(dims_str,s); - PyErr_Format(PyExc_TypeError, - "Array must have %s dimensions. Given array has %d dimensions", - dims_str, array_numdims(ary)); - } - return success; - } - - /* Require the given PyArrayObject to have a specified shape. If the - * array has the specified shape, return 1. Otherwise, set the python - * error string and return 0. - */ - int require_size(PyArrayObject* ary, npy_intp* size, int n) - { - int i; - int success = 1; - int len; - char desired_dims[255] = "["; - char s[255]; - char actual_dims[255] = "["; - for(i=0; i < n;i++) - { - if (size[i] != -1 && size[i] != array_size(ary,i)) - { - success = 0; - } - } - if (!success) - { - for (i = 0; i < n; i++) - { - if (size[i] == -1) - { - sprintf(s, "*,"); - } - else - { - sprintf(s, "%ld,", (long int)size[i]); - } - strcat(desired_dims,s); - } - len = strlen(desired_dims); - desired_dims[len-1] = ']'; - for (i = 0; i < n; i++) - { - sprintf(s, "%ld,", (long int)array_size(ary,i)); - strcat(actual_dims,s); - } - len = strlen(actual_dims); - actual_dims[len-1] = ']'; - PyErr_Format(PyExc_TypeError, - "Array must have shape of %s. Given array has shape of %s", - desired_dims, actual_dims); - } - return success; - } - - /* Require the given PyArrayObject to to be FORTRAN ordered. If the - * the PyArrayObject is already FORTRAN ordered, do nothing. Else, - * set the FORTRAN ordering flag and recompute the strides. - */ - int require_fortran(PyArrayObject* ary) - { - int success = 1; - int nd = array_numdims(ary); - int i; - if (array_is_fortran(ary)) return success; - /* Set the FORTRAN ordered flag */ - ary->flags = NPY_FARRAY; - /* Recompute the strides */ - ary->strides[0] = ary->strides[nd-1]; - for (i=1; i < nd; ++i) - ary->strides[i] = ary->strides[i-1] * array_size(ary,i-1); - return success; - } - - -#ifdef __cplusplus -extern "C" { -#endif -SWIGINTERN PyObject *_wrap_StartParallel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - - if (!PyArg_ParseTuple(args,(char *)":StartParallel")) SWIG_fail; - StartParallel(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; - - if (!PyArg_ParseTuple(args,(char *)":rank")) SWIG_fail; - result = (int)rank(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; - - if (!PyArg_ParseTuple(args,(char *)":size")) SWIG_fail; - result = (int)size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ReduceRealMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Real arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - Real result; - - if (!PyArg_ParseTuple(args,(char *)"O:ReduceRealMax",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ReduceRealMax" "', argument " "1"" of type '" "Real""'"); - } - arg1 = static_cast< Real >(val1); - result = (Real)ReduceRealMax(arg1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_open_ifstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - std::ifstream *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:open_ifstream",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_ifstream" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = reinterpret_cast< char * >(buf1); - result = (std::ifstream *) &open_ifstream((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_open_ofstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - std::ofstream *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:open_ofstream",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_ofstream" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = reinterpret_cast< char * >(buf1); - result = (std::ofstream *) &open_ofstream((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_close_ofstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::ofstream *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:close_ofstream",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ofstream, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close_ofstream" "', argument " "1"" of type '" "std::ofstream &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "close_ofstream" "', argument " "1"" of type '" "std::ofstream &""'"); - } - arg1 = reinterpret_cast< std::ofstream * >(argp1); - close_ofstream(*arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_close_ifstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::ifstream *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:close_ifstream",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ifstream, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close_ifstream" "', argument " "1"" of type '" "std::ifstream &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "close_ifstream" "', argument " "1"" of type '" "std::ifstream &""'"); - } - arg1 = reinterpret_cast< std::ifstream * >(argp1); - close_ifstream(*arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int arg2 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_IntVect",&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVect" "', argument " "1"" of type '" "int""'"); - } - arg1 = static_cast< int >(val1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVect" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (IntVect *)new IntVect(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVect",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVect" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVect" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = (IntVect *)new IntVect((IntVect const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_IntVect__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_IntVect__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IntVect'.\n" - " Possible C/C++ prototypes are:\n" - " IntVect::IntVect(int,int)\n" - " IntVect::IntVect(IntVect const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_IntVect_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVect_shift",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_shift" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect_shift" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVect_shift" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (IntVect *) &(arg1)->shift(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_writeOn" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect_writeOn" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - IntVect_writeOn(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - std::ifstream *arg2 = (std::ifstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect_read",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_read" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect_read" "', argument " "2"" of type '" "std::ifstream *""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - IntVect_read(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___getitem__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (int)IntVect___getitem__(arg1,arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:IntVect___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___len__" "', argument " "1"" of type '" "IntVect volatile *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = (int)IntVect___len__((IntVect volatile *)arg1); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVect___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___setitem__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect___setitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVect___setitem__" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - IntVect___setitem__(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - IntVect *arg2 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___cmp__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect___cmp__" "', argument " "2"" of type '" "IntVect const *""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (int)IntVect___cmp__(arg1,(IntVect const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:IntVect___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___str__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = IntVect_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheZeroVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheZeroVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheZeroVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheUnitVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheUnitVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheUnitVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheNodeVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheNodeVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheNodeVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheCellVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheCellVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheCellVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IntVect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVect",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVect" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IntVect_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IntVect, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_Box",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *)new Box((IntVect const &)*arg1,(IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - IntVect *arg2 = 0 ; - IntVect *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:new_Box",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Box" "', argument " "3"" of type '" "IntVect const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "3"" of type '" "IntVect const &""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - result = (Box *)new Box((IntVect const &)*arg1,(IntVect const &)*arg2,(IntVect const &)*arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_Box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (Box *)new Box((Box const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_2(self, args); - } - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Box'.\n" - " Possible C/C++ prototypes are:\n" - " Box::Box(IntVect const &,IntVect const &)\n" - " Box::Box(IntVect const &,IntVect const &,IntVect const &)\n" - " Box::Box(Box const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_smallEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_smallEnd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_smallEnd" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->smallEnd(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_bigEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_bigEnd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_bigEnd" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->bigEnd(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_type",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_type" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->type(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_size" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->size(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_contains" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (bool)((Box const *)arg1)->contains((IntVect const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_ok" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (bool)((Box const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_contains" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_contains" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_contains" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->contains((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Box_contains__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Box_contains__SWIG_1(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_contains'.\n" - " Possible C/C++ prototypes are:\n" - " Box::contains(IntVect const &) const\n" - " Box::contains(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_intersects",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_intersects" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_intersects" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_intersects" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->intersects((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_sameSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_sameSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_sameSize" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_sameSize" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_sameSize" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->sameSize((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_sameType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_sameType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_sameType" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_sameType" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_sameType" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->sameType((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_cellCentered(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_cellCentered",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_cellCentered" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (bool)((Box const *)arg1)->cellCentered(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_numPts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_numPts",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_numPts" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (long)((Box const *)arg1)->numPts(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_volume",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_volume" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (long)((Box const *)arg1)->volume(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_index",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_index" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_index" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_index" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (long)((Box const *)arg1)->index((IntVect const &)*arg2); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_setSmall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_setSmall",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_setSmall" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_setSmall" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_setSmall" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->setSmall((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_setBig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_setBig",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_setBig" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_setBig" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_setBig" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->setBig((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_shift",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_shift" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_shift" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_shift" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->shift(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_shiftHalf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_shiftHalf",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_shiftHalf" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_shiftHalf" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_shiftHalf" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->shiftHalf(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_convert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_convert",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_convert" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_convert" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_convert" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->convert((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_surroundingNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_surroundingNodes",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_surroundingNodes" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_surroundingNodes" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->surroundingNodes(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_enclosedCells(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_enclosedCells",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_enclosedCells" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_enclosedCells" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->enclosedCells(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_minBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_minBox",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_minBox" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_minBox" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_minBox" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (Box *) &(arg1)->minBox((Box const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_chop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_chop",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_chop" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_chop" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_chop" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (arg1)->chop(arg2,arg3); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_grow",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_grow" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_grow" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->grow(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_grow",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_grow" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_grow" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_grow" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->grow(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_grow__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_grow__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_grow'.\n" - " Possible C/C++ prototypes are:\n" - " Box::grow(int)\n" - " Box::grow(int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_growLo",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growLo" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growLo" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_growLo" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->growLo(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_growLo",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growLo" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growLo" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->growLo(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growLo__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growLo__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_growLo'.\n" - " Possible C/C++ prototypes are:\n" - " Box::growLo(int,int)\n" - " Box::growLo(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_growHi",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growHi" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growHi" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_growHi" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->growHi(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_growHi",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growHi" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growHi" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->growHi(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growHi__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growHi__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_growHi'.\n" - " Possible C/C++ prototypes are:\n" - " Box::growHi(int,int)\n" - " Box::growHi(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_refine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_refine",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_refine" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_refine" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->refine(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_coarsen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_coarsen",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_coarsen" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_coarsen" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->coarsen(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_next",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_next" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_next" "', argument " "2"" of type '" "IntVect &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_next" "', argument " "2"" of type '" "IntVect &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - ((Box const *)arg1)->next(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ifstream *arg2 = (std::ifstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_read",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_read" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_read" "', argument " "2"" of type '" "std::ifstream *""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - Box_read(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_write",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_write" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_write" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - Box_write(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box___and__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___and__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box___and__" "', argument " "2"" of type '" "Box *""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = Box___and__(arg1,arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_writeOn" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_writeOn" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - Box_writeOn(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___str__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = Box_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___cmp__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box___cmp__" "', argument " "2"" of type '" "Box const *""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (int)Box___cmp__(arg1,(Box const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Box" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Box_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Box, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_FArrayBox__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_FArrayBox",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FArrayBox" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FArrayBox" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FArrayBox" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (FArrayBox *)new FArrayBox((Box const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FArrayBox__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_FArrayBox")) SWIG_fail; - result = (FArrayBox *)new FArrayBox(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FArrayBox(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_FArrayBox__SWIG_1(self, args); - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_FArrayBox__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_FArrayBox'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::FArrayBox(Box const &,int)\n" - " FArrayBox::FArrayBox()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_FArrayBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_FArrayBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FArrayBox" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_box" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->box(); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_nComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_nComp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_nComp" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (int)((FArrayBox const *)arg1)->nComp(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::ofstream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_writeOn" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ofstream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_writeOn" "', argument " "2"" of type '" "std::ofstream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_writeOn" "', argument " "2"" of type '" "std::ofstream &""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - ((FArrayBox const *)arg1)->writeOn(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::istream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_readFrom" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__istream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - arg2 = reinterpret_cast< std::istream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_norm",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_norm" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_norm" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_norm" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_norm" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (double)((FArrayBox const *)arg1)->norm(arg2,arg3,arg4); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:FArrayBox_copy",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_copy" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FArrayBox_copy" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->copy(*arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - Box *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_copy",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "Box &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "Box &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - (arg1)->copy(*arg2,*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_copy",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - (arg1)->copy(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_copy__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_copy__SWIG_1(self, args); - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_copy__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_copy'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::copy(FArrayBox &,int,int,int)\n" - " FArrayBox::copy(FArrayBox &,Box &)\n" - " FArrayBox::copy(FArrayBox &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::ifstream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_readFrom" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ifstream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::ifstream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::ifstream &""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__istream, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_readFrom__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__ifstream, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_readFrom__SWIG_1(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_readFrom'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::readFrom(std::istream &)\n" - " FArrayBox::readFrom(std::ifstream &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___str__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = FArrayBox_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:FArrayBox_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FArrayBox_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_setVal",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->setVal(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_setVal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setVal(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_3(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_2(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_1(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_setVal'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::setVal(double,Box const &,int,int)\n" - " FArrayBox::setVal(double,Box const &,int)\n" - " FArrayBox::setVal(double,int)\n" - " FArrayBox::setVal(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->min(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_min",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (double)((FArrayBox const *)arg1)->min(); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_min",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_min" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->min((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (double)((FArrayBox const *)arg1)->min((Box const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_min__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_min__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_min__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_min__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_min'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::min(int) const\n" - " FArrayBox::min() const\n" - " FArrayBox::min(Box const &,int) const\n" - " FArrayBox::min(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->max(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_max",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (double)((FArrayBox const *)arg1)->max(); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_max",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_max" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->max((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (double)((FArrayBox const *)arg1)->max((Box const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_max__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_max__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_max__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_max__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_max'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::max(int) const\n" - " FArrayBox::max() const\n" - " FArrayBox::max(Box const &,int) const\n" - " FArrayBox::max(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_minIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = ((FArrayBox const *)arg1)->minIndex(arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_minIndex",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->minIndex(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_minIndex",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_minIndex" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = ((FArrayBox const *)arg1)->minIndex((Box const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_minIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = ((FArrayBox const *)arg1)->minIndex((Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_minIndex'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::minIndex(int) const\n" - " FArrayBox::minIndex() const\n" - " FArrayBox::minIndex(Box const &,int) const\n" - " FArrayBox::minIndex(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_maxIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = ((FArrayBox const *)arg1)->maxIndex(arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_maxIndex",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->maxIndex(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_maxIndex",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_maxIndex" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = ((FArrayBox const *)arg1)->maxIndex((Box const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_maxIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = ((FArrayBox const *)arg1)->maxIndex((Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_maxIndex'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::maxIndex(int) const\n" - " FArrayBox::maxIndex() const\n" - " FArrayBox::maxIndex(Box const &,int) const\n" - " FArrayBox::maxIndex(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_sum",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->sum(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_sum",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->sum(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_sum",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_sum" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (double)((FArrayBox const *)arg1)->sum((Box const &)*arg2,arg3,arg4); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_sum",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->sum((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_3(self, args); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_0(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_2(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_sum'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::sum(int,int) const\n" - " FArrayBox::sum(int) const\n" - " FArrayBox::sum(Box const &,int,int) const\n" - " FArrayBox::sum(Box const &,int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_get_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_get_array",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_get_array" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (PyObject *)FArrayBox_get_array(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_valIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - IntVect *arg2 = (IntVect *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_valIV",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_valIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_valIV" "', argument " "2"" of type '" "IntVect const *""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_valIV" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)FArrayBox_valIV(arg1,(IntVect const *)arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - IntVect *arg3 = (IntVect *) 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_setValIV",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setValIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setValIV" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setValIV" "', argument " "3"" of type '" "IntVect const *""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setValIV" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - FArrayBox_setValIV__SWIG_0(arg1,arg2,(IntVect const *)arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - IntVect *arg3 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_setValIV",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setValIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setValIV" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setValIV" "', argument " "3"" of type '" "IntVect const *""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - FArrayBox_setValIV__SWIG_0(arg1,arg2,(IntVect const *)arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_setValIV__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setValIV__SWIG_0(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_setValIV'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::setValIV(double,IntVect const *,int)\n" - " FArrayBox::setValIV(double,IntVect const *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_floor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_floor",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_floor" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_floor" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - FArrayBox_floor(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___add__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___add__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___add__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___sub__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___sub__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___sub__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___mul__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___mul__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___mul____SWIG_0(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___mul__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox___mul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - result = (FArrayBox *)FArrayBox___mul____SWIG_1(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul__(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox___mul____SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox___mul____SWIG_1(self, args); - } - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___div__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___div__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___div__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FArrayBox_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_FArrayBox, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_BoxArray__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_BoxArray")) SWIG_fail; - result = (BoxArray *)new BoxArray(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_BoxArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_BoxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoxArray" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BoxArray__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_BoxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_BoxArray, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BoxArray" "', argument " "1"" of type '" "BoxArray &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BoxArray" "', argument " "1"" of type '" "BoxArray &""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (BoxArray *)new BoxArray(*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BoxArray(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_BoxArray__SWIG_0(self, args); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_BoxArray__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_BoxArray'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::BoxArray()\n" - " BoxArray::BoxArray(BoxArray &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_resize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_resize" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_define(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_define",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_define" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - (arg1)->define((BoxArray const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - std::ostream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_writeOn" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_writeOn" "', argument " "2"" of type '" "std::ostream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_writeOn" "', argument " "2"" of type '" "std::ostream &""'"); - } - arg2 = reinterpret_cast< std::ostream * >(argp2); - (arg1)->writeOn(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_readFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - std::istream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_readFrom" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__istream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - arg2 = reinterpret_cast< std::istream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_size" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (int)(arg1)->size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_get",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_get" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_get" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (arg1)->get(arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - Box *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:BoxArray_set",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_set" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BoxArray_set" "', argument " "3"" of type '" "Box &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_set" "', argument " "3"" of type '" "Box &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - (arg1)->set(arg2,*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_maxSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_maxSize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (BoxArray *) &(arg1)->maxSize(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_maxSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_maxSize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (BoxArray *) &(arg1)->maxSize((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_maxSize__SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BoxArray_maxSize__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'BoxArray_maxSize'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::maxSize(int)\n" - " BoxArray::maxSize(IntVect const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_ok" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (bool)((BoxArray const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_isDisjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_isDisjoint",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_isDisjoint" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (bool)((BoxArray const *)arg1)->isDisjoint(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((IntVect const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((BoxArray const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_2(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'BoxArray_contains'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::contains(IntVect const &) const\n" - " BoxArray::contains(Box const &) const\n" - " BoxArray::contains(BoxArray const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_minimalBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_minimalBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_minimalBox" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (arg1)->minimalBox(); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_refine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_refine",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_refine" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_refine" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->refine(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_coarsen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_coarsen",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_coarsen" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_coarsen" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->coarsen(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___getitem__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = BoxArray___getitem__(arg1,arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_complementIn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_complementIn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_complementIn" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_complementIn" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_complementIn" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = BoxArray_complementIn(arg1,(Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___and__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___and__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___and__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray___and__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = BoxArray___and__(arg1,(BoxArray const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___or__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___or__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___or__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___or__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray___or__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = BoxArray___or__(arg1,(BoxArray const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___len__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (int)BoxArray___len__(arg1); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___str__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = BoxArray_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___cmp__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___cmp__" "', argument " "2"" of type '" "BoxArray const *""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = (int)BoxArray___cmp__(arg1,(BoxArray const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *BoxArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_BoxArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->incr(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (swig::SwigPyIterator *)(arg1)->incr(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator_incr__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator_incr__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n" - " Possible C/C++ prototypes are:\n" - " swig::SwigPyIterator::incr(size_t)\n" - " swig::SwigPyIterator::incr()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->decr(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (swig::SwigPyIterator *)(arg1)->decr(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator_decr__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator_decr__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n" - " Possible C/C++ prototypes are:\n" - " swig::SwigPyIterator::decr(size_t)\n" - " swig::SwigPyIterator::decr()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - ptrdiff_t result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - try { - result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); - } - catch(std::invalid_argument &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; - } - - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - try { - result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); - } - catch(std::invalid_argument &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; - } - - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->next(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->__next__(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->previous(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->advance(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - ptrdiff_t result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator___sub____SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator___sub____SWIG_0(self, args); - } - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_MultiFab__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - MultiFab *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:new_MultiFab",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MultiFab" "', argument " "1"" of type '" "BoxArray const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MultiFab" "', argument " "1"" of type '" "BoxArray const &""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiFab" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MultiFab" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (MultiFab *)new MultiFab((BoxArray const &)*arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiFab, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MultiFab__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_MultiFab")) SWIG_fail; - result = (MultiFab *)new MultiFab(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiFab, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MultiFab(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_MultiFab__SWIG_1(self, args); - } - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_MultiFab__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MultiFab'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::MultiFab(BoxArray const &,int,int)\n" - " MultiFab::MultiFab()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_MultiFab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_MultiFab",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiFab" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - BoxArray *arg2 = 0 ; - int arg3 ; - int arg4 ; - FabAlloc arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - void *argp5 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_define",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_define" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_define" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_define" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - { - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_FabAlloc, 0 | 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MultiFab_define" "', argument " "5"" of type '" "FabAlloc""'"); - } - if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "5"" of type '" "FabAlloc""'"); - } else { - FabAlloc * temp = reinterpret_cast< FabAlloc * >(argp5); - arg5 = *temp; - if (SWIG_IsNewObj(res5)) delete temp; - } - } - MultiFab_define__SWIG_0(arg1,(BoxArray const &)*arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - BoxArray *arg2 = 0 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_define",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_define" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_define" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_define" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - MultiFab_define__SWIG_0(arg1,(BoxArray const &)*arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_define__SWIG_1(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_FabAlloc, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_define__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_define'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::define(BoxArray const &,int,int,FabAlloc)\n" - " MultiFab::define(BoxArray const &,int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_ok" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (bool)((MultiFab const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_nGrow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_nGrow",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_nGrow" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->nGrow(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_boxArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_boxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_boxArray" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (BoxArray *) &((MultiFab const *)arg1)->boxArray(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_size" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_nComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_nComp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_nComp" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->nComp(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_min",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_min" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_min" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((MultiFab const *)arg1)->min(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_min" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((MultiFab const *)arg1)->min(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_min__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_min__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_min'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::min(int,int) const\n" - " MultiFab::min(int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_max",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_max" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_max" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((MultiFab const *)arg1)->max(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_max" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((MultiFab const *)arg1)->max(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_max__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_max__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_max'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::max(int,int) const\n" - " MultiFab::max(int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - MultiFab *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_copy",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_copy" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_copy" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_copy" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - (arg1)->copy(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_setVal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setVal(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - int arg6 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "MultiFab_setVal" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5,arg6); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_setVal",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->setVal(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[7]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 6) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_5(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_6(self, args); - } - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_2(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_4(self, args); - } - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_1(self, args); - } - } - } - } - } - } - if (argc == 6) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_3(self, args); - } - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_setVal'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::setVal(double)\n" - " MultiFab::setVal(double,int,int,int)\n" - " MultiFab::setVal(double,int,int)\n" - " MultiFab::setVal(double,Box const &,int,int,int)\n" - " MultiFab::setVal(double,Box const &,int,int)\n" - " MultiFab::setVal(double,int)\n" - " MultiFab::setVal(double,Box const &,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_setBndry",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setBndry" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setBndry" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setBndry(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setBndry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setBndry" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setBndry" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setBndry" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setBndry" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setBndry(arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setBndry__SWIG_0(self, args); - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setBndry__SWIG_1(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_setBndry'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::setBndry(double)\n" - " MultiFab::setBndry(double,int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_FillBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_FillBoundary" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->FillBoundary(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - bool arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_FillBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_FillBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - (arg1)->FillBoundary(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_FillBoundary",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->FillBoundary(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_FillBoundary",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - (arg1)->FillBoundary(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_3(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_0(self, args); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_FillBoundary'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::FillBoundary(int,int)\n" - " MultiFab::FillBoundary(bool,bool)\n" - " MultiFab::FillBoundary(bool)\n" - " MultiFab::FillBoundary()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_sum",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_sum" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)MultiFab_sum__SWIG_0((MultiFab const *)arg1,arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_sum",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_sum" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (double)MultiFab_sum__SWIG_0((MultiFab const *)arg1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_sum__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_sum__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_sum'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::sum(int) const\n" - " MultiFab::sum() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_writeOut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_writeOut",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_writeOut" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_writeOut" "', argument " "2"" of type '" "char *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - MultiFab_writeOut(arg1,arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_copyComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - MultiFab *arg2 = (MultiFab *) 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_copyComp",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_copyComp" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_copyComp" "', argument " "2"" of type '" "MultiFab *""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_copyComp" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_copyComp" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_copyComp" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - MultiFab_copyComp(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab___getitem__" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (FArrayBox *)MultiFab___getitem__(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MultiFab_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_MultiFab, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_RealBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Real *arg1 ; - Real *arg2 ; - PyArrayObject *array1 = NULL ; - int is_new_object1 = 0 ; - PyArrayObject *array2 = NULL ; - int is_new_object2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - RealBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_RealBox",&obj0,&obj1)) SWIG_fail; - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array1 = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, - &is_new_object1); - if (!array1 || !require_dimensions(array1, 1) || - !require_size(array1, size, 1)) SWIG_fail; - arg1 = (double *) array_data(array1); - } - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array2 = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, - &is_new_object2); - if (!array2 || !require_dimensions(array2, 1) || - !require_size(array2, size, 1)) SWIG_fail; - arg2 = (double *) array_data(array2); - } - result = (RealBox *)new RealBox(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RealBox, SWIG_POINTER_NEW | 0 ); - { - if (is_new_object1 && array1) - { - Py_DECREF(array1); - } - } - { - if (is_new_object2 && array2) - { - Py_DECREF(array2); - } - } - return resultobj; -fail: - { - if (is_new_object1 && array1) - { - Py_DECREF(array1); - } - } - { - if (is_new_object2 && array2) - { - Py_DECREF(array2); - } - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RealBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - RealBox *arg1 = (RealBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_RealBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RealBox, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RealBox" "', argument " "1"" of type '" "RealBox *""'"); - } - arg1 = reinterpret_cast< RealBox * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RealBox_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_RealBox, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - RealBox *arg2 = (RealBox *) 0 ; - int arg3 ; - int *arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyArrayObject *array4 = NULL ; - int is_new_object4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - Geometry *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:new_Geometry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Geometry" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Geometry" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_RealBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "RealBox const *""'"); - } - arg2 = reinterpret_cast< RealBox * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Geometry" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array4 = obj_to_array_contiguous_allow_conversion(obj3, NPY_INT, - &is_new_object4); - if (!array4 || !require_dimensions(array4, 1) || - !require_size(array4, size, 1)) SWIG_fail; - arg4 = (int *) array_data(array4); - } - result = (Geometry *)new Geometry((Box const &)*arg1,(RealBox const *)arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Geometry, SWIG_POINTER_NEW | 0 ); - { - if (is_new_object4 && array4) - { - Py_DECREF(array4); - } - } - return resultobj; -fail: - { - if (is_new_object4 && array4) - { - Py_DECREF(array4); - } - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - bool arg3 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:Geometry_FillPeriodicBoundary",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - (arg1)->FillPeriodicBoundary(*arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Geometry_FillPeriodicBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - (arg1)->FillPeriodicBoundary(*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_FillPeriodicBoundary",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - (arg1)->FillPeriodicBoundary(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_0(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Geometry_FillPeriodicBoundary'.\n" - " Possible C/C++ prototypes are:\n" - " Geometry::FillPeriodicBoundary(MultiFab &,bool,bool)\n" - " Geometry::FillPeriodicBoundary(MultiFab &,bool)\n" - " Geometry::FillPeriodicBoundary(MultiFab &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Geometry",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Geometry, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"StartParallel", _wrap_StartParallel, METH_VARARGS, NULL}, - { (char *)"rank", _wrap_rank, METH_VARARGS, NULL}, - { (char *)"size", _wrap_size, METH_VARARGS, NULL}, - { (char *)"ReduceRealMax", _wrap_ReduceRealMax, METH_VARARGS, NULL}, - { (char *)"open_ifstream", _wrap_open_ifstream, METH_VARARGS, NULL}, - { (char *)"open_ofstream", _wrap_open_ofstream, METH_VARARGS, NULL}, - { (char *)"close_ofstream", _wrap_close_ofstream, METH_VARARGS, NULL}, - { (char *)"close_ifstream", _wrap_close_ifstream, METH_VARARGS, NULL}, - { (char *)"new_IntVect", _wrap_new_IntVect, METH_VARARGS, NULL}, - { (char *)"IntVect_shift", _wrap_IntVect_shift, METH_VARARGS, NULL}, - { (char *)"IntVect_writeOn", _wrap_IntVect_writeOn, METH_VARARGS, NULL}, - { (char *)"IntVect_read", _wrap_IntVect_read, METH_VARARGS, NULL}, - { (char *)"IntVect___getitem__", _wrap_IntVect___getitem__, METH_VARARGS, NULL}, - { (char *)"IntVect___len__", _wrap_IntVect___len__, METH_VARARGS, NULL}, - { (char *)"IntVect___setitem__", _wrap_IntVect___setitem__, METH_VARARGS, NULL}, - { (char *)"IntVect___cmp__", _wrap_IntVect___cmp__, METH_VARARGS, NULL}, - { (char *)"IntVect___str__", _wrap_IntVect___str__, METH_VARARGS, NULL}, - { (char *)"IntVect_TheZeroVector", _wrap_IntVect_TheZeroVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheUnitVector", _wrap_IntVect_TheUnitVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheNodeVector", _wrap_IntVect_TheNodeVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheCellVector", _wrap_IntVect_TheCellVector, METH_VARARGS, NULL}, - { (char *)"delete_IntVect", _wrap_delete_IntVect, METH_VARARGS, NULL}, - { (char *)"IntVect_swigregister", IntVect_swigregister, METH_VARARGS, NULL}, - { (char *)"new_Box", _wrap_new_Box, METH_VARARGS, NULL}, - { (char *)"Box_smallEnd", _wrap_Box_smallEnd, METH_VARARGS, NULL}, - { (char *)"Box_bigEnd", _wrap_Box_bigEnd, METH_VARARGS, NULL}, - { (char *)"Box_type", _wrap_Box_type, METH_VARARGS, NULL}, - { (char *)"Box_size", _wrap_Box_size, METH_VARARGS, NULL}, - { (char *)"Box_ok", _wrap_Box_ok, METH_VARARGS, NULL}, - { (char *)"Box_contains", _wrap_Box_contains, METH_VARARGS, NULL}, - { (char *)"Box_intersects", _wrap_Box_intersects, METH_VARARGS, NULL}, - { (char *)"Box_sameSize", _wrap_Box_sameSize, METH_VARARGS, NULL}, - { (char *)"Box_sameType", _wrap_Box_sameType, METH_VARARGS, NULL}, - { (char *)"Box_cellCentered", _wrap_Box_cellCentered, METH_VARARGS, NULL}, - { (char *)"Box_numPts", _wrap_Box_numPts, METH_VARARGS, NULL}, - { (char *)"Box_volume", _wrap_Box_volume, METH_VARARGS, NULL}, - { (char *)"Box_index", _wrap_Box_index, METH_VARARGS, NULL}, - { (char *)"Box_setSmall", _wrap_Box_setSmall, METH_VARARGS, NULL}, - { (char *)"Box_setBig", _wrap_Box_setBig, METH_VARARGS, NULL}, - { (char *)"Box_shift", _wrap_Box_shift, METH_VARARGS, NULL}, - { (char *)"Box_shiftHalf", _wrap_Box_shiftHalf, METH_VARARGS, NULL}, - { (char *)"Box_convert", _wrap_Box_convert, METH_VARARGS, NULL}, - { (char *)"Box_surroundingNodes", _wrap_Box_surroundingNodes, METH_VARARGS, NULL}, - { (char *)"Box_enclosedCells", _wrap_Box_enclosedCells, METH_VARARGS, NULL}, - { (char *)"Box_minBox", _wrap_Box_minBox, METH_VARARGS, NULL}, - { (char *)"Box_chop", _wrap_Box_chop, METH_VARARGS, NULL}, - { (char *)"Box_grow", _wrap_Box_grow, METH_VARARGS, NULL}, - { (char *)"Box_growLo", _wrap_Box_growLo, METH_VARARGS, NULL}, - { (char *)"Box_growHi", _wrap_Box_growHi, METH_VARARGS, NULL}, - { (char *)"Box_refine", _wrap_Box_refine, METH_VARARGS, NULL}, - { (char *)"Box_coarsen", _wrap_Box_coarsen, METH_VARARGS, NULL}, - { (char *)"Box_next", _wrap_Box_next, METH_VARARGS, NULL}, - { (char *)"Box_read", _wrap_Box_read, METH_VARARGS, NULL}, - { (char *)"Box_write", _wrap_Box_write, METH_VARARGS, NULL}, - { (char *)"Box___and__", _wrap_Box___and__, METH_VARARGS, NULL}, - { (char *)"Box_writeOn", _wrap_Box_writeOn, METH_VARARGS, NULL}, - { (char *)"Box___str__", _wrap_Box___str__, METH_VARARGS, NULL}, - { (char *)"Box___cmp__", _wrap_Box___cmp__, METH_VARARGS, NULL}, - { (char *)"delete_Box", _wrap_delete_Box, METH_VARARGS, NULL}, - { (char *)"Box_swigregister", Box_swigregister, METH_VARARGS, NULL}, - { (char *)"new_FArrayBox", _wrap_new_FArrayBox, METH_VARARGS, NULL}, - { (char *)"delete_FArrayBox", _wrap_delete_FArrayBox, METH_VARARGS, NULL}, - { (char *)"FArrayBox_box", _wrap_FArrayBox_box, METH_VARARGS, NULL}, - { (char *)"FArrayBox_nComp", _wrap_FArrayBox_nComp, METH_VARARGS, NULL}, - { (char *)"FArrayBox_writeOn", _wrap_FArrayBox_writeOn, METH_VARARGS, NULL}, - { (char *)"FArrayBox_norm", _wrap_FArrayBox_norm, METH_VARARGS, NULL}, - { (char *)"FArrayBox_copy", _wrap_FArrayBox_copy, METH_VARARGS, NULL}, - { (char *)"FArrayBox_readFrom", _wrap_FArrayBox_readFrom, METH_VARARGS, NULL}, - { (char *)"FArrayBox___str__", _wrap_FArrayBox___str__, METH_VARARGS, NULL}, - { (char *)"FArrayBox_setVal", _wrap_FArrayBox_setVal, METH_VARARGS, NULL}, - { (char *)"FArrayBox_min", _wrap_FArrayBox_min, METH_VARARGS, NULL}, - { (char *)"FArrayBox_max", _wrap_FArrayBox_max, METH_VARARGS, NULL}, - { (char *)"FArrayBox_minIndex", _wrap_FArrayBox_minIndex, METH_VARARGS, NULL}, - { (char *)"FArrayBox_maxIndex", _wrap_FArrayBox_maxIndex, METH_VARARGS, NULL}, - { (char *)"FArrayBox_sum", _wrap_FArrayBox_sum, METH_VARARGS, NULL}, - { (char *)"FArrayBox_get_array", _wrap_FArrayBox_get_array, METH_VARARGS, NULL}, - { (char *)"FArrayBox_valIV", _wrap_FArrayBox_valIV, METH_VARARGS, NULL}, - { (char *)"FArrayBox_setValIV", _wrap_FArrayBox_setValIV, METH_VARARGS, NULL}, - { (char *)"FArrayBox_floor", _wrap_FArrayBox_floor, METH_VARARGS, NULL}, - { (char *)"FArrayBox___add__", _wrap_FArrayBox___add__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___sub__", _wrap_FArrayBox___sub__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___mul__", _wrap_FArrayBox___mul__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___div__", _wrap_FArrayBox___div__, METH_VARARGS, NULL}, - { (char *)"FArrayBox_swigregister", FArrayBox_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_BoxArray", _wrap_delete_BoxArray, METH_VARARGS, NULL}, - { (char *)"new_BoxArray", _wrap_new_BoxArray, METH_VARARGS, NULL}, - { (char *)"BoxArray_resize", _wrap_BoxArray_resize, METH_VARARGS, NULL}, - { (char *)"BoxArray_define", _wrap_BoxArray_define, METH_VARARGS, NULL}, - { (char *)"BoxArray_writeOn", _wrap_BoxArray_writeOn, METH_VARARGS, NULL}, - { (char *)"BoxArray_readFrom", _wrap_BoxArray_readFrom, METH_VARARGS, NULL}, - { (char *)"BoxArray_size", _wrap_BoxArray_size, METH_VARARGS, NULL}, - { (char *)"BoxArray_get", _wrap_BoxArray_get, METH_VARARGS, NULL}, - { (char *)"BoxArray_set", _wrap_BoxArray_set, METH_VARARGS, NULL}, - { (char *)"BoxArray_maxSize", _wrap_BoxArray_maxSize, METH_VARARGS, NULL}, - { (char *)"BoxArray_ok", _wrap_BoxArray_ok, METH_VARARGS, NULL}, - { (char *)"BoxArray_isDisjoint", _wrap_BoxArray_isDisjoint, METH_VARARGS, NULL}, - { (char *)"BoxArray_contains", _wrap_BoxArray_contains, METH_VARARGS, NULL}, - { (char *)"BoxArray_minimalBox", _wrap_BoxArray_minimalBox, METH_VARARGS, NULL}, - { (char *)"BoxArray_refine", _wrap_BoxArray_refine, METH_VARARGS, NULL}, - { (char *)"BoxArray_coarsen", _wrap_BoxArray_coarsen, METH_VARARGS, NULL}, - { (char *)"BoxArray___getitem__", _wrap_BoxArray___getitem__, METH_VARARGS, NULL}, - { (char *)"BoxArray_complementIn", _wrap_BoxArray_complementIn, METH_VARARGS, NULL}, - { (char *)"BoxArray___and__", _wrap_BoxArray___and__, METH_VARARGS, NULL}, - { (char *)"BoxArray___or__", _wrap_BoxArray___or__, METH_VARARGS, NULL}, - { (char *)"BoxArray___len__", _wrap_BoxArray___len__, METH_VARARGS, NULL}, - { (char *)"BoxArray___str__", _wrap_BoxArray___str__, METH_VARARGS, NULL}, - { (char *)"BoxArray___cmp__", _wrap_BoxArray___cmp__, METH_VARARGS, NULL}, - { (char *)"BoxArray_swigregister", BoxArray_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL}, - { (char *)"new_MultiFab", _wrap_new_MultiFab, METH_VARARGS, NULL}, - { (char *)"delete_MultiFab", _wrap_delete_MultiFab, METH_VARARGS, NULL}, - { (char *)"MultiFab_define", _wrap_MultiFab_define, METH_VARARGS, NULL}, - { (char *)"MultiFab_ok", _wrap_MultiFab_ok, METH_VARARGS, NULL}, - { (char *)"MultiFab_nGrow", _wrap_MultiFab_nGrow, METH_VARARGS, NULL}, - { (char *)"MultiFab_boxArray", _wrap_MultiFab_boxArray, METH_VARARGS, NULL}, - { (char *)"MultiFab_size", _wrap_MultiFab_size, METH_VARARGS, NULL}, - { (char *)"MultiFab_nComp", _wrap_MultiFab_nComp, METH_VARARGS, NULL}, - { (char *)"MultiFab_min", _wrap_MultiFab_min, METH_VARARGS, NULL}, - { (char *)"MultiFab_max", _wrap_MultiFab_max, METH_VARARGS, NULL}, - { (char *)"MultiFab_copy", _wrap_MultiFab_copy, METH_VARARGS, NULL}, - { (char *)"MultiFab_setVal", _wrap_MultiFab_setVal, METH_VARARGS, NULL}, - { (char *)"MultiFab_setBndry", _wrap_MultiFab_setBndry, METH_VARARGS, NULL}, - { (char *)"MultiFab_FillBoundary", _wrap_MultiFab_FillBoundary, METH_VARARGS, NULL}, - { (char *)"MultiFab_sum", _wrap_MultiFab_sum, METH_VARARGS, NULL}, - { (char *)"MultiFab_writeOut", _wrap_MultiFab_writeOut, METH_VARARGS, NULL}, - { (char *)"MultiFab_copyComp", _wrap_MultiFab_copyComp, METH_VARARGS, NULL}, - { (char *)"MultiFab___getitem__", _wrap_MultiFab___getitem__, METH_VARARGS, NULL}, - { (char *)"MultiFab_swigregister", MultiFab_swigregister, METH_VARARGS, NULL}, - { (char *)"new_RealBox", _wrap_new_RealBox, METH_VARARGS, NULL}, - { (char *)"delete_RealBox", _wrap_delete_RealBox, METH_VARARGS, NULL}, - { (char *)"RealBox_swigregister", RealBox_swigregister, METH_VARARGS, NULL}, - { (char *)"new_Geometry", _wrap_new_Geometry, METH_VARARGS, NULL}, - { (char *)"Geometry_FillPeriodicBoundary", _wrap_Geometry_FillPeriodicBoundary, METH_VARARGS, NULL}, - { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, NULL}, - { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static swig_type_info _swigt__p_Box = {"_p_Box", "Box *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_BoxArray = {"_p_BoxArray", "BoxArray *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FArrayBox = {"_p_FArrayBox", "FArrayBox *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FabAlloc = {"_p_FabAlloc", "FabAlloc *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Geometry = {"_p_Geometry", "Geometry *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_IntVect = {"_p_IntVect", "IntVect *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_MultiFab = {"_p_MultiFab", "MultiFab *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_RealBox = {"_p_RealBox", "RealBox *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *|Real *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ifstream = {"_p_std__ifstream", "std::ifstream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__istream = {"_p_std__istream", "std::istream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ofstream = {"_p_std__ofstream", "std::ofstream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_Box, - &_swigt__p_BoxArray, - &_swigt__p_FArrayBox, - &_swigt__p_FabAlloc, - &_swigt__p_Geometry, - &_swigt__p_IntVect, - &_swigt__p_MultiFab, - &_swigt__p_RealBox, - &_swigt__p_char, - &_swigt__p_double, - &_swigt__p_std__ifstream, - &_swigt__p_std__invalid_argument, - &_swigt__p_std__istream, - &_swigt__p_std__ofstream, - &_swigt__p_std__ostream, - &_swigt__p_swig__SwigPyIterator, -}; - -static swig_cast_info _swigc__p_Box[] = { {&_swigt__p_Box, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_BoxArray[] = { {&_swigt__p_BoxArray, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FArrayBox[] = { {&_swigt__p_FArrayBox, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FabAlloc[] = { {&_swigt__p_FabAlloc, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Geometry[] = { {&_swigt__p_Geometry, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_IntVect[] = { {&_swigt__p_IntVect, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_MultiFab[] = { {&_swigt__p_MultiFab, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_RealBox[] = { {&_swigt__p_RealBox, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ifstream[] = { {&_swigt__p_std__ifstream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__istream[] = { {&_swigt__p_std__istream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ofstream[] = { {&_swigt__p_std__ofstream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_Box, - _swigc__p_BoxArray, - _swigc__p_FArrayBox, - _swigc__p_FabAlloc, - _swigc__p_Geometry, - _swigc__p_IntVect, - _swigc__p_MultiFab, - _swigc__p_RealBox, - _swigc__p_char, - _swigc__p_double, - _swigc__p_std__ifstream, - _swigc__p_std__invalid_argument, - _swigc__p_std__istream, - _swigc__p_std__ofstream, - _swigc__p_std__ostream, - _swigc__p_swig__SwigPyIterator, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -static swig_const_info swig_const_table[] = { -{0, 0, 0, 0.0, 0, 0}}; - -#ifdef __cplusplus -} -#endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif - -#if 0 -#define SWIGRUNTIME_DEBUG -#endif - - -SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int found, init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; - iter=module_head; - do { - if (iter==&swig_module) { - found=1; - break; - } - iter=iter->next; - } while (iter!= module_head); - - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void -SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -#if 0 -{ - /* c-mode */ -#endif -} -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError,"Unknown C global variable"); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError,"Unknown C global variable"); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&varlink_type) < 0) - return NULL; -#endif - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - strncpy(gv->name,name,size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch(constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ - - SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (c && (c = strstr(c, "swig_ptr: "))) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, - strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - -#ifdef __cplusplus -} -#endif - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -#endif - -SWIGEXPORT -#if PY_VERSION_HEX >= 0x03000000 -PyObject* -#else -void -#endif -SWIG_init(void) { - PyObject *m, *d, *md; -#if PY_VERSION_HEX >= 0x03000000 - static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 - PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, - NULL, - -1, - SwigMethods, - NULL, - NULL, - NULL, - NULL - }; -#endif - -#if defined(SWIGPYTHON_BUILTIN) - static SwigPyClientData SwigPyObject_clientdata = { - 0, 0, 0, 0, 0, 0, 0 - }; - static PyGetSetDef this_getset_def = { - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL - }; - static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own - }; - static PyGetSetDef thisown_getset_def = { - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure - }; - PyObject *metatype_args; - PyTypeObject *builtin_pytype; - int builtin_base_count; - swig_type_info *builtin_basetype; - PyObject *tuple; - PyGetSetDescrObject *static_getset; - PyTypeObject *metatype; - SwigPyClientData *cd; - PyObject *public_interface, *public_symbol; - PyObject *this_descr; - PyObject *thisown_descr; - int i; - - (void)builtin_pytype; - (void)builtin_base_count; - (void)builtin_basetype; - (void)tuple; - (void)static_getset; - - /* metatype is used to implement static member variables. */ - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); - assert(metatype_args); - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); - assert(metatype); - Py_DECREF(metatype_args); - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; - assert(PyType_Ready(metatype) >= 0); -#endif - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 - m = PyModule_Create(&SWIG_module); -#else - m = Py_InitModule((char *) SWIG_name, SwigMethods); -#endif - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - if (!cd) { - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); -# if PY_VERSION_HEX >= 0x03000000 - return NULL; -# else - return; -# endif - } - - /* All objects have a 'this' attribute */ - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); - (void)this_descr; - - /* All objects have a 'thisown' attribute */ - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); - (void)thisown_descr; - - public_interface = PyList_New(0); - public_symbol = 0; - (void)public_symbol; - - PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); - for (i = 0; SwigMethods[i].ml_name != NULL; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); - for (i = 0; swig_const_table[i].name != 0; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); -#endif - - SWIG_InstallConstants(d,swig_const_table); - - - import_array(); - - SWIG_Python_SetConstant(d, "BL_DIM",SWIG_From_int(static_cast< int >(2))); -#if PY_VERSION_HEX >= 0x03000000 - return m; -#else - return; -#endif -} - diff --git a/Src/Python/src/boxlib_wrap_3.cpp b/Src/Python/src/boxlib_wrap_3.cpp deleted file mode 100644 index 826691276..000000000 --- a/Src/Python/src/boxlib_wrap_3.cpp +++ /dev/null @@ -1,13878 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.11 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - -#define SWIGPYTHON -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE - - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - - -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG -#else -# include -#endif - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) -#define PyString_Check(name) PyBytes_Check(name) -#define PyString_FromString(x) PyUnicode_FromString(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) -#define PyString_AsString(str) PyBytes_AsString(str) -#define PyString_Size(str) PyBytes_Size(str) -#define PyString_InternFromString(key) PyUnicode_InternFromString(key) -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - -#ifdef __cplusplus -} -#endif - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) - -#ifdef SWIGPYTHON_BUILTIN -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) -#else -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) -#endif - -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) - -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -#if defined(SWIGPYTHON_BUILTIN) - -SWIGINTERN void -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { - PyObject *s = PyString_InternFromString(key); - PyList_Append(seq, s); - Py_DECREF(s); -} - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); - if (public_interface) - SwigPyBuiltin_AddPublicSymbol(public_interface, name); -} - -#else - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); -} - -#endif - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - if (min <= 1 && max >= 1) { - register int i; - objs[0] = args; - for (i = 1; i < max; ++i) { - objs[i] = 0; - } - return 2; - } - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - register int i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) - -#ifdef __cplusplus -extern "C" { -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; - PyTypeObject *pytype; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - data->pytype = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -#ifdef SWIGPYTHON_BUILTIN - PyObject *dict; -#endif -} SwigPyObject; - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { -# ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif -# if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -# else - PyString_ConcatAndDel(&repr,nrep); -# endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); - return res; -} - - -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); - -#ifdef SWIGPYTHON_BUILTIN -static swig_type_info *SwigPyObject_stype = 0; -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - SwigPyClientData *cd; - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - assert(cd); - assert(cd->pytype); - return cd->pytype; -} -#else -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); - return type; -} -#endif - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { -#ifdef SWIGPYTHON_BUILTIN - PyTypeObject *target_tp = SwigPyObject_type(); - if (PyType_IsSubtype(op->ob_type, target_tp)) - return 1; - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); -#else - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -#endif -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -SwigPyObject_TypeOnce(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpyobject_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpyobject_type) < 0) - return NULL; -#endif - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == SwigPyPacked_TypeOnce()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_TypeOnce(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpypacked_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpypacked_type) < 0) - return NULL; -#endif - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - PyObject *obj; - - if (SwigPyObject_Check(pyobj)) - return (SwigPyObject *) pyobj; - -#ifdef SWIGPYTHON_BUILTIN - (void)obj; -# ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - pyobj = PyWeakref_GET_OBJECT(pyobj); - if (pyobj && SwigPyObject_Check(pyobj)) - return (SwigPyObject*) pyobj; - } -# endif - return NULL; -#else - - obj = 0; - -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; -#endif -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - int res; - SwigPyObject *sobj; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; - - if (!obj) - return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { - if (ptr) - *ptr = 0; - return SWIG_OK; - } - - res = SWIG_ERROR; - - sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - res = SWIG_OK; - } else { - if (implicit_conv) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } - } - return res; -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } -#else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { - SwigPyClientData *clientdata; - PyObject * robj; - int own; - - if (!ptr) - return SWIG_Py_Void(); - - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - if (clientdata && clientdata->pytype) { - SwigPyObject *newobj; - if (flags & SWIG_BUILTIN_TP_INIT) { - newobj = (SwigPyObject*) self; - if (newobj->ptr) { - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); - while (newobj->next) - newobj = (SwigPyObject *) newobj->next; - newobj->next = next_self; - newobj = (SwigPyObject *)next_self; - } - } else { - newobj = PyObject_New(SwigPyObject, clientdata->pytype); - } - if (newobj) { - newobj->ptr = ptr; - newobj->ty = type; - newobj->own = own; - newobj->next = 0; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - return (PyObject*) newobj; - } - return SWIG_Py_Void(); - } - - assert(!(flags & SWIG_BUILTIN_TP_INIT)); - - robj = SwigPyObject_New(ptr, type, own); - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); - robj = inst; - } - return robj; -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else -# ifdef SWIGPY_USE_CAPSULE - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE -SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif -{ -#ifdef SWIGPY_USE_CAPSULE - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); - swig_this = NULL; -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); -#endif -#ifdef SWIGPY_USE_CAPSULE - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#endif -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { -#ifdef SWIGPY_USE_CAPSULE - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif - } else { - swig_module_info *swig_module = SWIG_GetModule(0); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE - obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : ""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - -#ifdef SWIGPYTHON_BUILTIN -SWIGRUNTIME int -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { - PyTypeObject *tp = obj->ob_type; - PyObject *descr; - PyObject *encoded_name; - descrsetfunc f; - int res = -1; - -# ifdef Py_USING_UNICODE - if (PyString_Check(name)) { - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); - if (!name) - return -1; - } else if (!PyUnicode_Check(name)) -# else - if (!PyString_Check(name)) -# endif - { - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); - return -1; - } else { - Py_INCREF(name); - } - - if (!tp->tp_dict) { - if (PyType_Ready(tp) < 0) - goto done; - } - - descr = _PyType_Lookup(tp, name); - f = NULL; - if (descr != NULL) - f = descr->ob_type->tp_descr_set; - if (!f) { - if (PyString_Check(name)) { - encoded_name = name; - Py_INCREF(name); - } else { - encoded_name = PyUnicode_AsUTF8String(name); - } - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); - } else { - res = f(descr, obj, value); - } - - done: - Py_DECREF(name); - return res; -} -#endif - - -#ifdef __cplusplus -} -#endif - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_Box swig_types[0] -#define SWIGTYPE_p_BoxArray swig_types[1] -#define SWIGTYPE_p_FArrayBox swig_types[2] -#define SWIGTYPE_p_FabAlloc swig_types[3] -#define SWIGTYPE_p_Geometry swig_types[4] -#define SWIGTYPE_p_IntVect swig_types[5] -#define SWIGTYPE_p_MultiFab swig_types[6] -#define SWIGTYPE_p_RealBox swig_types[7] -#define SWIGTYPE_p_char swig_types[8] -#define SWIGTYPE_p_double swig_types[9] -#define SWIGTYPE_p_std__ifstream swig_types[10] -#define SWIGTYPE_p_std__invalid_argument swig_types[11] -#define SWIGTYPE_p_std__istream swig_types[12] -#define SWIGTYPE_p_std__ofstream swig_types[13] -#define SWIGTYPE_p_std__ostream swig_types[14] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[15] -static swig_type_info *swig_types[17]; -static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif -#endif - -/*----------------------------------------------- - @(target):= _bl3.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__bl3 - -#else -# define SWIG_init init_bl3 - -#endif -#define SWIG_name "_bl3" - -#define SWIGVERSION 0x020011 -#define SWIG_VERSION SWIGVERSION - - -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) - - -#include - - -namespace swig { - class SwigPtr_PyObject { - protected: - PyObject *_obj; - - public: - SwigPtr_PyObject() :_obj(0) - { - } - - SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) - { - Py_XINCREF(_obj); - } - - SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) - { - if (initial_ref) { - Py_XINCREF(_obj); - } - } - - SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) - { - Py_XINCREF(item._obj); - Py_XDECREF(_obj); - _obj = item._obj; - return *this; - } - - ~SwigPtr_PyObject() - { - Py_XDECREF(_obj); - } - - operator PyObject *() const - { - return _obj; - } - - PyObject *operator->() const - { - return _obj; - } - }; -} - - -namespace swig { - struct SwigVar_PyObject : SwigPtr_PyObject { - SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } - - SwigVar_PyObject & operator = (PyObject* obj) - { - Py_XDECREF(_obj); - _obj = obj; - return *this; - } - }; -} - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SWIG_FILE_WITH_INIT - - -#ifndef SWIG_FILE_WITH_INIT -# define NO_IMPORT_ARRAY -#endif -#include "stdio.h" -#include - - -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} - - - void StartParallel() { - ParallelDescriptor::StartParallel(); - } - int rank() { - return ParallelDescriptor::MyProc(); - } - int size() { - return ParallelDescriptor::NProcs(); - } - Real ReduceRealMax (Real lval) { - Real rvar = lval; - ParallelDescriptor::ReduceRealMax(rvar); - return rvar; - } - - -SWIGINTERN int -SWIG_AsVal_double (PyObject *obj, double *val) -{ - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) *val = PyFloat_AsDouble(obj); - return SWIG_OK; - } else if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } -#endif - return res; -} - - - #define SWIG_From_double PyFloat_FromDouble - - - std::ifstream & open_ifstream(const char *filename) { - std::ifstream *infile = new std::ifstream(filename); - return *infile; - } - - -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - - -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 - if (PyUnicode_Check(obj)) -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - PyBytes_AsStringAndSize(obj, &cstr, &len); - if(alloc) *alloc = SWIG_NEWOBJ; -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } - else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif - *cptr = SWIG_Python_str_AsChar(obj); - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 - Py_XDECREF(obj); -#endif - return SWIG_OK; - } else { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - - - - - std::ofstream & open_ofstream(const char *filename) { - std::ofstream *outfile = new std::ofstream(filename); - return *outfile; - } - - - void close_ofstream(std::ofstream& str) { - str.close(); - } - - - void close_ifstream(std::ifstream & str) { - str.close(); - } - - -#include - - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - -#include - - -#include - - -SWIGINTERNINLINE int -SWIG_CanCastAsInteger(double *d, double min, double max) { - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff/summ; - if (reps < 8*DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) -{ - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< int >(v); - } - } - return res; -} - -SWIGINTERN void IntVect_writeOn(IntVect *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN void IntVect_read(IntVect *self,std::ifstream *ifs){ - *ifs >> *self; - } -SWIGINTERN int IntVect___getitem__(IntVect *self,int index){ - return (*self)[index]; - } -SWIGINTERN int IntVect___len__(IntVect volatile *self){ return BL_SPACEDIM; } -SWIGINTERN void IntVect___setitem__(IntVect *self,int index,int val){ - (*self).setVal(index,val); - } -SWIGINTERN int IntVect___cmp__(IntVect *self,IntVect const *other){ - if( (*self) == (*other) ) { - return 0; - } - if( (*self) <= (*other) ) { - return -1; - } - return 1; - } -SWIGINTERN std::string IntVect_display(IntVect *self){ - std::ostringstream str; - str << *self; - return str.str(); - } - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); -#else - return PyString_FromStringAndSize(carray, static_cast< int >(size)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - -SWIGINTERNINLINE PyObject* - SWIG_From_bool (bool value) -{ - return PyBool_FromLong(value ? 1 : 0); -} - - - #define SWIG_From_long PyLong_FromLong - -SWIGINTERN void Box_read(Box *self,std::ifstream *ifs){ - *ifs >> *self; - } -SWIGINTERN void Box_write(Box *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN Box Box___and__(Box *self,Box *right){ - Box result; - result = *self & *right; - return result; - } -SWIGINTERN void Box_writeOn(Box *self,std::ofstream *os){ - *os << *self; - } -SWIGINTERN std::string Box_display(Box *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN int Box___cmp__(Box *self,Box const *other){ - if(*self == *other) return 0; - else if( self->smallEnd().lexLT(other->smallEnd())){ - return 1; - } - else { - return -1; - } - } -SWIGINTERN std::string FArrayBox_display(FArrayBox *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN PyObject *FArrayBox_get_array(FArrayBox *self){ - double *ptr = self->dataPtr(); - PyObject *arr = 0; - npy_intp dims[BL_SPACEDIM+1]; - - const IntVect size = self->box().size(); - for (int i=0; inComp(); - arr = PyArray_NewFromDescr(&PyArray_Type, - PyArray_DescrFromType(NPY_DOUBLE), BL_SPACEDIM+1, dims, NULL, - ptr, NPY_FORTRAN|NPY_WRITEABLE, NULL); - - Py_INCREF(arr); - return arr; - } -SWIGINTERN double FArrayBox_valIV(FArrayBox *self,IntVect const *p,int n){ - return (*self)(*p,n); - } -SWIGINTERN void FArrayBox_setValIV__SWIG_0(FArrayBox *self,double x,IntVect const *p,int n=1){ - (*self)(*p,n) = x; - } -SWIGINTERN void FArrayBox_floor(FArrayBox *self,double val){ - Box bx = self->box(); - int nc = self->nComp(); - for (IntVect iv=bx.smallEnd(), End=bx.bigEnd(); iv<=End; bx.next(iv)) { - for (int n=0; nbox(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) += *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___sub__(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) -= *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___mul____SWIG_0(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) *= *right; - return result; - } -SWIGINTERN FArrayBox *FArrayBox___mul____SWIG_1(FArrayBox *self,double right){ - Box bx = self->box(); - int nvar = self->nComp(); - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - result->mult(right); - return result; - } -SWIGINTERN FArrayBox *FArrayBox___div__(FArrayBox *self,FArrayBox const *right){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) /= *right; - return result; - } -SWIGINTERN Box BoxArray___getitem__(BoxArray *self,int index){ - return (*self)[index]; - } -SWIGINTERN BoxArray BoxArray_complementIn(BoxArray *self,Box const &b){ - return BoxLib::complementIn(b,*self); - } -SWIGINTERN BoxArray BoxArray___and__(BoxArray *self,BoxArray const &right){ - BoxArray res = BoxLib::intersect(*self,right); - return res; - } -SWIGINTERN BoxArray BoxArray___or__(BoxArray *self,BoxArray const &right){ - BoxList bl(*self); - bl.join(BoxList(right)); - return BoxArray(bl); - } -SWIGINTERN int BoxArray___len__(BoxArray *self){ return (*self).size(); } -SWIGINTERN std::string BoxArray_display(BoxArray *self){ - std::ostringstream str; - str << *self; - return str.str(); - } -SWIGINTERN int BoxArray___cmp__(BoxArray *self,BoxArray const *other){ - if( (*self)==(*other)) return 0; - else return 1; - } - -#include - -#if PY_VERSION_HEX >= 0x03020000 -# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj)) -#else -# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj)) -#endif - - -#include - - -#if defined(__GNUC__) -# if __GNUC__ == 2 && __GNUC_MINOR <= 96 -# define SWIG_STD_NOMODERN_STL -# endif -#endif - - -#include -#include -#include - - - #include - - -namespace swig { - struct stop_iteration { - }; - - struct SwigPyIterator { - private: - SwigPtr_PyObject _seq; - - protected: - SwigPyIterator(PyObject *seq) : _seq(seq) - { - } - - public: - virtual ~SwigPyIterator() {} - - // Access iterator method, required by Python - virtual PyObject *value() const = 0; - - // Forward iterator method, required by Python - virtual SwigPyIterator *incr(size_t n = 1) = 0; - - // Backward iterator method, very common in C++, but not required in Python - virtual SwigPyIterator *decr(size_t /*n*/ = 1) - { - throw stop_iteration(); - } - - // Random access iterator methods, but not required in Python - virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const - { - throw std::invalid_argument("operation not supported"); - } - - virtual bool equal (const SwigPyIterator &/*x*/) const - { - throw std::invalid_argument("operation not supported"); - } - - // C++ common/needed methods - virtual SwigPyIterator *copy() const = 0; - - PyObject *next() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads - PyObject *obj = value(); - incr(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; - } - - /* Make an alias for Python 3.x */ - PyObject *__next__() - { - return next(); - } - - PyObject *previous() - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads - decr(); - PyObject *obj = value(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; - } - - SwigPyIterator *advance(ptrdiff_t n) - { - return (n > 0) ? incr(n) : decr(-n); - } - - bool operator == (const SwigPyIterator& x) const - { - return equal(x); - } - - bool operator != (const SwigPyIterator& x) const - { - return ! operator==(x); - } - - SwigPyIterator& operator += (ptrdiff_t n) - { - return *advance(n); - } - - SwigPyIterator& operator -= (ptrdiff_t n) - { - return *advance(-n); - } - - SwigPyIterator* operator + (ptrdiff_t n) const - { - return copy()->advance(n); - } - - SwigPyIterator* operator - (ptrdiff_t n) const - { - return copy()->advance(-n); - } - - ptrdiff_t operator - (const SwigPyIterator& x) const - { - return x.distance(*this); - } - - static swig_type_info* descriptor() { - static int init = 0; - static swig_type_info* desc = 0; - if (!init) { - desc = SWIG_TypeQuery("swig::SwigPyIterator *"); - init = 1; - } - return desc; - } - }; - -#if defined(SWIGPYTHON_BUILTIN) - inline PyObject* make_output_iterator_builtin (PyObject *pyself) - { - Py_INCREF(pyself); - return pyself; - } -#endif -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); -#if PY_VERSION_HEX >= 0x03000000 - { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (v < 0) { - return SWIG_OverflowError; - } - } else { - PyErr_Clear(); - } - } -#endif - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) *val = (unsigned long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); - return res; -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_ptrdiff_t (ptrdiff_t value) -{ - return SWIG_From_long (static_cast< long >(value)); -} - - -SWIGINTERNINLINE int -SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) -{ - long v; - int res = SWIG_AsVal_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); - return res; -} - - -#include - - -#include - - -#include - - -#include - - -#include - -SWIGINTERN void MultiFab_define__SWIG_0(MultiFab *self,BoxArray const &bxs,int nvar,int ngrow,FabAlloc mem_mode=Fab_allocate){ - self->FabArray::define(bxs,nvar,ngrow,mem_mode); - } - -SWIGINTERN int -SWIG_AsVal_bool (PyObject *obj, bool *val) -{ - int r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; -} - -SWIGINTERN double MultiFab_sum__SWIG_0(MultiFab const *self,int comp=0){ - const BoxArray &ba = self->boxArray(); - double retval = 0; - for(MFIter mfi(*self);mfi.isValid(); ++mfi){ - int idx = mfi.index(); - const Box &bx = ba[idx]; - const FArrayBox &fab = (*self)[mfi]; - retval += fab.sum(bx,comp,1); - } - ParallelDescriptor::ReduceRealSum(retval); - return retval; - } -SWIGINTERN void MultiFab_writeOut(MultiFab *self,char *name){ - std::string str(name); - VisMF::Write(*self,str,VisMF::OneFilePerCPU); - } -SWIGINTERN void MultiFab_copyComp(MultiFab *self,MultiFab *src,int src_comp,int dest_comp,int num_comp){ - self->copy(*src,src_comp,dest_comp,num_comp); - } -SWIGINTERN FArrayBox *MultiFab___getitem__(MultiFab *self,int index){ - if ((*self).DistributionMap()[index]==ParallelDescriptor::MyProc() ) { - return &((*self)[index]); - } - return 0; - } - -/* Support older NumPy data type names -*/ -#if NDARRAY_VERSION < 0x01000000 -#define NPY_BOOL PyArray_BOOL -#define NPY_BYTE PyArray_BYTE -#define NPY_UBYTE PyArray_UBYTE -#define NPY_SHORT PyArray_SHORT -#define NPY_USHORT PyArray_USHORT -#define NPY_INT PyArray_INT -#define NPY_UINT PyArray_UINT -#define NPY_LONG PyArray_LONG -#define NPY_ULONG PyArray_ULONG -#define NPY_LONGLONG PyArray_LONGLONG -#define NPY_ULONGLONG PyArray_ULONGLONG -#define NPY_FLOAT PyArray_FLOAT -#define NPY_DOUBLE PyArray_DOUBLE -#define NPY_LONGDOUBLE PyArray_LONGDOUBLE -#define NPY_CFLOAT PyArray_CFLOAT -#define NPY_CDOUBLE PyArray_CDOUBLE -#define NPY_CLONGDOUBLE PyArray_CLONGDOUBLE -#define NPY_OBJECT PyArray_OBJECT -#define NPY_STRING PyArray_STRING -#define NPY_UNICODE PyArray_UNICODE -#define NPY_VOID PyArray_VOID -#define NPY_NTYPES PyArray_NTYPES -#define NPY_NOTYPE PyArray_NOTYPE -#define NPY_CHAR PyArray_CHAR -#define NPY_USERDEF PyArray_USERDEF -#define npy_intp intp - -#define NPY_MAX_BYTE MAX_BYTE -#define NPY_MIN_BYTE MIN_BYTE -#define NPY_MAX_UBYTE MAX_UBYTE -#define NPY_MAX_SHORT MAX_SHORT -#define NPY_MIN_SHORT MIN_SHORT -#define NPY_MAX_USHORT MAX_USHORT -#define NPY_MAX_INT MAX_INT -#define NPY_MIN_INT MIN_INT -#define NPY_MAX_UINT MAX_UINT -#define NPY_MAX_LONG MAX_LONG -#define NPY_MIN_LONG MIN_LONG -#define NPY_MAX_ULONG MAX_ULONG -#define NPY_MAX_LONGLONG MAX_LONGLONG -#define NPY_MIN_LONGLONG MIN_LONGLONG -#define NPY_MAX_ULONGLONG MAX_ULONGLONG -#define NPY_MAX_INTP MAX_INTP -#define NPY_MIN_INTP MIN_INTP - -#define NPY_FARRAY FARRAY -#define NPY_F_CONTIGUOUS F_CONTIGUOUS -#endif - - -/* Macros to extract array attributes. - */ -#define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) -#define array_type(a) (int)(PyArray_TYPE(a)) -#define array_numdims(a) (((PyArrayObject *)a)->nd) -#define array_dimensions(a) (((PyArrayObject *)a)->dimensions) -#define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) -#define array_data(a) (((PyArrayObject *)a)->data) -#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) -#define array_is_native(a) (PyArray_ISNOTSWAPPED(a)) -#define array_is_fortran(a) (PyArray_ISFORTRAN(a)) - - - /* Given a PyObject, return a string describing its type. - */ - const char* pytype_string(PyObject* py_obj) { - if (py_obj == NULL ) return "C NULL value"; - if (py_obj == Py_None ) return "Python None" ; - if (PyCallable_Check(py_obj)) return "callable" ; - if (PyString_Check( py_obj)) return "string" ; - if (PyInt_Check( py_obj)) return "int" ; - if (PyFloat_Check( py_obj)) return "float" ; - if (PyDict_Check( py_obj)) return "dict" ; - if (PyList_Check( py_obj)) return "list" ; - if (PyTuple_Check( py_obj)) return "tuple" ; - if (PyFile_Check( py_obj)) return "file" ; - if (PyModule_Check( py_obj)) return "module" ; - if (PyInstance_Check(py_obj)) return "instance" ; - - return "unkown type"; - } - - /* Given a NumPy typecode, return a string describing the type. - */ - const char* typecode_string(int typecode) { - static const char* type_names[25] = {"bool", "byte", "unsigned byte", - "short", "unsigned short", "int", - "unsigned int", "long", "unsigned long", - "long long", "unsigned long long", - "float", "double", "long double", - "complex float", "complex double", - "complex long double", "object", - "string", "unicode", "void", "ntypes", - "notype", "char", "unknown"}; - return typecode < 24 ? type_names[typecode] : type_names[24]; - } - - /* Make sure input has correct numpy type. Allow character and byte - * to match. Also allow int and long to match. This is deprecated. - * You should use PyArray_EquivTypenums() instead. - */ - int type_match(int actual_type, int desired_type) { - return PyArray_EquivTypenums(actual_type, desired_type); - } - - - /* Given a PyObject pointer, cast it to a PyArrayObject pointer if - * legal. If not, set the python error string appropriately and - * return NULL. - */ - PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) - { - PyArrayObject* ary = NULL; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input), typecode))) - { - ary = (PyArrayObject*) input; - } - else if is_array(input) - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = typecode_string(array_type(input)); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. Array of type '%s' given", - desired_type, actual_type); - ary = NULL; - } - else - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = pytype_string(input); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. A '%s' was given", - desired_type, actual_type); - ary = NULL; - } - return ary; - } - - /* Convert the given PyObject to a NumPy array with the given - * typecode. On success, return a valid PyArrayObject* with the - * correct type. On failure, the python error string will be set and - * the routine returns NULL. - */ - PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, - int* is_new_object) - { - PyArrayObject* ary = NULL; - PyObject* py_obj; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input),typecode))) - { - ary = (PyArrayObject*) input; - *is_new_object = 0; - } - else - { - py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT); - /* If NULL, PyArray_FromObject will have set python error value.*/ - ary = (PyArrayObject*) py_obj; - *is_new_object = 1; - } - return ary; - } - - /* Given a PyArrayObject, check to see if it is contiguous. If so, - * return the input pointer and flag it as not a new object. If it is - * not contiguous, create a new PyArrayObject using the original data, - * flag it as a new object and return the pointer. - */ - PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_contiguous(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, - array_type(ary), - min_dims, - max_dims); - *is_new_object = 1; - } - return result; - } - - /* Given a PyArrayObject, check to see if it is Fortran-contiguous. - * If so, return the input pointer, but do not flag it as not a new - * object. If it is not Fortran-contiguous, create a new - * PyArrayObject using the original data, flag it as a new object - * and return the pointer. - */ - PyArrayObject* make_fortran(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_fortran(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - Py_INCREF(ary->descr); - result = (PyArrayObject*) PyArray_FromArray(ary, ary->descr, NPY_FORTRAN); - *is_new_object = 1; - } - return result; - } - - /* Convert a given PyObject to a contiguous PyArrayObject of the - * specified type. If the input object is not a contiguous - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_contiguous(ary1, &is_new2, 0, 0); - if ( is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - - /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the - * specified type. If the input object is not a Fortran-ordered - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_fortran(ary1, &is_new2, 0, 0); - if (is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - - - - /* Test whether a python object is contiguous. If array is - * contiguous, return 1. Otherwise, set the python error string and - * return 0. - */ - int require_contiguous(PyArrayObject* ary) - { - int contiguous = 1; - if (!array_is_contiguous(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must be contiguous. A non-contiguous array was given"); - contiguous = 0; - } - return contiguous; - } - - /* Require that a numpy array is not byte-swapped. If the array is - * not byte-swapped, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_native(PyArrayObject* ary) - { - int native = 1; - if (!array_is_native(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must have native byteorder. " - "A byte-swapped array was given"); - native = 0; - } - return native; - } - - /* Require the given PyArrayObject to have a specified number of - * dimensions. If the array has the specified number of dimensions, - * return 1. Otherwise, set the python error string and return 0. - */ - int require_dimensions(PyArrayObject* ary, int exact_dimensions) - { - int success = 1; - if (array_numdims(ary) != exact_dimensions) - { - PyErr_Format(PyExc_TypeError, - "Array must have %d dimensions. Given array has %d dimensions", - exact_dimensions, array_numdims(ary)); - success = 0; - } - return success; - } - - /* Require the given PyArrayObject to have one of a list of specified - * number of dimensions. If the array has one of the specified number - * of dimensions, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) - { - int success = 0; - int i; - char dims_str[255] = ""; - char s[255]; - for (i = 0; i < n && !success; i++) - { - if (array_numdims(ary) == exact_dimensions[i]) - { - success = 1; - } - } - if (!success) - { - for (i = 0; i < n-1; i++) - { - sprintf(s, "%d, ", exact_dimensions[i]); - strcat(dims_str,s); - } - sprintf(s, " or %d", exact_dimensions[n-1]); - strcat(dims_str,s); - PyErr_Format(PyExc_TypeError, - "Array must have %s dimensions. Given array has %d dimensions", - dims_str, array_numdims(ary)); - } - return success; - } - - /* Require the given PyArrayObject to have a specified shape. If the - * array has the specified shape, return 1. Otherwise, set the python - * error string and return 0. - */ - int require_size(PyArrayObject* ary, npy_intp* size, int n) - { - int i; - int success = 1; - int len; - char desired_dims[255] = "["; - char s[255]; - char actual_dims[255] = "["; - for(i=0; i < n;i++) - { - if (size[i] != -1 && size[i] != array_size(ary,i)) - { - success = 0; - } - } - if (!success) - { - for (i = 0; i < n; i++) - { - if (size[i] == -1) - { - sprintf(s, "*,"); - } - else - { - sprintf(s, "%ld,", (long int)size[i]); - } - strcat(desired_dims,s); - } - len = strlen(desired_dims); - desired_dims[len-1] = ']'; - for (i = 0; i < n; i++) - { - sprintf(s, "%ld,", (long int)array_size(ary,i)); - strcat(actual_dims,s); - } - len = strlen(actual_dims); - actual_dims[len-1] = ']'; - PyErr_Format(PyExc_TypeError, - "Array must have shape of %s. Given array has shape of %s", - desired_dims, actual_dims); - } - return success; - } - - /* Require the given PyArrayObject to to be FORTRAN ordered. If the - * the PyArrayObject is already FORTRAN ordered, do nothing. Else, - * set the FORTRAN ordering flag and recompute the strides. - */ - int require_fortran(PyArrayObject* ary) - { - int success = 1; - int nd = array_numdims(ary); - int i; - if (array_is_fortran(ary)) return success; - /* Set the FORTRAN ordered flag */ - ary->flags = NPY_FARRAY; - /* Recompute the strides */ - ary->strides[0] = ary->strides[nd-1]; - for (i=1; i < nd; ++i) - ary->strides[i] = ary->strides[i-1] * array_size(ary,i-1); - return success; - } - - -#ifdef __cplusplus -extern "C" { -#endif -SWIGINTERN PyObject *_wrap_StartParallel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - - if (!PyArg_ParseTuple(args,(char *)":StartParallel")) SWIG_fail; - StartParallel(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; - - if (!PyArg_ParseTuple(args,(char *)":rank")) SWIG_fail; - result = (int)rank(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; - - if (!PyArg_ParseTuple(args,(char *)":size")) SWIG_fail; - result = (int)size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ReduceRealMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Real arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - Real result; - - if (!PyArg_ParseTuple(args,(char *)"O:ReduceRealMax",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ReduceRealMax" "', argument " "1"" of type '" "Real""'"); - } - arg1 = static_cast< Real >(val1); - result = (Real)ReduceRealMax(arg1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_open_ifstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - std::ifstream *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:open_ifstream",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_ifstream" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = reinterpret_cast< char * >(buf1); - result = (std::ifstream *) &open_ifstream((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_open_ofstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - std::ofstream *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:open_ofstream",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_ofstream" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = reinterpret_cast< char * >(buf1); - result = (std::ofstream *) &open_ofstream((char const *)arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_close_ofstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::ofstream *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:close_ofstream",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ofstream, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close_ofstream" "', argument " "1"" of type '" "std::ofstream &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "close_ofstream" "', argument " "1"" of type '" "std::ofstream &""'"); - } - arg1 = reinterpret_cast< std::ofstream * >(argp1); - close_ofstream(*arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_close_ifstream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::ifstream *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:close_ifstream",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__ifstream, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close_ifstream" "', argument " "1"" of type '" "std::ifstream &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "close_ifstream" "', argument " "1"" of type '" "std::ifstream &""'"); - } - arg1 = reinterpret_cast< std::ifstream * >(argp1); - close_ifstream(*arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; - int arg2 ; - int arg3 ; - int val1 ; - int ecode1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:new_IntVect",&obj0,&obj1,&obj2)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVect" "', argument " "1"" of type '" "int""'"); - } - arg1 = static_cast< int >(val1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVect" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IntVect" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (IntVect *)new IntVect(arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_IntVect",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVect" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVect" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = (IntVect *)new IntVect((IntVect const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_IntVect(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_IntVect__SWIG_1(self, args); - } - } - if (argc == 3) { - int _v; - { - int res = SWIG_AsVal_int(argv[0], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_IntVect__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IntVect'.\n" - " Possible C/C++ prototypes are:\n" - " IntVect::IntVect(int,int,int)\n" - " IntVect::IntVect(IntVect const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_IntVect_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVect_shift",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_shift" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect_shift" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVect_shift" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (IntVect *) &(arg1)->shift(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_writeOn" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect_writeOn" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - IntVect_writeOn(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - std::ifstream *arg2 = (std::ifstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect_read",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect_read" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect_read" "', argument " "2"" of type '" "std::ifstream *""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - IntVect_read(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___getitem__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (int)IntVect___getitem__(arg1,arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:IntVect___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___len__" "', argument " "1"" of type '" "IntVect volatile *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = (int)IntVect___len__((IntVect volatile *)arg1); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:IntVect___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___setitem__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVect___setitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVect___setitem__" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - IntVect___setitem__(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - IntVect *arg2 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:IntVect___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___cmp__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVect___cmp__" "', argument " "2"" of type '" "IntVect const *""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (int)IntVect___cmp__(arg1,(IntVect const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:IntVect___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVect___str__" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - result = IntVect_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheZeroVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheZeroVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheZeroVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheUnitVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheUnitVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheUnitVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheNodeVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheNodeVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheNodeVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_IntVect_TheCellVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":IntVect_TheCellVector")) SWIG_fail; - result = (IntVect *) &IntVect::TheCellVector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntVect, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_IntVect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVect",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IntVect, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVect" "', argument " "1"" of type '" "IntVect *""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *IntVect_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IntVect, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_Box",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *)new Box((IntVect const &)*arg1,(IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - IntVect *arg1 = 0 ; - IntVect *arg2 = 0 ; - IntVect *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:new_Box",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "IntVect const &""'"); - } - arg1 = reinterpret_cast< IntVect * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Box" "', argument " "3"" of type '" "IntVect const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "3"" of type '" "IntVect const &""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - result = (Box *)new Box((IntVect const &)*arg1,(IntVect const &)*arg2,(IntVect const &)*arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_Box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Box" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Box" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (Box *)new Box((Box const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_Box(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_2(self, args); - } - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Box__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Box'.\n" - " Possible C/C++ prototypes are:\n" - " Box::Box(IntVect const &,IntVect const &)\n" - " Box::Box(IntVect const &,IntVect const &,IntVect const &)\n" - " Box::Box(Box const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_smallEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_smallEnd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_smallEnd" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->smallEnd(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_bigEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_bigEnd",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_bigEnd" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->bigEnd(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_type",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_type" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->type(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_size" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = ((Box const *)arg1)->size(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_contains" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (bool)((Box const *)arg1)->contains((IntVect const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_ok" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (bool)((Box const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_contains" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_contains" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_contains" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->contains((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_contains(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Box_contains__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Box_contains__SWIG_1(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_contains'.\n" - " Possible C/C++ prototypes are:\n" - " Box::contains(IntVect const &) const\n" - " Box::contains(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_intersects",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_intersects" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_intersects" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_intersects" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->intersects((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_sameSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_sameSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_sameSize" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_sameSize" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_sameSize" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->sameSize((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_sameType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_sameType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_sameType" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_sameType" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_sameType" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((Box const *)arg1)->sameType((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_cellCentered(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_cellCentered",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_cellCentered" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (bool)((Box const *)arg1)->cellCentered(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_numPts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_numPts",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_numPts" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (long)((Box const *)arg1)->numPts(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box_volume",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_volume" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = (long)((Box const *)arg1)->volume(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_index",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_index" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_index" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_index" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (long)((Box const *)arg1)->index((IntVect const &)*arg2); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_setSmall(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_setSmall",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_setSmall" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_setSmall" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_setSmall" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->setSmall((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_setBig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_setBig",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_setBig" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_setBig" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_setBig" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->setBig((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_shift",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_shift" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_shift" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_shift" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->shift(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_shiftHalf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_shiftHalf",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_shiftHalf" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_shiftHalf" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_shiftHalf" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->shiftHalf(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_convert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_convert",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_convert" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_convert" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_convert" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (Box *) &(arg1)->convert((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_surroundingNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_surroundingNodes",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_surroundingNodes" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_surroundingNodes" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->surroundingNodes(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_enclosedCells(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_enclosedCells",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_enclosedCells" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_enclosedCells" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->enclosedCells(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_minBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_minBox",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_minBox" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_minBox" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_minBox" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (Box *) &(arg1)->minBox((Box const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_chop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_chop",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_chop" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_chop" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_chop" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (arg1)->chop(arg2,arg3); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_grow",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_grow" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_grow" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->grow(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_grow",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_grow" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_grow" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_grow" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->grow(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_grow(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_grow__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_grow__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_grow'.\n" - " Possible C/C++ prototypes are:\n" - " Box::grow(int)\n" - " Box::grow(int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_growLo",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growLo" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growLo" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_growLo" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->growLo(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_growLo",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growLo" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growLo" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->growLo(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growLo(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growLo__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growLo__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_growLo'.\n" - " Possible C/C++ prototypes are:\n" - " Box::growLo(int,int)\n" - " Box::growLo(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Box_growHi",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growHi" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growHi" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Box_growHi" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (Box *) &(arg1)->growHi(arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_growHi",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_growHi" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_growHi" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->growHi(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_growHi(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growHi__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Box_growHi__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Box_growHi'.\n" - " Possible C/C++ prototypes are:\n" - " Box::growHi(int,int)\n" - " Box::growHi(int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_Box_refine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_refine",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_refine" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_refine" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->refine(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_coarsen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - Box *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_coarsen",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_coarsen" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Box_coarsen" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (Box *) &(arg1)->coarsen(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Box, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_next",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_next" "', argument " "1"" of type '" "Box const *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_next" "', argument " "2"" of type '" "IntVect &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Box_next" "', argument " "2"" of type '" "IntVect &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - ((Box const *)arg1)->next(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ifstream *arg2 = (std::ifstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_read",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_read" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ifstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_read" "', argument " "2"" of type '" "std::ifstream *""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - Box_read(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_write",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_write" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_write" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - Box_write(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box___and__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___and__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box___and__" "', argument " "2"" of type '" "Box *""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = Box___and__(arg1,arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - std::ofstream *arg2 = (std::ofstream *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box_writeOn" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__ofstream, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box_writeOn" "', argument " "2"" of type '" "std::ofstream *""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - Box_writeOn(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:Box___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___str__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - result = Box_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Box___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - Box *arg2 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:Box___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Box___cmp__" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Box, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Box___cmp__" "', argument " "2"" of type '" "Box const *""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (int)Box___cmp__(arg1,(Box const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_Box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = (Box *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Box, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Box" "', argument " "1"" of type '" "Box *""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Box_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Box, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_FArrayBox__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_FArrayBox",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FArrayBox" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FArrayBox" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FArrayBox" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (FArrayBox *)new FArrayBox((Box const &)*arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FArrayBox__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_FArrayBox")) SWIG_fail; - result = (FArrayBox *)new FArrayBox(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_FArrayBox(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_FArrayBox__SWIG_1(self, args); - } - if (argc == 2) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_FArrayBox__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_FArrayBox'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::FArrayBox(Box const &,int)\n" - " FArrayBox::FArrayBox()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_FArrayBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_FArrayBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FArrayBox" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_box",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_box" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->box(); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_nComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_nComp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_nComp" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (int)((FArrayBox const *)arg1)->nComp(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::ofstream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_writeOn" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ofstream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_writeOn" "', argument " "2"" of type '" "std::ofstream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_writeOn" "', argument " "2"" of type '" "std::ofstream &""'"); - } - arg2 = reinterpret_cast< std::ofstream * >(argp2); - ((FArrayBox const *)arg1)->writeOn(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::istream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_readFrom" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__istream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - arg2 = reinterpret_cast< std::istream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_norm",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_norm" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_norm" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_norm" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_norm" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (double)((FArrayBox const *)arg1)->norm(arg2,arg3,arg4); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:FArrayBox_copy",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_copy" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FArrayBox_copy" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->copy(*arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - Box *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_copy",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "Box &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "3"" of type '" "Box &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - (arg1)->copy(*arg2,*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_copy",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_copy" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_FArrayBox, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_copy" "', argument " "2"" of type '" "FArrayBox &""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - (arg1)->copy(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_copy(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_copy__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_copy__SWIG_1(self, args); - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_copy__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_copy'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::copy(FArrayBox &,int,int,int)\n" - " FArrayBox::copy(FArrayBox &,Box &)\n" - " FArrayBox::copy(FArrayBox &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - std::ifstream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_readFrom" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ifstream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::ifstream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_readFrom" "', argument " "2"" of type '" "std::ifstream &""'"); - } - arg2 = reinterpret_cast< std::ifstream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_readFrom(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__istream, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_readFrom__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__ifstream, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_readFrom__SWIG_1(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_readFrom'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::readFrom(std::istream &)\n" - " FArrayBox::readFrom(std::ifstream &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___str__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = FArrayBox_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:FArrayBox_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FArrayBox_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_setVal",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->setVal(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_setVal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setVal" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setVal(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setVal(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_3(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_2(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_1(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setVal__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_setVal'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::setVal(double,Box const &,int,int)\n" - " FArrayBox::setVal(double,Box const &,int)\n" - " FArrayBox::setVal(double,int)\n" - " FArrayBox::setVal(double)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->min(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_min",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (double)((FArrayBox const *)arg1)->min(); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_min",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_min" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->min((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_min" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_min" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (double)((FArrayBox const *)arg1)->min((Box const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_min(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_min__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_min__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_min__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_min__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_min'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::min(int) const\n" - " FArrayBox::min() const\n" - " FArrayBox::min(Box const &,int) const\n" - " FArrayBox::min(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->max(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_max",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (double)((FArrayBox const *)arg1)->max(); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_max",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_max" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->max((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_max" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_max" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (double)((FArrayBox const *)arg1)->max((Box const &)*arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_max(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_max__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_max__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_max__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_max__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_max'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::max(int) const\n" - " FArrayBox::max() const\n" - " FArrayBox::max(Box const &,int) const\n" - " FArrayBox::max(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_minIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = ((FArrayBox const *)arg1)->minIndex(arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_minIndex",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->minIndex(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_minIndex",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_minIndex" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = ((FArrayBox const *)arg1)->minIndex((Box const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_minIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_minIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_minIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = ((FArrayBox const *)arg1)->minIndex((Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_minIndex(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_minIndex__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_minIndex'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::minIndex(int) const\n" - " FArrayBox::minIndex() const\n" - " FArrayBox::minIndex(Box const &,int) const\n" - " FArrayBox::minIndex(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_maxIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = ((FArrayBox const *)arg1)->maxIndex(arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_maxIndex",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = ((FArrayBox const *)arg1)->maxIndex(); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_maxIndex",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_maxIndex" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = ((FArrayBox const *)arg1)->maxIndex((Box const &)*arg2,arg3); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< IntVect > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_maxIndex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_maxIndex" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_maxIndex" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = ((FArrayBox const *)arg1)->maxIndex((Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new IntVect(static_cast< const IntVect& >(result))), SWIGTYPE_p_IntVect, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_maxIndex(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_3(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_maxIndex__SWIG_2(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_maxIndex'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::maxIndex(int) const\n" - " FArrayBox::maxIndex() const\n" - " FArrayBox::maxIndex(Box const &,int) const\n" - " FArrayBox::maxIndex(Box const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_sum",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->sum(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_sum",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((FArrayBox const *)arg1)->sum(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_sum",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_sum" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - result = (double)((FArrayBox const *)arg1)->sum((Box const &)*arg2,arg3,arg4); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - Box *arg2 = 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_sum",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_sum" "', argument " "1"" of type '" "FArrayBox const *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FArrayBox_sum" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_sum" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((FArrayBox const *)arg1)->sum((Box const &)*arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_sum(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_3(self, args); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_0(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_sum__SWIG_2(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_sum'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::sum(int,int) const\n" - " FArrayBox::sum(int) const\n" - " FArrayBox::sum(Box const &,int,int) const\n" - " FArrayBox::sum(Box const &,int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_get_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FArrayBox_get_array",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_get_array" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - result = (PyObject *)FArrayBox_get_array(arg1); - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_valIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - IntVect *arg2 = (IntVect *) 0 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_valIV",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_valIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox_valIV" "', argument " "2"" of type '" "IntVect const *""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FArrayBox_valIV" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)FArrayBox_valIV(arg1,(IntVect const *)arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - IntVect *arg3 = (IntVect *) 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:FArrayBox_setValIV",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setValIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setValIV" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setValIV" "', argument " "3"" of type '" "IntVect const *""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FArrayBox_setValIV" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - FArrayBox_setValIV__SWIG_0(arg1,arg2,(IntVect const *)arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - IntVect *arg3 = (IntVect *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:FArrayBox_setValIV",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_setValIV" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_setValIV" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_IntVect, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FArrayBox_setValIV" "', argument " "3"" of type '" "IntVect const *""'"); - } - arg3 = reinterpret_cast< IntVect * >(argp3); - FArrayBox_setValIV__SWIG_0(arg1,arg2,(IntVect const *)arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_setValIV(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox_setValIV__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox_setValIV__SWIG_0(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'FArrayBox_setValIV'.\n" - " Possible C/C++ prototypes are:\n" - " FArrayBox::setValIV(double,IntVect const *,int)\n" - " FArrayBox::setValIV(double,IntVect const *)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox_floor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox_floor",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox_floor" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox_floor" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - FArrayBox_floor(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___add__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___add__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___add__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___sub__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___sub__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___sub__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___mul__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___mul__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___mul____SWIG_0(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___mul__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FArrayBox___mul__" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - result = (FArrayBox *)FArrayBox___mul____SWIG_1(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___mul__(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FArrayBox___mul____SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FArrayBox, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_FArrayBox___mul____SWIG_1(self, args); - } - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *_wrap_FArrayBox___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - FArrayBox *arg1 = (FArrayBox *) 0 ; - FArrayBox *arg2 = (FArrayBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:FArrayBox___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FArrayBox___div__" "', argument " "1"" of type '" "FArrayBox *""'"); - } - arg1 = reinterpret_cast< FArrayBox * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FArrayBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FArrayBox___div__" "', argument " "2"" of type '" "FArrayBox const *""'"); - } - arg2 = reinterpret_cast< FArrayBox * >(argp2); - result = (FArrayBox *)FArrayBox___div__(arg1,(FArrayBox const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *FArrayBox_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_FArrayBox, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_BoxArray__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_BoxArray")) SWIG_fail; - result = (BoxArray *)new BoxArray(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_BoxArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_BoxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoxArray" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BoxArray__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_BoxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_BoxArray, 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BoxArray" "', argument " "1"" of type '" "BoxArray &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BoxArray" "', argument " "1"" of type '" "BoxArray &""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (BoxArray *)new BoxArray(*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_BoxArray(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_BoxArray__SWIG_0(self, args); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_BoxArray__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_BoxArray'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::BoxArray()\n" - " BoxArray::BoxArray(BoxArray &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_resize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_resize" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->resize(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_define(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_define",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_define" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - (arg1)->define((BoxArray const &)*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_writeOn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - std::ostream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_writeOn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_writeOn" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__ostream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_writeOn" "', argument " "2"" of type '" "std::ostream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_writeOn" "', argument " "2"" of type '" "std::ostream &""'"); - } - arg2 = reinterpret_cast< std::ostream * >(argp2); - (arg1)->writeOn(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_readFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - std::istream *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_readFrom",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_readFrom" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__istream, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_readFrom" "', argument " "2"" of type '" "std::istream &""'"); - } - arg2 = reinterpret_cast< std::istream * >(argp2); - (arg1)->readFrom(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_size" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (int)(arg1)->size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_get",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_get" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_get" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (arg1)->get(arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - Box *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:BoxArray_set",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_set" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_set" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BoxArray_set" "', argument " "3"" of type '" "Box &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_set" "', argument " "3"" of type '" "Box &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - (arg1)->set(arg2,*arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_maxSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_maxSize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (BoxArray *) &(arg1)->maxSize(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_maxSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_maxSize" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_maxSize" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (BoxArray *) &(arg1)->maxSize((IntVect const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_maxSize(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_maxSize__SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_BoxArray_maxSize__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'BoxArray_maxSize'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::maxSize(int)\n" - " BoxArray::maxSize(IntVect const &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_ok" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (bool)((BoxArray const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_isDisjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_isDisjoint",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_isDisjoint" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (bool)((BoxArray const *)arg1)->isDisjoint(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - IntVect *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_IntVect, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "IntVect const &""'"); - } - arg2 = reinterpret_cast< IntVect * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((IntVect const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((Box const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_contains",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_contains" "', argument " "1"" of type '" "BoxArray const *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_contains" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_contains" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = (bool)((BoxArray const *)arg1)->contains((BoxArray const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_contains(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IntVect, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_0(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_BoxArray_contains__SWIG_2(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'BoxArray_contains'.\n" - " Possible C/C++ prototypes are:\n" - " BoxArray::contains(IntVect const &) const\n" - " BoxArray::contains(Box const &) const\n" - " BoxArray::contains(BoxArray const &) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_minimalBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray_minimalBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_minimalBox" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (arg1)->minimalBox(); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_refine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_refine",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_refine" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_refine" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->refine(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_coarsen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_coarsen",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_coarsen" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray_coarsen" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - (arg1)->coarsen(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SwigValueWrapper< Box > result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___getitem__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoxArray___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = BoxArray___getitem__(arg1,arg2); - resultobj = SWIG_NewPointerObj((new Box(static_cast< const Box& >(result))), SWIGTYPE_p_Box, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray_complementIn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - Box *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray_complementIn",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray_complementIn" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray_complementIn" "', argument " "2"" of type '" "Box const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray_complementIn" "', argument " "2"" of type '" "Box const &""'"); - } - arg2 = reinterpret_cast< Box * >(argp2); - result = BoxArray_complementIn(arg1,(Box const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___and__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___and__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___and__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray___and__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = BoxArray___and__(arg1,(BoxArray const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___or__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - BoxArray result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___or__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___or__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___or__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BoxArray___or__" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = BoxArray___or__(arg1,(BoxArray const &)*arg2); - resultobj = SWIG_NewPointerObj((new BoxArray(static_cast< const BoxArray& >(result))), SWIGTYPE_p_BoxArray, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___len__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = (int)BoxArray___len__(arg1); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_ParseTuple(args,(char *)"O:BoxArray___str__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___str__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - result = BoxArray_display(arg1); - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_BoxArray___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = (BoxArray *) 0 ; - BoxArray *arg2 = (BoxArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:BoxArray___cmp__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxArray___cmp__" "', argument " "1"" of type '" "BoxArray *""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_BoxArray, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BoxArray___cmp__" "', argument " "2"" of type '" "BoxArray const *""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - result = (int)BoxArray___cmp__(arg1,(BoxArray const *)arg2); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *BoxArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_BoxArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_SwigPyIterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_value",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_incr",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->incr(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_incr",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (swig::SwigPyIterator *)(arg1)->incr(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator_incr__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator_incr__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n" - " Possible C/C++ prototypes are:\n" - " swig::SwigPyIterator::incr(size_t)\n" - " swig::SwigPyIterator::incr()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_decr",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->decr(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_decr",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (swig::SwigPyIterator *)(arg1)->decr(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator_decr__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_size_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator_decr__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n" - " Possible C/C++ prototypes are:\n" - " swig::SwigPyIterator::decr(size_t)\n" - " swig::SwigPyIterator::decr()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - ptrdiff_t result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_distance",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - try { - result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); - } - catch(std::invalid_argument &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; - } - - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_equal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - try { - result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); - } - catch(std::invalid_argument &_e) { - SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; - } - - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_copy",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_next",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->next(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator___next__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->__next__(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SwigPyIterator_previous",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - try { - result = (PyObject *)(arg1)->previous(); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = result; - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator_advance",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)(arg1)->advance(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___iadd__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___isub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - ptrdiff_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - ptrdiff_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - swig::SwigPyIterator *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); - } - arg2 = static_cast< ptrdiff_t >(val2); - try { - result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); - } - catch(swig::stop_iteration &_e) { - { - (void)_e; - SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; - swig::SwigPyIterator *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - ptrdiff_t result; - - if (!PyArg_ParseTuple(args,(char *)"OO:SwigPyIterator___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); - } - arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); - } - arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); - result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); - resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SwigPyIterator___sub____SWIG_1(self, args); - } - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_SwigPyIterator___sub____SWIG_0(self, args); - } - } - } - -fail: - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; -} - - -SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_MultiFab__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - BoxArray *arg1 = 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - MultiFab *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:new_MultiFab",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MultiFab" "', argument " "1"" of type '" "BoxArray const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MultiFab" "', argument " "1"" of type '" "BoxArray const &""'"); - } - arg1 = reinterpret_cast< BoxArray * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiFab" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MultiFab" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (MultiFab *)new MultiFab((BoxArray const &)*arg1,arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiFab, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MultiFab__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_MultiFab")) SWIG_fail; - result = (MultiFab *)new MultiFab(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiFab, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_MultiFab(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - return _wrap_new_MultiFab__SWIG_1(self, args); - } - if (argc == 3) { - int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_MultiFab__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MultiFab'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::MultiFab(BoxArray const &,int,int)\n" - " MultiFab::MultiFab()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_MultiFab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_MultiFab",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiFab" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - BoxArray *arg2 = 0 ; - int arg3 ; - int arg4 ; - FabAlloc arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - void *argp5 ; - int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_define",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_define" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_define" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_define" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - { - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_FabAlloc, 0 | 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MultiFab_define" "', argument " "5"" of type '" "FabAlloc""'"); - } - if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "5"" of type '" "FabAlloc""'"); - } else { - FabAlloc * temp = reinterpret_cast< FabAlloc * >(argp5); - arg5 = *temp; - if (SWIG_IsNewObj(res5)) delete temp; - } - } - MultiFab_define__SWIG_0(arg1,(BoxArray const &)*arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - BoxArray *arg2 = 0 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_define",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_define" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BoxArray, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_define" "', argument " "2"" of type '" "BoxArray const &""'"); - } - arg2 = reinterpret_cast< BoxArray * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_define" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_define" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - MultiFab_define__SWIG_0(arg1,(BoxArray const &)*arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_define(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 5) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_define__SWIG_1(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_BoxArray, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_FabAlloc, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_define__SWIG_0(self, args); - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_define'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::define(BoxArray const &,int,int,FabAlloc)\n" - " MultiFab::define(BoxArray const &,int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - bool result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_ok",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_ok" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (bool)((MultiFab const *)arg1)->ok(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_nGrow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_nGrow",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_nGrow" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->nGrow(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_boxArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - BoxArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_boxArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_boxArray" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (BoxArray *) &((MultiFab const *)arg1)->boxArray(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_size" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->size(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_nComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_nComp",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_nComp" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (int)((MultiFab const *)arg1)->nComp(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_min",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_min" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_min" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((MultiFab const *)arg1)->min(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_min",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_min" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_min" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((MultiFab const *)arg1)->min(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_min(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_min__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_min__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_min'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::min(int,int) const\n" - " MultiFab::min(int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_max",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_max" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_max" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - result = (double)((MultiFab const *)arg1)->max(arg2,arg3); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_max",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_max" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_max" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)((MultiFab const *)arg1)->max(arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_max(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_max__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_max__SWIG_0(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_max'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::max(int,int) const\n" - " MultiFab::max(int) const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - MultiFab *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_copy",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_copy" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_copy" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_copy" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - (arg1)->copy(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_setVal",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setVal(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - int arg6 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - int val6 ; - int ecode6 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - ecode6 = SWIG_AsVal_int(obj5, &val6); - if (!SWIG_IsOK(ecode6)) { - SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "MultiFab_setVal" "', argument " "6"" of type '" "int""'"); - } - arg6 = static_cast< int >(val6); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5,arg6); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_setVal" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_setVal",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->setVal(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - Box *arg3 = 0 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setVal",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setVal" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setVal" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiFab_setVal" "', argument " "3"" of type '" "Box const &""'"); - } - arg3 = reinterpret_cast< Box * >(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setVal" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setVal(arg2,(Box const &)*arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setVal(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[7]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 6) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_0(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_5(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_6(self, args); - } - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_2(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_4(self, args); - } - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_1(self, args); - } - } - } - } - } - } - if (argc == 6) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Box, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[5], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setVal__SWIG_3(self, args); - } - } - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_setVal'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::setVal(double)\n" - " MultiFab::setVal(double,int,int,int)\n" - " MultiFab::setVal(double,int,int)\n" - " MultiFab::setVal(double,Box const &,int,int,int)\n" - " MultiFab::setVal(double,Box const &,int,int)\n" - " MultiFab::setVal(double,int)\n" - " MultiFab::setVal(double,Box const &,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_setBndry",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setBndry" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setBndry" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - (arg1)->setBndry(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - double arg2 ; - int arg3 ; - int arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:MultiFab_setBndry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_setBndry" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_setBndry" "', argument " "2"" of type '" "double""'"); - } - arg2 = static_cast< double >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_setBndry" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_setBndry" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - (arg1)->setBndry(arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_setBndry(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setBndry__SWIG_0(self, args); - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_double(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_setBndry__SWIG_1(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_setBndry'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::setBndry(double)\n" - " MultiFab::setBndry(double,int,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - int arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_FillBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_FillBoundary" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - (arg1)->FillBoundary(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - bool arg2 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:MultiFab_FillBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_FillBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - (arg1)->FillBoundary(arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_FillBoundary",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_FillBoundary" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - (arg1)->FillBoundary(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_FillBoundary",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_FillBoundary" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - (arg1)->FillBoundary(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_FillBoundary(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 3) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_3(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_0(self, args); - } - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_FillBoundary__SWIG_1(self, args); - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_FillBoundary'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::FillBoundary(int,int)\n" - " MultiFab::FillBoundary(bool,bool)\n" - " MultiFab::FillBoundary(bool)\n" - " MultiFab::FillBoundary()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_sum",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_sum" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab_sum" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (double)MultiFab_sum__SWIG_0((MultiFab const *)arg1,arg2); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:MultiFab_sum",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_sum" "', argument " "1"" of type '" "MultiFab const *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - result = (double)MultiFab_sum__SWIG_0((MultiFab const *)arg1); - resultobj = SWIG_From_double(static_cast< double >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_sum(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_MultiFab_sum__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_MultiFab_sum__SWIG_0(self, args); - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiFab_sum'.\n" - " Possible C/C++ prototypes are:\n" - " MultiFab::sum(int) const\n" - " MultiFab::sum() const\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_writeOut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab_writeOut",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_writeOut" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_writeOut" "', argument " "2"" of type '" "char *""'"); - } - arg2 = reinterpret_cast< char * >(buf2); - MultiFab_writeOut(arg1,arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab_copyComp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - MultiFab *arg2 = (MultiFab *) 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int val4 ; - int ecode4 = 0 ; - int val5 ; - int ecode5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:MultiFab_copyComp",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab_copyComp" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiFab_copyComp" "', argument " "2"" of type '" "MultiFab *""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiFab_copyComp" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiFab_copyComp" "', argument " "4"" of type '" "int""'"); - } - arg4 = static_cast< int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MultiFab_copyComp" "', argument " "5"" of type '" "int""'"); - } - arg5 = static_cast< int >(val5); - MultiFab_copyComp(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MultiFab___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - MultiFab *arg1 = (MultiFab *) 0 ; - int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - FArrayBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:MultiFab___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MultiFab, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiFab___getitem__" "', argument " "1"" of type '" "MultiFab *""'"); - } - arg1 = reinterpret_cast< MultiFab * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiFab___getitem__" "', argument " "2"" of type '" "int""'"); - } - arg2 = static_cast< int >(val2); - result = (FArrayBox *)MultiFab___getitem__(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FArrayBox, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *MultiFab_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_MultiFab, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_RealBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Real *arg1 ; - Real *arg2 ; - PyArrayObject *array1 = NULL ; - int is_new_object1 = 0 ; - PyArrayObject *array2 = NULL ; - int is_new_object2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - RealBox *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:new_RealBox",&obj0,&obj1)) SWIG_fail; - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array1 = obj_to_array_contiguous_allow_conversion(obj0, NPY_DOUBLE, - &is_new_object1); - if (!array1 || !require_dimensions(array1, 1) || - !require_size(array1, size, 1)) SWIG_fail; - arg1 = (double *) array_data(array1); - } - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array2 = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, - &is_new_object2); - if (!array2 || !require_dimensions(array2, 1) || - !require_size(array2, size, 1)) SWIG_fail; - arg2 = (double *) array_data(array2); - } - result = (RealBox *)new RealBox(arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RealBox, SWIG_POINTER_NEW | 0 ); - { - if (is_new_object1 && array1) - { - Py_DECREF(array1); - } - } - { - if (is_new_object2 && array2) - { - Py_DECREF(array2); - } - } - return resultobj; -fail: - { - if (is_new_object1 && array1) - { - Py_DECREF(array1); - } - } - { - if (is_new_object2 && array2) - { - Py_DECREF(array2); - } - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_RealBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - RealBox *arg1 = (RealBox *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_RealBox",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_RealBox, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RealBox" "', argument " "1"" of type '" "RealBox *""'"); - } - arg1 = reinterpret_cast< RealBox * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *RealBox_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_RealBox, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Box *arg1 = 0 ; - RealBox *arg2 = (RealBox *) 0 ; - int arg3 ; - int *arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyArrayObject *array4 = NULL ; - int is_new_object4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - Geometry *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:new_Geometry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Box, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Geometry" "', argument " "1"" of type '" "Box const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Geometry" "', argument " "1"" of type '" "Box const &""'"); - } - arg1 = reinterpret_cast< Box * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_RealBox, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "RealBox const *""'"); - } - arg2 = reinterpret_cast< RealBox * >(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Geometry" "', argument " "3"" of type '" "int""'"); - } - arg3 = static_cast< int >(val3); - { - npy_intp size[1] = { - BL_SPACEDIM - }; - array4 = obj_to_array_contiguous_allow_conversion(obj3, NPY_INT, - &is_new_object4); - if (!array4 || !require_dimensions(array4, 1) || - !require_size(array4, size, 1)) SWIG_fail; - arg4 = (int *) array_data(array4); - } - result = (Geometry *)new Geometry((Box const &)*arg1,(RealBox const *)arg2,arg3,arg4); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Geometry, SWIG_POINTER_NEW | 0 ); - { - if (is_new_object4 && array4) - { - Py_DECREF(array4); - } - } - return resultobj; -fail: - { - if (is_new_object4 && array4) - { - Py_DECREF(array4); - } - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - bool arg3 ; - bool arg4 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - bool val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:Geometry_FillPeriodicBoundary",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - ecode4 = SWIG_AsVal_bool(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "4"" of type '" "bool""'"); - } - arg4 = static_cast< bool >(val4); - (arg1)->FillPeriodicBoundary(*arg2,arg3,arg4); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - bool arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - bool val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:Geometry_FillPeriodicBoundary",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - ecode3 = SWIG_AsVal_bool(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "3"" of type '" "bool""'"); - } - arg3 = static_cast< bool >(val3); - (arg1)->FillPeriodicBoundary(*arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - MultiFab *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_FillPeriodicBoundary",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_MultiFab, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Geometry_FillPeriodicBoundary" "', argument " "2"" of type '" "MultiFab &""'"); - } - arg2 = reinterpret_cast< MultiFab * >(argp2); - (arg1)->FillPeriodicBoundary(*arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_Geometry_FillPeriodicBoundary(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? (int)PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Geometry, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_MultiFab, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_bool(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_bool(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_Geometry_FillPeriodicBoundary__SWIG_0(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Geometry_FillPeriodicBoundary'.\n" - " Possible C/C++ prototypes are:\n" - " Geometry::FillPeriodicBoundary(MultiFab &,bool,bool)\n" - " Geometry::FillPeriodicBoundary(MultiFab &,bool)\n" - " Geometry::FillPeriodicBoundary(MultiFab &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Geometry *arg1 = (Geometry *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Geometry",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Geometry, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "Geometry *""'"); - } - arg1 = reinterpret_cast< Geometry * >(argp1); - delete arg1; - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Geometry, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"StartParallel", _wrap_StartParallel, METH_VARARGS, NULL}, - { (char *)"rank", _wrap_rank, METH_VARARGS, NULL}, - { (char *)"size", _wrap_size, METH_VARARGS, NULL}, - { (char *)"ReduceRealMax", _wrap_ReduceRealMax, METH_VARARGS, NULL}, - { (char *)"open_ifstream", _wrap_open_ifstream, METH_VARARGS, NULL}, - { (char *)"open_ofstream", _wrap_open_ofstream, METH_VARARGS, NULL}, - { (char *)"close_ofstream", _wrap_close_ofstream, METH_VARARGS, NULL}, - { (char *)"close_ifstream", _wrap_close_ifstream, METH_VARARGS, NULL}, - { (char *)"new_IntVect", _wrap_new_IntVect, METH_VARARGS, NULL}, - { (char *)"IntVect_shift", _wrap_IntVect_shift, METH_VARARGS, NULL}, - { (char *)"IntVect_writeOn", _wrap_IntVect_writeOn, METH_VARARGS, NULL}, - { (char *)"IntVect_read", _wrap_IntVect_read, METH_VARARGS, NULL}, - { (char *)"IntVect___getitem__", _wrap_IntVect___getitem__, METH_VARARGS, NULL}, - { (char *)"IntVect___len__", _wrap_IntVect___len__, METH_VARARGS, NULL}, - { (char *)"IntVect___setitem__", _wrap_IntVect___setitem__, METH_VARARGS, NULL}, - { (char *)"IntVect___cmp__", _wrap_IntVect___cmp__, METH_VARARGS, NULL}, - { (char *)"IntVect___str__", _wrap_IntVect___str__, METH_VARARGS, NULL}, - { (char *)"IntVect_TheZeroVector", _wrap_IntVect_TheZeroVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheUnitVector", _wrap_IntVect_TheUnitVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheNodeVector", _wrap_IntVect_TheNodeVector, METH_VARARGS, NULL}, - { (char *)"IntVect_TheCellVector", _wrap_IntVect_TheCellVector, METH_VARARGS, NULL}, - { (char *)"delete_IntVect", _wrap_delete_IntVect, METH_VARARGS, NULL}, - { (char *)"IntVect_swigregister", IntVect_swigregister, METH_VARARGS, NULL}, - { (char *)"new_Box", _wrap_new_Box, METH_VARARGS, NULL}, - { (char *)"Box_smallEnd", _wrap_Box_smallEnd, METH_VARARGS, NULL}, - { (char *)"Box_bigEnd", _wrap_Box_bigEnd, METH_VARARGS, NULL}, - { (char *)"Box_type", _wrap_Box_type, METH_VARARGS, NULL}, - { (char *)"Box_size", _wrap_Box_size, METH_VARARGS, NULL}, - { (char *)"Box_ok", _wrap_Box_ok, METH_VARARGS, NULL}, - { (char *)"Box_contains", _wrap_Box_contains, METH_VARARGS, NULL}, - { (char *)"Box_intersects", _wrap_Box_intersects, METH_VARARGS, NULL}, - { (char *)"Box_sameSize", _wrap_Box_sameSize, METH_VARARGS, NULL}, - { (char *)"Box_sameType", _wrap_Box_sameType, METH_VARARGS, NULL}, - { (char *)"Box_cellCentered", _wrap_Box_cellCentered, METH_VARARGS, NULL}, - { (char *)"Box_numPts", _wrap_Box_numPts, METH_VARARGS, NULL}, - { (char *)"Box_volume", _wrap_Box_volume, METH_VARARGS, NULL}, - { (char *)"Box_index", _wrap_Box_index, METH_VARARGS, NULL}, - { (char *)"Box_setSmall", _wrap_Box_setSmall, METH_VARARGS, NULL}, - { (char *)"Box_setBig", _wrap_Box_setBig, METH_VARARGS, NULL}, - { (char *)"Box_shift", _wrap_Box_shift, METH_VARARGS, NULL}, - { (char *)"Box_shiftHalf", _wrap_Box_shiftHalf, METH_VARARGS, NULL}, - { (char *)"Box_convert", _wrap_Box_convert, METH_VARARGS, NULL}, - { (char *)"Box_surroundingNodes", _wrap_Box_surroundingNodes, METH_VARARGS, NULL}, - { (char *)"Box_enclosedCells", _wrap_Box_enclosedCells, METH_VARARGS, NULL}, - { (char *)"Box_minBox", _wrap_Box_minBox, METH_VARARGS, NULL}, - { (char *)"Box_chop", _wrap_Box_chop, METH_VARARGS, NULL}, - { (char *)"Box_grow", _wrap_Box_grow, METH_VARARGS, NULL}, - { (char *)"Box_growLo", _wrap_Box_growLo, METH_VARARGS, NULL}, - { (char *)"Box_growHi", _wrap_Box_growHi, METH_VARARGS, NULL}, - { (char *)"Box_refine", _wrap_Box_refine, METH_VARARGS, NULL}, - { (char *)"Box_coarsen", _wrap_Box_coarsen, METH_VARARGS, NULL}, - { (char *)"Box_next", _wrap_Box_next, METH_VARARGS, NULL}, - { (char *)"Box_read", _wrap_Box_read, METH_VARARGS, NULL}, - { (char *)"Box_write", _wrap_Box_write, METH_VARARGS, NULL}, - { (char *)"Box___and__", _wrap_Box___and__, METH_VARARGS, NULL}, - { (char *)"Box_writeOn", _wrap_Box_writeOn, METH_VARARGS, NULL}, - { (char *)"Box___str__", _wrap_Box___str__, METH_VARARGS, NULL}, - { (char *)"Box___cmp__", _wrap_Box___cmp__, METH_VARARGS, NULL}, - { (char *)"delete_Box", _wrap_delete_Box, METH_VARARGS, NULL}, - { (char *)"Box_swigregister", Box_swigregister, METH_VARARGS, NULL}, - { (char *)"new_FArrayBox", _wrap_new_FArrayBox, METH_VARARGS, NULL}, - { (char *)"delete_FArrayBox", _wrap_delete_FArrayBox, METH_VARARGS, NULL}, - { (char *)"FArrayBox_box", _wrap_FArrayBox_box, METH_VARARGS, NULL}, - { (char *)"FArrayBox_nComp", _wrap_FArrayBox_nComp, METH_VARARGS, NULL}, - { (char *)"FArrayBox_writeOn", _wrap_FArrayBox_writeOn, METH_VARARGS, NULL}, - { (char *)"FArrayBox_norm", _wrap_FArrayBox_norm, METH_VARARGS, NULL}, - { (char *)"FArrayBox_copy", _wrap_FArrayBox_copy, METH_VARARGS, NULL}, - { (char *)"FArrayBox_readFrom", _wrap_FArrayBox_readFrom, METH_VARARGS, NULL}, - { (char *)"FArrayBox___str__", _wrap_FArrayBox___str__, METH_VARARGS, NULL}, - { (char *)"FArrayBox_setVal", _wrap_FArrayBox_setVal, METH_VARARGS, NULL}, - { (char *)"FArrayBox_min", _wrap_FArrayBox_min, METH_VARARGS, NULL}, - { (char *)"FArrayBox_max", _wrap_FArrayBox_max, METH_VARARGS, NULL}, - { (char *)"FArrayBox_minIndex", _wrap_FArrayBox_minIndex, METH_VARARGS, NULL}, - { (char *)"FArrayBox_maxIndex", _wrap_FArrayBox_maxIndex, METH_VARARGS, NULL}, - { (char *)"FArrayBox_sum", _wrap_FArrayBox_sum, METH_VARARGS, NULL}, - { (char *)"FArrayBox_get_array", _wrap_FArrayBox_get_array, METH_VARARGS, NULL}, - { (char *)"FArrayBox_valIV", _wrap_FArrayBox_valIV, METH_VARARGS, NULL}, - { (char *)"FArrayBox_setValIV", _wrap_FArrayBox_setValIV, METH_VARARGS, NULL}, - { (char *)"FArrayBox_floor", _wrap_FArrayBox_floor, METH_VARARGS, NULL}, - { (char *)"FArrayBox___add__", _wrap_FArrayBox___add__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___sub__", _wrap_FArrayBox___sub__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___mul__", _wrap_FArrayBox___mul__, METH_VARARGS, NULL}, - { (char *)"FArrayBox___div__", _wrap_FArrayBox___div__, METH_VARARGS, NULL}, - { (char *)"FArrayBox_swigregister", FArrayBox_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_BoxArray", _wrap_delete_BoxArray, METH_VARARGS, NULL}, - { (char *)"new_BoxArray", _wrap_new_BoxArray, METH_VARARGS, NULL}, - { (char *)"BoxArray_resize", _wrap_BoxArray_resize, METH_VARARGS, NULL}, - { (char *)"BoxArray_define", _wrap_BoxArray_define, METH_VARARGS, NULL}, - { (char *)"BoxArray_writeOn", _wrap_BoxArray_writeOn, METH_VARARGS, NULL}, - { (char *)"BoxArray_readFrom", _wrap_BoxArray_readFrom, METH_VARARGS, NULL}, - { (char *)"BoxArray_size", _wrap_BoxArray_size, METH_VARARGS, NULL}, - { (char *)"BoxArray_get", _wrap_BoxArray_get, METH_VARARGS, NULL}, - { (char *)"BoxArray_set", _wrap_BoxArray_set, METH_VARARGS, NULL}, - { (char *)"BoxArray_maxSize", _wrap_BoxArray_maxSize, METH_VARARGS, NULL}, - { (char *)"BoxArray_ok", _wrap_BoxArray_ok, METH_VARARGS, NULL}, - { (char *)"BoxArray_isDisjoint", _wrap_BoxArray_isDisjoint, METH_VARARGS, NULL}, - { (char *)"BoxArray_contains", _wrap_BoxArray_contains, METH_VARARGS, NULL}, - { (char *)"BoxArray_minimalBox", _wrap_BoxArray_minimalBox, METH_VARARGS, NULL}, - { (char *)"BoxArray_refine", _wrap_BoxArray_refine, METH_VARARGS, NULL}, - { (char *)"BoxArray_coarsen", _wrap_BoxArray_coarsen, METH_VARARGS, NULL}, - { (char *)"BoxArray___getitem__", _wrap_BoxArray___getitem__, METH_VARARGS, NULL}, - { (char *)"BoxArray_complementIn", _wrap_BoxArray_complementIn, METH_VARARGS, NULL}, - { (char *)"BoxArray___and__", _wrap_BoxArray___and__, METH_VARARGS, NULL}, - { (char *)"BoxArray___or__", _wrap_BoxArray___or__, METH_VARARGS, NULL}, - { (char *)"BoxArray___len__", _wrap_BoxArray___len__, METH_VARARGS, NULL}, - { (char *)"BoxArray___str__", _wrap_BoxArray___str__, METH_VARARGS, NULL}, - { (char *)"BoxArray___cmp__", _wrap_BoxArray___cmp__, METH_VARARGS, NULL}, - { (char *)"BoxArray_swigregister", BoxArray_swigregister, METH_VARARGS, NULL}, - { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, - { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL}, - { (char *)"new_MultiFab", _wrap_new_MultiFab, METH_VARARGS, NULL}, - { (char *)"delete_MultiFab", _wrap_delete_MultiFab, METH_VARARGS, NULL}, - { (char *)"MultiFab_define", _wrap_MultiFab_define, METH_VARARGS, NULL}, - { (char *)"MultiFab_ok", _wrap_MultiFab_ok, METH_VARARGS, NULL}, - { (char *)"MultiFab_nGrow", _wrap_MultiFab_nGrow, METH_VARARGS, NULL}, - { (char *)"MultiFab_boxArray", _wrap_MultiFab_boxArray, METH_VARARGS, NULL}, - { (char *)"MultiFab_size", _wrap_MultiFab_size, METH_VARARGS, NULL}, - { (char *)"MultiFab_nComp", _wrap_MultiFab_nComp, METH_VARARGS, NULL}, - { (char *)"MultiFab_min", _wrap_MultiFab_min, METH_VARARGS, NULL}, - { (char *)"MultiFab_max", _wrap_MultiFab_max, METH_VARARGS, NULL}, - { (char *)"MultiFab_copy", _wrap_MultiFab_copy, METH_VARARGS, NULL}, - { (char *)"MultiFab_setVal", _wrap_MultiFab_setVal, METH_VARARGS, NULL}, - { (char *)"MultiFab_setBndry", _wrap_MultiFab_setBndry, METH_VARARGS, NULL}, - { (char *)"MultiFab_FillBoundary", _wrap_MultiFab_FillBoundary, METH_VARARGS, NULL}, - { (char *)"MultiFab_sum", _wrap_MultiFab_sum, METH_VARARGS, NULL}, - { (char *)"MultiFab_writeOut", _wrap_MultiFab_writeOut, METH_VARARGS, NULL}, - { (char *)"MultiFab_copyComp", _wrap_MultiFab_copyComp, METH_VARARGS, NULL}, - { (char *)"MultiFab___getitem__", _wrap_MultiFab___getitem__, METH_VARARGS, NULL}, - { (char *)"MultiFab_swigregister", MultiFab_swigregister, METH_VARARGS, NULL}, - { (char *)"new_RealBox", _wrap_new_RealBox, METH_VARARGS, NULL}, - { (char *)"delete_RealBox", _wrap_delete_RealBox, METH_VARARGS, NULL}, - { (char *)"RealBox_swigregister", RealBox_swigregister, METH_VARARGS, NULL}, - { (char *)"new_Geometry", _wrap_new_Geometry, METH_VARARGS, NULL}, - { (char *)"Geometry_FillPeriodicBoundary", _wrap_Geometry_FillPeriodicBoundary, METH_VARARGS, NULL}, - { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, NULL}, - { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static swig_type_info _swigt__p_Box = {"_p_Box", "Box *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_BoxArray = {"_p_BoxArray", "BoxArray *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FArrayBox = {"_p_FArrayBox", "FArrayBox *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_FabAlloc = {"_p_FabAlloc", "FabAlloc *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Geometry = {"_p_Geometry", "Geometry *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_IntVect = {"_p_IntVect", "IntVect *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_MultiFab = {"_p_MultiFab", "MultiFab *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_RealBox = {"_p_RealBox", "RealBox *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *|Real *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ifstream = {"_p_std__ifstream", "std::ifstream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__istream = {"_p_std__istream", "std::istream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ofstream = {"_p_std__ofstream", "std::ofstream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_Box, - &_swigt__p_BoxArray, - &_swigt__p_FArrayBox, - &_swigt__p_FabAlloc, - &_swigt__p_Geometry, - &_swigt__p_IntVect, - &_swigt__p_MultiFab, - &_swigt__p_RealBox, - &_swigt__p_char, - &_swigt__p_double, - &_swigt__p_std__ifstream, - &_swigt__p_std__invalid_argument, - &_swigt__p_std__istream, - &_swigt__p_std__ofstream, - &_swigt__p_std__ostream, - &_swigt__p_swig__SwigPyIterator, -}; - -static swig_cast_info _swigc__p_Box[] = { {&_swigt__p_Box, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_BoxArray[] = { {&_swigt__p_BoxArray, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FArrayBox[] = { {&_swigt__p_FArrayBox, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FabAlloc[] = { {&_swigt__p_FabAlloc, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Geometry[] = { {&_swigt__p_Geometry, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_IntVect[] = { {&_swigt__p_IntVect, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_MultiFab[] = { {&_swigt__p_MultiFab, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_RealBox[] = { {&_swigt__p_RealBox, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ifstream[] = { {&_swigt__p_std__ifstream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__istream[] = { {&_swigt__p_std__istream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ofstream[] = { {&_swigt__p_std__ofstream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_Box, - _swigc__p_BoxArray, - _swigc__p_FArrayBox, - _swigc__p_FabAlloc, - _swigc__p_Geometry, - _swigc__p_IntVect, - _swigc__p_MultiFab, - _swigc__p_RealBox, - _swigc__p_char, - _swigc__p_double, - _swigc__p_std__ifstream, - _swigc__p_std__invalid_argument, - _swigc__p_std__istream, - _swigc__p_std__ofstream, - _swigc__p_std__ostream, - _swigc__p_swig__SwigPyIterator, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -static swig_const_info swig_const_table[] = { -{0, 0, 0, 0.0, 0, 0}}; - -#ifdef __cplusplus -} -#endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif - -#if 0 -#define SWIGRUNTIME_DEBUG -#endif - - -SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int found, init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; - iter=module_head; - do { - if (iter==&swig_module) { - found=1; - break; - } - iter=iter->next; - } while (iter!= module_head); - - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void -SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -#if 0 -{ - /* c-mode */ -#endif -} -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError,"Unknown C global variable"); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError,"Unknown C global variable"); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&varlink_type) < 0) - return NULL; -#endif - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - strncpy(gv->name,name,size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch(constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ - - SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (c && (c = strstr(c, "swig_ptr: "))) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, - strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - -#ifdef __cplusplus -} -#endif - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -#endif - -SWIGEXPORT -#if PY_VERSION_HEX >= 0x03000000 -PyObject* -#else -void -#endif -SWIG_init(void) { - PyObject *m, *d, *md; -#if PY_VERSION_HEX >= 0x03000000 - static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 - PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, - NULL, - -1, - SwigMethods, - NULL, - NULL, - NULL, - NULL - }; -#endif - -#if defined(SWIGPYTHON_BUILTIN) - static SwigPyClientData SwigPyObject_clientdata = { - 0, 0, 0, 0, 0, 0, 0 - }; - static PyGetSetDef this_getset_def = { - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL - }; - static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own - }; - static PyGetSetDef thisown_getset_def = { - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure - }; - PyObject *metatype_args; - PyTypeObject *builtin_pytype; - int builtin_base_count; - swig_type_info *builtin_basetype; - PyObject *tuple; - PyGetSetDescrObject *static_getset; - PyTypeObject *metatype; - SwigPyClientData *cd; - PyObject *public_interface, *public_symbol; - PyObject *this_descr; - PyObject *thisown_descr; - int i; - - (void)builtin_pytype; - (void)builtin_base_count; - (void)builtin_basetype; - (void)tuple; - (void)static_getset; - - /* metatype is used to implement static member variables. */ - metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); - assert(metatype_args); - metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); - assert(metatype); - Py_DECREF(metatype_args); - metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; - assert(PyType_Ready(metatype) >= 0); -#endif - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 - m = PyModule_Create(&SWIG_module); -#else - m = Py_InitModule((char *) SWIG_name, SwigMethods); -#endif - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - if (!cd) { - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); - } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); -# if PY_VERSION_HEX >= 0x03000000 - return NULL; -# else - return; -# endif - } - - /* All objects have a 'this' attribute */ - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); - (void)this_descr; - - /* All objects have a 'thisown' attribute */ - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); - (void)thisown_descr; - - public_interface = PyList_New(0); - public_symbol = 0; - (void)public_symbol; - - PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); - for (i = 0; SwigMethods[i].ml_name != NULL; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); - for (i = 0; swig_const_table[i].name != 0; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); -#endif - - SWIG_InstallConstants(d,swig_const_table); - - - import_array(); - - SWIG_Python_SetConstant(d, "BL_DIM",SWIG_From_int(static_cast< int >(3))); -#if PY_VERSION_HEX >= 0x03000000 - return m; -#else - return; -#endif -} - diff --git a/Src/Python/swig/boxlib.i b/Src/Python/swig/boxlib.i deleted file mode 100644 index e46de9a6f..000000000 --- a/Src/Python/swig/boxlib.i +++ /dev/null @@ -1,649 +0,0 @@ -#ifdef DIM1 -%module bl1 -#endif -#ifdef DIM2 -%module bl2 -#endif - #ifdef DIM3 -%module bl3 -#endif -%{ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SWIG_FILE_WITH_INIT -%} - -%include "numpy.i" - -%init %{ - import_array(); -%} - -#ifdef DIM1 -%constant int BL_DIM = 1; -#endif -#ifdef DIM2 -%constant int BL_DIM = 2; -#endif -#ifdef DIM3 -%constant int BL_DIM = 3; -#endif - -%inline %{ - void StartParallel() { - ParallelDescriptor::StartParallel(); - } - int rank() { - return ParallelDescriptor::MyProc(); - } - int size() { - return ParallelDescriptor::NProcs(); - } - Real ReduceRealMax (Real lval) { - Real rvar = lval; - ParallelDescriptor::ReduceRealMax(rvar); - return rvar; - } -%} - -%inline %{ - std::ifstream & open_ifstream(const char *filename) { - std::ifstream *infile = new std::ifstream(filename); - return *infile; - } -%} - -%inline %{ - std::ofstream & open_ofstream(const char *filename) { - std::ofstream *outfile = new std::ofstream(filename); - return *outfile; - } -%} - -%inline %{ - void close_ofstream(std::ofstream& str) { - str.close(); - } -%} - -%inline %{ - void close_ifstream(std::ifstream & str) { - str.close(); - } -%} - -%include - -%include -%rename(__str__) display; - - -typedef double Real; - -template -class Array - : - public std::vector -{ -public: - // - // Constructs an Array with no elements - // - Array (); - // - // Constructs an Array of size len with the value of each - // element defined by the default constructor for T. - // - explicit Array (size_t len); - // - // Constructs an Array of size len with the value of each - // elements given by initialvalue. - // - Array (size_t len, - const T& initialvalue); - // - // Constructs an Array of size len in which the K'th - // value is a copy of vec[K]. - // - Array (const T* vec, - size_t len); - - int size () const { return self->std::vector::size(); } - // - // Returns a reference to the K'th element in self Array. - // The element can be modified through self reference. The - // result can be used as an L-value. - // - %extend{ T& __getitem__ (size_t i) - { - BL_ASSERT(i < size()); return self->std::vector::operator[](i); - } - } - // - // Same as above, except acts on const Array's. - // - %extend{ const T& __getitem__ (size_t i) const - { - BL_ASSERT(i < size()); return self->std::vector::operator[](i); - } - } - // - // Different syntax for operator[]. - // - T& get (size_t i) { return self->operator[](i); } - // - // Different syntax for const operator[]. - // - const T& get (size_t i) const { return self->operator[](i); } - // - // Returns pointer to vector of data. This function breaks object - // encapsulation and should only be used for interfacing to - // Fortran subroutines. - // - T* dataPtr () { return &self->operator[](0); } - // - // Same as above for constant arrays. - // - const T* dataPtr () const { return &self->operator[](0); } - // - // Changes the i'th element of self Array to elem. - // - void set (size_t i, const T& elem) { get(i) = elem; } -private: - // - // This is disallowed. - // - Array& operator= (int); -}; - - - -class IntVect { -public: - -#ifdef DIM1 - IntVect(int i); -#endif -#ifdef DIM2 - IntVect(int i, int j); -#endif -#ifdef DIM3 - IntVect(int i, int j, int k); -#endif - IntVect (const IntVect& rhs); - - IntVect& shift(int coord, int s); - - %extend { - void writeOn(std::ofstream *os ){ - *os << *self; - } - void read(std::ifstream* ifs){ - *ifs >> *self; - } - int __getitem__(int index){ - return (*self)[index]; - } - int __len__() volatile { return BL_SPACEDIM; } - void __setitem__(int index,int val){ - (*self).setVal(index,val); - } - int __cmp__(const IntVect* other){ - if( (*self) == (*other) ) { - return 0; - } - if( (*self) <= (*other) ) { - return -1; - } - return 1; - } - - std::string display() { - std::ostringstream str; - str << *self; - return str.str(); - } - } - // static functions - static const IntVect& TheZeroVector(); - static const IntVect& TheUnitVector(); - static const IntVect& TheNodeVector(); - static const IntVect& TheCellVector(); -}; - - -class Box { -public: - Box(const IntVect& small, const IntVect& big); - - Box (const IntVect& small, - const IntVect& big, - const IntVect& typ); - - Box ( const Box& b); - - const IntVect smallEnd () const; - const IntVect bigEnd () const; - IntVect type () const; - const IntVect size () const; - bool contains (const IntVect& p) const; - bool ok() const; - bool contains (const Box& b) const; - bool intersects (const Box& b) const; - bool sameSize (const Box& b) const; - bool sameType (const Box &b) const; - bool cellCentered () const; - long numPts () const; - long volume () const; - long index (const IntVect& v) const; - Box& setSmall (const IntVect& sm); - Box& setBig (const IntVect& bg); - Box& shift (int dir, - int nzones); - Box& shiftHalf (int dir, - int num_halfs); - Box& convert (const IntVect& typ); - Box& surroundingNodes (int dir); - Box& enclosedCells (int dir); - Box& minBox (const Box &); - Box chop (int dir, - int chop_pnt); - Box& grow (int i); - Box& grow (int idir, int n_cell); - Box& growLo (int idir, - int n_cell=1); - Box& growHi (int idir, - int n_cell=1); - Box& refine (int refinement_ratio); - Box& coarsen (int refinement_ratio); - void next (IntVect &) const; - - %extend{ - void read(std::ifstream* ifs){ - *ifs >> *self; - } - void write(std::ofstream* os){ - *os << *self; - } - Box __and__(Box *right){ - Box result; - result = *self & *right; - return result; - } - void writeOn(std::ofstream *os){ - *os << *self; - } - - std::string display() { - std::ostringstream str; - str << *self; - return str.str(); - } - - int __cmp__(const Box* other){ - if(*self == *other) return 0; - else if( self->smallEnd().lexLT(other->smallEnd())){ - return 1; - } - else { - return -1; - } - } - } -}; - -class FArrayBox { -public: - FArrayBox( const Box& b, int ncomp); - FArrayBox(); - ~FArrayBox(); - - Box box() const; - int nComp() const; - void writeOn(std::ofstream& ofs) const; - void readFrom(std::istream& ifs); - - double norm(int p, int comp, int numcomp ) const; - - void copy(FArrayBox&src, int srccomp, int destcomp, int numcomp); - void copy(FArrayBox&src, Box& destbox); - void copy(FArrayBox&src); - - void readFrom(std::ifstream& is); - - %extend{ - std::string display() { - std::ostringstream str; - str << *self; - return str.str(); - } - } - - void setVal (double x, - const Box& bx, - int nstart, - int ncomp); - void setVal (double x, - const Box& bx, - int N); - void setVal (double x, - int N); - void setVal( double x ); - - double min(int comp = 0) const; - double min (const Box& subbox, - int comp = 0) const; - double max (int comp = 0) const; - double max (const Box& subbox, - int comp = 0) const; - IntVect minIndex (int comp = 0) const; - IntVect minIndex (const Box& subbox, - int comp = 0) const; - IntVect maxIndex (int comp = 0) const; - IntVect maxIndex (const Box& subbox, - int comp = 0) const; - - double sum (int comp, - int numcomp = 1) const; - double sum (const Box& subbox, - int comp, - int numcomp = 1) const; - %extend{ - PyObject *get_array() { - double *ptr = self->dataPtr(); - PyObject *arr = 0; - npy_intp dims[BL_SPACEDIM+1]; - - const IntVect size = self->box().size(); - for (int i=0; inComp(); - arr = PyArray_NewFromDescr(&PyArray_Type, - PyArray_DescrFromType(NPY_DOUBLE), BL_SPACEDIM+1, dims, NULL, - ptr, NPY_FORTRAN|NPY_WRITEABLE, NULL); - - Py_INCREF(arr); - return arr; - } - } - -%newobject __add__; -%newobject __sub__; -%newobject __mul__; -%newobject __div__; - - %extend{ - double valIV( const IntVect* p, int n){ - return (*self)(*p,n); - } - void setValIV(double x, const IntVect* p, int n=1){ - (*self)(*p,n) = x; - } - void floor(double val) { - Box bx = self->box(); - int nc = self->nComp(); - for (IntVect iv=bx.smallEnd(), End=bx.bigEnd(); iv<=End; bx.next(iv)) { - for (int n=0; nbox(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) += *right; - return result; - } - FArrayBox* __sub__ (const FArrayBox* right ){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) -= *right; - return result; - } - FArrayBox* __mul__ (const FArrayBox* right ){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) *= *right; - return result; - } - FArrayBox* __mul__ (double right){ - Box bx = self->box(); - int nvar = self->nComp(); - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - result->mult(right); - return result; - } - FArrayBox* __div__ (const FArrayBox* right ){ - Box bx = self->box(); - bx &= right->box(); - int nvar = self->nComp(); - int rightnvar = right->nComp(); - if (nvar > rightnvar ) nvar = rightnvar; - FArrayBox* result = new FArrayBox(bx,nvar); - result->copy(*self); - (*result) /= *right; - return result; - } - } -}; - -class BoxArray { -public: - BoxArray(); - ~BoxArray(); - BoxArray(BoxArray&ba); - void resize (int len); - void define (const BoxArray& bs); - - void writeOn(std::ostream& os); - void readFrom (std::istream& is); - - int size () ; - Box get( int index ); - void set( int i, Box& ibox); - - BoxArray& maxSize(int); - BoxArray& maxSize(const IntVect& block_size); - - bool ok () const; - bool isDisjoint () const; - bool contains (const IntVect& v) const; - bool contains (const Box& b) const; - bool contains (const BoxArray& bl) const; - Box minimalBox() ; - void refine( int ratio ){ - self->refine(ratio); - } - void coarsen(int ratio){ - self->coarsen(ratio); - } - -%newobject __and__; -%newobject __or__; -%newobject complementIn; - - %extend{ - Box __getitem__(int index){ - return (*self)[index]; - } - - BoxArray complementIn (const Box& b) { - return BoxLib::complementIn(b,*self); - } - BoxArray __and__(const BoxArray& right){ - BoxArray res = BoxLib::intersect(*self,right); - return res; - } - BoxArray __or__(const BoxArray& right){ - BoxList bl(*self); - bl.join(BoxList(right)); - return BoxArray(bl); - } - int __len__() { return (*self).size(); } - std::string display() { - std::ostringstream str; - str << *self; - return str.str(); - } - int __cmp__(const BoxArray* other){ - if( (*self)==(*other)) return 0; - else return 1; - } - } -}; - -%include -%include -%include - -/* // From support.H */ -/* // */ -/* void SAXPYjpdf(FArrayBox& dest,double scale,const FArrayBox& src); */ -/* std::vector condMean(FArrayBox& src,bool cdir); */ - -/* // transfers between coarse and fine grids */ -/* void tocoarse(int ratio,FArrayBox&fine,FArrayBox&crse,IntVect&iv); */ -/* void tofine(int ratio,FArrayBox&crse,FArrayBox&fine,IntVect&iv,Real defval); */ -/* void injectCoarse(FArrayBox&fine,int ratio, const IntVect&iv, */ -/* FArrayBox&crse, const Box&tbox); */ -/* // conditional vector merges */ -/* void cvmgnfab(FArrayBox&res,FArrayBox&n,FArrayBox&p,FArrayBox&trg); */ -/* void cvmgpfab(FArrayBox&res,FArrayBox&p,FArrayBox&n,FArrayBox&trg); */ -/* // misc */ -/* //void gradfillfab(FArrayBox&fab, const IntVect&iv); */ - -class MultiFab { -public: - MultiFab (const BoxArray& bs, - int ncomp, - int ngrow); - MultiFab(); - ~MultiFab(); - %extend{ - void define (const BoxArray& bxs, - int nvar, - int ngrow, - FabAlloc mem_mode = Fab_allocate) { - self->FabArray::define(bxs,nvar,ngrow,mem_mode); - } - } - - bool ok () const; - int nGrow () const; - const BoxArray& boxArray () const; - int size () const; - int nComp () const; - - double min(int comp, int nghost=0) const; - double max(int comp, int nghost=0) const; - - void copy(MultiFab &src){ - self->copy(src); - } - - void setVal (double val); - void setVal (double val, - int comp, - int num_comp, - int nghost = 0); - void setVal (double val, - const Box& region, - int comp, - int num_comp, - int nghost = 0); - void setVal (double val, - int nghost); - void setVal (double val, - const Box& region, - int nghost); - void setBndry (double val); - void setBndry (double val, - int strt_comp, - int ncomp); - - void FillBoundary (int scomp, int ncomp); - void FillBoundary (bool local = false, bool cross = false); - //void FillBoundary (int scomp, int ncomp, bool cross); - - %extend{ - double sum(int comp = 0 ) const { - const BoxArray &ba = self->boxArray(); - double retval = 0; - for(MFIter mfi(*self);mfi.isValid(); ++mfi){ - int idx = mfi.index(); - const Box &bx = ba[idx]; - const FArrayBox &fab = (*self)[mfi]; - retval += fab.sum(bx,comp,1); - } - ParallelDescriptor::ReduceRealSum(retval); - return retval; - } - void writeOut(char *name){ - std::string str(name); - VisMF::Write(*self,str,VisMF::OneFilePerCPU); - } - //void copyToFab(FArrayBox &dest){ - // self->copy(dest); - //} - void copyComp(MultiFab*src,int src_comp,int dest_comp, - int num_comp){ - self->copy(*src,src_comp,dest_comp,num_comp); - } - FArrayBox* __getitem__(int index) { - if ((*self).DistributionMap()[index]==ParallelDescriptor::MyProc() ) { - return &((*self)[index]); - } - return 0; - } - } -}; - -class RealBox { -public: - RealBox (Real IN_ARRAY1[BL_SPACEDIM] /* lo */, - Real IN_ARRAY1[BL_SPACEDIM]) /* hi */; -}; - -class Geometry { -public: - Geometry (const Box& dom, - const RealBox* rb , - int coord , - int IN_ARRAY1[BL_SPACEDIM] ); - - void FillPeriodicBoundary (MultiFab& mf, - bool do_corners = false, - bool local = false); -}; - - - diff --git a/Src/Python/swig/numpy.i b/Src/Python/swig/numpy.i deleted file mode 100644 index f94e2cf35..000000000 --- a/Src/Python/swig/numpy.i +++ /dev/null @@ -1,1900 +0,0 @@ -/* -*- C -*- (not really, but good for syntax highlighting) */ -#ifdef SWIGPYTHON - -%{ -#ifndef SWIG_FILE_WITH_INIT -# define NO_IMPORT_ARRAY -#endif -#include "stdio.h" -#include -%} - -%fragment("NumPy_Backward_Compatibility", "header") -{ -/* Support older NumPy data type names -*/ -%#if NDARRAY_VERSION < 0x01000000 -%#define NPY_BOOL PyArray_BOOL -%#define NPY_BYTE PyArray_BYTE -%#define NPY_UBYTE PyArray_UBYTE -%#define NPY_SHORT PyArray_SHORT -%#define NPY_USHORT PyArray_USHORT -%#define NPY_INT PyArray_INT -%#define NPY_UINT PyArray_UINT -%#define NPY_LONG PyArray_LONG -%#define NPY_ULONG PyArray_ULONG -%#define NPY_LONGLONG PyArray_LONGLONG -%#define NPY_ULONGLONG PyArray_ULONGLONG -%#define NPY_FLOAT PyArray_FLOAT -%#define NPY_DOUBLE PyArray_DOUBLE -%#define NPY_LONGDOUBLE PyArray_LONGDOUBLE -%#define NPY_CFLOAT PyArray_CFLOAT -%#define NPY_CDOUBLE PyArray_CDOUBLE -%#define NPY_CLONGDOUBLE PyArray_CLONGDOUBLE -%#define NPY_OBJECT PyArray_OBJECT -%#define NPY_STRING PyArray_STRING -%#define NPY_UNICODE PyArray_UNICODE -%#define NPY_VOID PyArray_VOID -%#define NPY_NTYPES PyArray_NTYPES -%#define NPY_NOTYPE PyArray_NOTYPE -%#define NPY_CHAR PyArray_CHAR -%#define NPY_USERDEF PyArray_USERDEF -%#define npy_intp intp - -%#define NPY_MAX_BYTE MAX_BYTE -%#define NPY_MIN_BYTE MIN_BYTE -%#define NPY_MAX_UBYTE MAX_UBYTE -%#define NPY_MAX_SHORT MAX_SHORT -%#define NPY_MIN_SHORT MIN_SHORT -%#define NPY_MAX_USHORT MAX_USHORT -%#define NPY_MAX_INT MAX_INT -%#define NPY_MIN_INT MIN_INT -%#define NPY_MAX_UINT MAX_UINT -%#define NPY_MAX_LONG MAX_LONG -%#define NPY_MIN_LONG MIN_LONG -%#define NPY_MAX_ULONG MAX_ULONG -%#define NPY_MAX_LONGLONG MAX_LONGLONG -%#define NPY_MIN_LONGLONG MIN_LONGLONG -%#define NPY_MAX_ULONGLONG MAX_ULONGLONG -%#define NPY_MAX_INTP MAX_INTP -%#define NPY_MIN_INTP MIN_INTP - -%#define NPY_FARRAY FARRAY -%#define NPY_F_CONTIGUOUS F_CONTIGUOUS -%#endif -} - -/**********************************************************************/ - -/* The following code originally appeared in - * enthought/kiva/agg/src/numeric.i written by Eric Jones. It was - * translated from C++ to C by John Hunter. Bill Spotz has modified - * it to fix some minor bugs, upgrade from Numeric to numpy (all - * versions), add some comments and functionality, and convert from - * direct code insertion to SWIG fragments. - */ - -%fragment("NumPy_Macros", "header") -{ -/* Macros to extract array attributes. - */ -%#define is_array(a) ((a) && PyArray_Check((PyArrayObject *)a)) -%#define array_type(a) (int)(PyArray_TYPE(a)) -%#define array_numdims(a) (((PyArrayObject *)a)->nd) -%#define array_dimensions(a) (((PyArrayObject *)a)->dimensions) -%#define array_size(a,i) (((PyArrayObject *)a)->dimensions[i]) -%#define array_data(a) (((PyArrayObject *)a)->data) -%#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS(a)) -%#define array_is_native(a) (PyArray_ISNOTSWAPPED(a)) -%#define array_is_fortran(a) (PyArray_ISFORTRAN(a)) -} - -/**********************************************************************/ - -%fragment("NumPy_Utilities", "header") -{ - /* Given a PyObject, return a string describing its type. - */ - const char* pytype_string(PyObject* py_obj) { - if (py_obj == NULL ) return "C NULL value"; - if (py_obj == Py_None ) return "Python None" ; - if (PyCallable_Check(py_obj)) return "callable" ; - if (PyString_Check( py_obj)) return "string" ; - if (PyInt_Check( py_obj)) return "int" ; - if (PyFloat_Check( py_obj)) return "float" ; - if (PyDict_Check( py_obj)) return "dict" ; - if (PyList_Check( py_obj)) return "list" ; - if (PyTuple_Check( py_obj)) return "tuple" ; - if (PyFile_Check( py_obj)) return "file" ; - if (PyModule_Check( py_obj)) return "module" ; - if (PyInstance_Check(py_obj)) return "instance" ; - - return "unkown type"; - } - - /* Given a NumPy typecode, return a string describing the type. - */ - const char* typecode_string(int typecode) { - static const char* type_names[25] = {"bool", "byte", "unsigned byte", - "short", "unsigned short", "int", - "unsigned int", "long", "unsigned long", - "long long", "unsigned long long", - "float", "double", "long double", - "complex float", "complex double", - "complex long double", "object", - "string", "unicode", "void", "ntypes", - "notype", "char", "unknown"}; - return typecode < 24 ? type_names[typecode] : type_names[24]; - } - - /* Make sure input has correct numpy type. Allow character and byte - * to match. Also allow int and long to match. This is deprecated. - * You should use PyArray_EquivTypenums() instead. - */ - int type_match(int actual_type, int desired_type) { - return PyArray_EquivTypenums(actual_type, desired_type); - } -} - -/**********************************************************************/ - -%fragment("NumPy_Object_to_Array", "header", - fragment="NumPy_Backward_Compatibility", - fragment="NumPy_Macros", - fragment="NumPy_Utilities") -{ - /* Given a PyObject pointer, cast it to a PyArrayObject pointer if - * legal. If not, set the python error string appropriately and - * return NULL. - */ - PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) - { - PyArrayObject* ary = NULL; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input), typecode))) - { - ary = (PyArrayObject*) input; - } - else if is_array(input) - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = typecode_string(array_type(input)); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. Array of type '%s' given", - desired_type, actual_type); - ary = NULL; - } - else - { - const char* desired_type = typecode_string(typecode); - const char* actual_type = pytype_string(input); - PyErr_Format(PyExc_TypeError, - "Array of type '%s' required. A '%s' was given", - desired_type, actual_type); - ary = NULL; - } - return ary; - } - - /* Convert the given PyObject to a NumPy array with the given - * typecode. On success, return a valid PyArrayObject* with the - * correct type. On failure, the python error string will be set and - * the routine returns NULL. - */ - PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, - int* is_new_object) - { - PyArrayObject* ary = NULL; - PyObject* py_obj; - if (is_array(input) && (typecode == NPY_NOTYPE || - PyArray_EquivTypenums(array_type(input),typecode))) - { - ary = (PyArrayObject*) input; - *is_new_object = 0; - } - else - { - py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT); - /* If NULL, PyArray_FromObject will have set python error value.*/ - ary = (PyArrayObject*) py_obj; - *is_new_object = 1; - } - return ary; - } - - /* Given a PyArrayObject, check to see if it is contiguous. If so, - * return the input pointer and flag it as not a new object. If it is - * not contiguous, create a new PyArrayObject using the original data, - * flag it as a new object and return the pointer. - */ - PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_contiguous(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, - array_type(ary), - min_dims, - max_dims); - *is_new_object = 1; - } - return result; - } - - /* Given a PyArrayObject, check to see if it is Fortran-contiguous. - * If so, return the input pointer, but do not flag it as not a new - * object. If it is not Fortran-contiguous, create a new - * PyArrayObject using the original data, flag it as a new object - * and return the pointer. - */ - PyArrayObject* make_fortran(PyArrayObject* ary, int* is_new_object, - int min_dims, int max_dims) - { - PyArrayObject* result; - if (array_is_fortran(ary)) - { - result = ary; - *is_new_object = 0; - } - else - { - Py_INCREF(ary->descr); - result = (PyArrayObject*) PyArray_FromArray(ary, ary->descr, NPY_FORTRAN); - *is_new_object = 1; - } - return result; - } - - /* Convert a given PyObject to a contiguous PyArrayObject of the - * specified type. If the input object is not a contiguous - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_contiguous(ary1, &is_new2, 0, 0); - if ( is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - - /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the - * specified type. If the input object is not a Fortran-ordered - * PyArrayObject, a new one will be created and the new object flag - * will be set. - */ - PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input, - int typecode, - int* is_new_object) - { - int is_new1 = 0; - int is_new2 = 0; - PyArrayObject* ary2; - PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, - &is_new1); - if (ary1) - { - ary2 = make_fortran(ary1, &is_new2, 0, 0); - if (is_new1 && is_new2) - { - Py_DECREF(ary1); - } - ary1 = ary2; - } - *is_new_object = is_new1 || is_new2; - return ary1; - } - -} /* end fragment */ - - -/**********************************************************************/ - -%fragment("NumPy_Array_Requirements", "header", - fragment="NumPy_Backward_Compatibility", - fragment="NumPy_Macros") -{ - /* Test whether a python object is contiguous. If array is - * contiguous, return 1. Otherwise, set the python error string and - * return 0. - */ - int require_contiguous(PyArrayObject* ary) - { - int contiguous = 1; - if (!array_is_contiguous(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must be contiguous. A non-contiguous array was given"); - contiguous = 0; - } - return contiguous; - } - - /* Require that a numpy array is not byte-swapped. If the array is - * not byte-swapped, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_native(PyArrayObject* ary) - { - int native = 1; - if (!array_is_native(ary)) - { - PyErr_SetString(PyExc_TypeError, - "Array must have native byteorder. " - "A byte-swapped array was given"); - native = 0; - } - return native; - } - - /* Require the given PyArrayObject to have a specified number of - * dimensions. If the array has the specified number of dimensions, - * return 1. Otherwise, set the python error string and return 0. - */ - int require_dimensions(PyArrayObject* ary, int exact_dimensions) - { - int success = 1; - if (array_numdims(ary) != exact_dimensions) - { - PyErr_Format(PyExc_TypeError, - "Array must have %d dimensions. Given array has %d dimensions", - exact_dimensions, array_numdims(ary)); - success = 0; - } - return success; - } - - /* Require the given PyArrayObject to have one of a list of specified - * number of dimensions. If the array has one of the specified number - * of dimensions, return 1. Otherwise, set the python error string - * and return 0. - */ - int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) - { - int success = 0; - int i; - char dims_str[255] = ""; - char s[255]; - for (i = 0; i < n && !success; i++) - { - if (array_numdims(ary) == exact_dimensions[i]) - { - success = 1; - } - } - if (!success) - { - for (i = 0; i < n-1; i++) - { - sprintf(s, "%d, ", exact_dimensions[i]); - strcat(dims_str,s); - } - sprintf(s, " or %d", exact_dimensions[n-1]); - strcat(dims_str,s); - PyErr_Format(PyExc_TypeError, - "Array must have %s dimensions. Given array has %d dimensions", - dims_str, array_numdims(ary)); - } - return success; - } - - /* Require the given PyArrayObject to have a specified shape. If the - * array has the specified shape, return 1. Otherwise, set the python - * error string and return 0. - */ - int require_size(PyArrayObject* ary, npy_intp* size, int n) - { - int i; - int success = 1; - int len; - char desired_dims[255] = "["; - char s[255]; - char actual_dims[255] = "["; - for(i=0; i < n;i++) - { - if (size[i] != -1 && size[i] != array_size(ary,i)) - { - success = 0; - } - } - if (!success) - { - for (i = 0; i < n; i++) - { - if (size[i] == -1) - { - sprintf(s, "*,"); - } - else - { - sprintf(s, "%ld,", (long int)size[i]); - } - strcat(desired_dims,s); - } - len = strlen(desired_dims); - desired_dims[len-1] = ']'; - for (i = 0; i < n; i++) - { - sprintf(s, "%ld,", (long int)array_size(ary,i)); - strcat(actual_dims,s); - } - len = strlen(actual_dims); - actual_dims[len-1] = ']'; - PyErr_Format(PyExc_TypeError, - "Array must have shape of %s. Given array has shape of %s", - desired_dims, actual_dims); - } - return success; - } - - /* Require the given PyArrayObject to to be FORTRAN ordered. If the - * the PyArrayObject is already FORTRAN ordered, do nothing. Else, - * set the FORTRAN ordering flag and recompute the strides. - */ - int require_fortran(PyArrayObject* ary) - { - int success = 1; - int nd = array_numdims(ary); - int i; - if (array_is_fortran(ary)) return success; - /* Set the FORTRAN ordered flag */ - ary->flags = NPY_FARRAY; - /* Recompute the strides */ - ary->strides[0] = ary->strides[nd-1]; - for (i=1; i < nd; ++i) - ary->strides[i] = ary->strides[i-1] * array_size(ary,i-1); - return success; - } -} - -/* Combine all NumPy fragments into one for convenience */ -%fragment("NumPy_Fragments", "header", - fragment="NumPy_Backward_Compatibility", - fragment="NumPy_Macros", - fragment="NumPy_Utilities", - fragment="NumPy_Object_to_Array", - fragment="NumPy_Array_Requirements") { } - -/* End John Hunter translation (with modifications by Bill Spotz) - */ - -/* %numpy_typemaps() macro - * - * This macro defines a family of 51 typemaps that allow C arguments - * of the form - * - * (DATA_TYPE IN_ARRAY1[ANY]) - * (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) - * (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) - * - * (DATA_TYPE IN_ARRAY2[ANY][ANY]) - * (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) - * (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) - * - * (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) - * (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) - * (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) - * - * (DATA_TYPE INPLACE_ARRAY1[ANY]) - * (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) - * (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) - * - * (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) - * (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) - * (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) - * - * (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) - * (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) - * (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - * (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) - * - * (DATA_TYPE ARGOUT_ARRAY1[ANY]) - * (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) - * (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) - * - * (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) - * - * (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) - * - * (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) - * (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) - * - * (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) - * (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) - * - * (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) - * (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) - * - * (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) - * (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) - * - * (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) - * (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) - * - * (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) - * (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - * (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) - * - * where "DATA_TYPE" is any type supported by the NumPy module, and - * "DIM_TYPE" is any int-like type suitable for specifying dimensions. - * The difference between "ARRAY" typemaps and "FARRAY" typemaps is - * that the "FARRAY" typemaps expect FORTRAN ordering of - * multidimensional arrays. In python, the dimensions will not need - * to be specified (except for the "DATA_TYPE* ARGOUT_ARRAY1" - * typemaps). The IN_ARRAYs can be a numpy array or any sequence that - * can be converted to a numpy array of the specified type. The - * INPLACE_ARRAYs must be numpy arrays of the appropriate type. The - * ARGOUT_ARRAYs will be returned as new numpy arrays of the - * appropriate type. - * - * These typemaps can be applied to existing functions using the - * %apply directive. For example: - * - * %apply (double* IN_ARRAY1, int DIM1) {(double* series, int length)}; - * double prod(double* series, int length); - * - * %apply (int DIM1, int DIM2, double* INPLACE_ARRAY2) - * {(int rows, int cols, double* matrix )}; - * void floor(int rows, int cols, double* matrix, double f); - * - * %apply (double IN_ARRAY3[ANY][ANY][ANY]) - * {(double tensor[2][2][2] )}; - * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) - * {(double low[2][2][2] )}; - * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) - * {(double upp[2][2][2] )}; - * void luSplit(double tensor[2][2][2], - * double low[2][2][2], - * double upp[2][2][2] ); - * - * or directly with - * - * double prod(double* IN_ARRAY1, int DIM1); - * - * void floor(int DIM1, int DIM2, double* INPLACE_ARRAY2, double f); - * - * void luSplit(double IN_ARRAY3[ANY][ANY][ANY], - * double ARGOUT_ARRAY3[ANY][ANY][ANY], - * double ARGOUT_ARRAY3[ANY][ANY][ANY]); - */ - -%define %numpy_typemaps(DATA_TYPE, DATA_TYPECODE, DIM_TYPE) - -/************************/ -/* Input Array Typemaps */ -/************************/ - -/* Typemap suite for (DATA_TYPE IN_ARRAY1[ANY]) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE IN_ARRAY1[ANY]) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE IN_ARRAY1[ANY]) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[1] = { $1_dim0 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 1) || - !require_size(array, size, 1)) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} -%typemap(freearg) - (DATA_TYPE IN_ARRAY1[ANY]) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[1] = { -1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 1) || - !require_size(array, size, 1)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); -} -%typemap(freearg) - (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[1] = {-1}; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 1) || - !require_size(array, size, 1)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DATA_TYPE*) array_data(array); -} -%typemap(freearg) - (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DATA_TYPE IN_ARRAY2[ANY][ANY]) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE IN_ARRAY2[ANY][ANY]) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE IN_ARRAY2[ANY][ANY]) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[2] = { $1_dim0, $1_dim1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 2) || - !require_size(array, size, 2)) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} -%typemap(freearg) - (DATA_TYPE IN_ARRAY2[ANY][ANY]) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[2] = { -1, -1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 2) || - !require_size(array, size, 2)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); -} -%typemap(freearg) - (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[2] = { -1, -1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 2) || - !require_size(array, size, 2)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DATA_TYPE*) array_data(array); -} -%typemap(freearg) - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[2] = { -1, -1 }; - array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 2) || - !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); -} -%typemap(freearg) - (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[2] = { -1, -1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 2) || - !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DATA_TYPE*) array_data(array); -} -%typemap(freearg) - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 3) || - !require_size(array, size, 3)) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} -%typemap(freearg) - (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, - * DIM_TYPE DIM3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[3] = { -1, -1, -1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 3) || - !require_size(array, size, 3)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); - $4 = (DIM_TYPE) array_size(array,2); -} -%typemap(freearg) - (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, - * DATA_TYPE* IN_ARRAY3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[3] = { -1, -1, -1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 3) || - !require_size(array, size, 3)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DIM_TYPE) array_size(array,2); - $4 = (DATA_TYPE*) array_data(array); -} -%typemap(freearg) - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, - * DIM_TYPE DIM3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[3] = { -1, -1, -1 }; - array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 3) || - !require_size(array, size, 3) | !require_fortran(array)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); - $4 = (DIM_TYPE) array_size(array,2); -} -%typemap(freearg) - (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, - * DATA_TYPE* IN_FARRAY3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) -{ - $1 = is_array($input) || PySequence_Check($input); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) - (PyArrayObject* array=NULL, int is_new_object=0) -{ - npy_intp size[3] = { -1, -1, -1 }; - array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, - &is_new_object); - if (!array || !require_dimensions(array, 3) || - !require_size(array, size, 3) || !require_fortran(array)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DIM_TYPE) array_size(array,2); - $4 = (DATA_TYPE*) array_data(array); -} -%typemap(freearg) - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) -{ - if (is_new_object$argnum && array$argnum) - { Py_DECREF(array$argnum); } -} - -/***************************/ -/* In-Place Array Typemaps */ -/***************************/ - -/* Typemap suite for (DATA_TYPE INPLACE_ARRAY1[ANY]) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE INPLACE_ARRAY1[ANY]) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE INPLACE_ARRAY1[ANY]) - (PyArrayObject* array=NULL) -{ - npy_intp size[1] = { $1_dim0 }; - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,1) || !require_size(array, size, 1) || - !require_contiguous(array) || !require_native(array)) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} - -/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) - (PyArrayObject* array=NULL, int i=1) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,1) || !require_contiguous(array) - || !require_native(array)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = 1; - for (i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i); -} - -/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) - (PyArrayObject* array=NULL, int i=0) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,1) || !require_contiguous(array) - || !require_native(array)) SWIG_fail; - $1 = 1; - for (i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i); - $2 = (DATA_TYPE*) array_data(array); -} - -/* Typemap suite for (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) - (PyArrayObject* array=NULL) -{ - npy_intp size[2] = { $1_dim0, $1_dim1 }; - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,2) || !require_size(array, size, 2) || - !require_contiguous(array) || !require_native(array)) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} - -/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,2) || !require_contiguous(array) - || !require_native(array)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,2) || !require_contiguous(array) || - !require_native(array)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DATA_TYPE*) array_data(array); -} - -/* Typemap suite for (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,2) || !require_contiguous(array) - || !require_native(array) || !require_fortran(array)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,2) || !require_contiguous(array) || - !require_native(array) || !require_fortran(array)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DATA_TYPE*) array_data(array); -} - -/* Typemap suite for (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) - (PyArrayObject* array=NULL) -{ - npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,3) || !require_size(array, size, 3) || - !require_contiguous(array) || !require_native(array)) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} - -/* Typemap suite for (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, - * DIM_TYPE DIM3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,3) || !require_contiguous(array) || - !require_native(array)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); - $4 = (DIM_TYPE) array_size(array,2); -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, - * DATA_TYPE* INPLACE_ARRAY3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,3) || !require_contiguous(array) - || !require_native(array)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DIM_TYPE) array_size(array,2); - $4 = (DATA_TYPE*) array_data(array); -} - -/* Typemap suite for (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, - * DIM_TYPE DIM3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,3) || !require_contiguous(array) || - !require_native(array) || !require_fortran(array)) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); - $2 = (DIM_TYPE) array_size(array,0); - $3 = (DIM_TYPE) array_size(array,1); - $4 = (DIM_TYPE) array_size(array,2); -} - -/* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, - * DATA_TYPE* INPLACE_FARRAY3) - */ -%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, - fragment="NumPy_Macros") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) -{ - $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), - DATA_TYPECODE); -} -%typemap(in, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) - (PyArrayObject* array=NULL) -{ - array = obj_to_array_no_conversion($input, DATA_TYPECODE); - if (!array || !require_dimensions(array,3) || !require_contiguous(array) - || !require_native(array) || !require_fortran(array)) SWIG_fail; - $1 = (DIM_TYPE) array_size(array,0); - $2 = (DIM_TYPE) array_size(array,1); - $3 = (DIM_TYPE) array_size(array,2); - $4 = (DATA_TYPE*) array_data(array); -} - -/*************************/ -/* Argout Array Typemaps */ -/*************************/ - -/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY1[ANY]) - */ -%typemap(in,numinputs=0, - fragment="NumPy_Backward_Compatibility,NumPy_Macros") - (DATA_TYPE ARGOUT_ARRAY1[ANY]) - (PyObject * array = NULL) -{ - npy_intp dims[1] = { $1_dim0 }; - array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); - if (!array) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} -%typemap(argout) - (DATA_TYPE ARGOUT_ARRAY1[ANY]) -{ - $result = SWIG_Python_AppendOutput($result,array$argnum); -} - -/* Typemap suite for (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) - */ -%typemap(in,numinputs=1, - fragment="NumPy_Fragments") - (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) - (PyObject * array = NULL) -{ - npy_intp dims[1]; - if (!PyInt_Check($input)) - { - const char* typestring = pytype_string($input); - PyErr_Format(PyExc_TypeError, - "Int dimension expected. '%s' given.", - typestring); - SWIG_fail; - } - $2 = (DIM_TYPE) PyInt_AsLong($input); - dims[0] = (npy_intp) $2; - array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); - if (!array) SWIG_fail; - $1 = (DATA_TYPE*) array_data(array); -} -%typemap(argout) - (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) -{ - $result = SWIG_Python_AppendOutput($result,array$argnum); -} - -/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) - */ -%typemap(in,numinputs=1, - fragment="NumPy_Fragments") - (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) - (PyObject * array = NULL) -{ - npy_intp dims[1]; - if (!PyInt_Check($input)) - { - const char* typestring = pytype_string($input); - PyErr_Format(PyExc_TypeError, - "Int dimension expected. '%s' given.", - typestring); - SWIG_fail; - } - $1 = (DIM_TYPE) PyInt_AsLong($input); - dims[0] = (npy_intp) $1; - array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); - if (!array) SWIG_fail; - $2 = (DATA_TYPE*) array_data(array); -} -%typemap(argout) - (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) -{ - $result = SWIG_Python_AppendOutput($result,array$argnum); -} - -/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) - */ -%typemap(in,numinputs=0, - fragment="NumPy_Backward_Compatibility,NumPy_Macros") - (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) - (PyObject * array = NULL) -{ - npy_intp dims[2] = { $1_dim0, $1_dim1 }; - array = PyArray_SimpleNew(2, dims, DATA_TYPECODE); - if (!array) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} -%typemap(argout) - (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) -{ - $result = SWIG_Python_AppendOutput($result,array$argnum); -} - -/* Typemap suite for (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) - */ -%typemap(in,numinputs=0, - fragment="NumPy_Backward_Compatibility,NumPy_Macros") - (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) - (PyObject * array = NULL) -{ - npy_intp dims[3] = { $1_dim0, $1_dim1, $1_dim2 }; - array = PyArray_SimpleNew(3, dims, DATA_TYPECODE); - if (!array) SWIG_fail; - $1 = ($1_ltype) array_data(array); -} -%typemap(argout) - (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) -{ - $result = SWIG_Python_AppendOutput($result,array$argnum); -} - -/*****************************/ -/* Argoutview Array Typemaps */ -/*****************************/ - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1 ) - (DATA_TYPE* data_temp , DIM_TYPE dim_temp) -{ - $1 = &data_temp; - $2 = &dim_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) -{ - npy_intp dims[1] = { *$2 }; - PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1)); - if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1 , DATA_TYPE** ARGOUTVIEW_ARRAY1) - (DIM_TYPE dim_temp, DATA_TYPE* data_temp ) -{ - $1 = &dim_temp; - $2 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) -{ - npy_intp dims[1] = { *$1 }; - PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2)); - if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) - (DATA_TYPE* data_temp , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) -{ - npy_intp dims[2] = { *$2, *$3 }; - PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); - if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_ARRAY2) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp ) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) -{ - npy_intp dims[2] = { *$1, *$2 }; - PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); - if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) - (DATA_TYPE* data_temp , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) -{ - npy_intp dims[2] = { *$2, *$3 }; - PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); - PyArrayObject * array = (PyArrayObject*) obj; - if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_FARRAY2) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp ) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) -{ - npy_intp dims[2] = { *$1, *$2 }; - PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); - PyArrayObject * array = (PyArrayObject*) obj; - if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, - DIM_TYPE* DIM3) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; - $4 = &dim3_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) -{ - npy_intp dims[3] = { *$2, *$3, *$4 }; - PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); - if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, - DATA_TYPE** ARGOUTVIEW_ARRAY3) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &dim3_temp; - $4 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) -{ - npy_intp dims[3] = { *$1, *$2, *$3 }; - PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); - if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, - DIM_TYPE* DIM3) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; - $4 = &dim3_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) -{ - npy_intp dims[3] = { *$2, *$3, *$4 }; - PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); - PyArrayObject * array = (PyArrayObject*) obj; - if (!array || require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, - DATA_TYPE** ARGOUTVIEW_FARRAY3) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &dim3_temp; - $4 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) -{ - npy_intp dims[3] = { *$1, *$2, *$3 }; - PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); - PyArrayObject * array = (PyArrayObject*) obj; - if (!array || require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); -} - -/*************************************/ -/* Managed Argoutview Array Typemaps */ -/*************************************/ - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1 ) - (DATA_TYPE* data_temp , DIM_TYPE dim_temp) -{ - $1 = &data_temp; - $2 = &dim_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) -{ - npy_intp dims[1] = { *$2 }; - PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1)); - - if (!array) SWIG_fail; - - PyArray_BASE(array) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1 , DATA_TYPE** ARGOUTVIEWM_ARRAY1) - (DIM_TYPE dim_temp, DATA_TYPE* data_temp ) -{ - $1 = &dim_temp; - $2 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) -{ - npy_intp dims[1] = { *$1 }; - PyObject * array = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2)); - - if (!array) SWIG_fail; - - PyArray_BASE(array) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) - (DATA_TYPE* data_temp , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) -{ - npy_intp dims[2] = { *$2, *$3 }; - PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); - - if (!array) SWIG_fail; - - PyArray_BASE(array) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEWM_ARRAY2) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp ) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) -{ - npy_intp dims[2] = { *$1, *$2 }; - PyObject * array = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); - - if (!array) SWIG_fail; - - PyArray_BASE(array) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) - (DATA_TYPE* data_temp , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) -{ - npy_intp dims[2] = { *$2, *$3 }; - PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); - PyArrayObject * array = (PyArrayObject*) obj; - - if (!array || !require_fortran(array)) SWIG_fail; - - PyArray_BASE(obj) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,obj); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEWM_FARRAY2) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp ) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) -{ - npy_intp dims[2] = { *$1, *$2 }; - PyObject * obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); - PyArrayObject * array = (PyArrayObject*) obj; - - if (!array || !require_fortran(array)) SWIG_fail; - - PyArray_BASE(obj) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,obj); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, - DIM_TYPE* DIM3) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; - $4 = &dim3_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) -{ - npy_intp dims[3] = { *$2, *$3, *$4 }; - PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); - - if (!array) SWIG_fail; - - PyArray_BASE(array) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, - DATA_TYPE** ARGOUTVIEWM_ARRAY3) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &dim3_temp; - $4 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) -{ - npy_intp dims[3] = { *$1, *$2, *$3 }; - PyObject * array = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); - - if (!array) SWIG_fail; - - PyArray_BASE(array) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,array); -} - -/* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, - DIM_TYPE* DIM3) - */ -%typemap(in,numinputs=0) - (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) - (DATA_TYPE* data_temp, DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) -{ - $1 = &data_temp; - $2 = &dim1_temp; - $3 = &dim2_temp; - $4 = &dim3_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) -{ - npy_intp dims[3] = { *$2, *$3, *$4 }; - PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); - PyArrayObject * array = (PyArrayObject*) obj; - - if (!array || require_fortran(array)) SWIG_fail; - - PyArray_BASE(obj) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,obj); -} - -/* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, - DATA_TYPE** ARGOUTVIEWM_FARRAY3) - */ -%typemap(in,numinputs=0) - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) - (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp) -{ - $1 = &dim1_temp; - $2 = &dim2_temp; - $3 = &dim3_temp; - $4 = &data_temp; -} -%typemap(argout, - fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") - (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) -{ - npy_intp dims[3] = { *$1, *$2, *$3 }; - PyObject * obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); - - PyArrayObject * array = (PyArrayObject*) obj; - if (!array || require_fortran(array)) SWIG_fail; - - PyArray_BASE(obj) = PyCObject_FromVoidPtr((void*)(*$1), free); - - $result = SWIG_Python_AppendOutput($result,obj); -} - -%enddef /* %numpy_typemaps() macro */ -/* *************************************************************** */ - -/* Concrete instances of the %numpy_typemaps() macro: Each invocation - * below applies all of the typemaps above to the specified data type. - */ -%numpy_typemaps(signed char , NPY_BYTE , int) -%numpy_typemaps(unsigned char , NPY_UBYTE , int) -%numpy_typemaps(short , NPY_SHORT , int) -%numpy_typemaps(unsigned short , NPY_USHORT , int) -%numpy_typemaps(int , NPY_INT , int) -%numpy_typemaps(unsigned int , NPY_UINT , int) -%numpy_typemaps(long , NPY_LONG , int) -%numpy_typemaps(unsigned long , NPY_ULONG , int) -%numpy_typemaps(long long , NPY_LONGLONG , int) -%numpy_typemaps(unsigned long long, NPY_ULONGLONG, int) -%numpy_typemaps(float , NPY_FLOAT , int) -%numpy_typemaps(double , NPY_DOUBLE , int) - -/* *************************************************************** - * The follow macro expansion does not work, because C++ bool is 4 - * bytes and NPY_BOOL is 1 byte - * - * %numpy_typemaps(bool, NPY_BOOL, int) - */ - -/* *************************************************************** - * On my Mac, I get the following warning for this macro expansion: - * 'swig/python detected a memory leak of type 'long double *', no destructor found.' - * - * %numpy_typemaps(long double, NPY_LONGDOUBLE, int) - */ - -/* *************************************************************** - * Swig complains about a syntax error for the following macro - * expansions: - * - * %numpy_typemaps(complex float, NPY_CFLOAT , int) - * - * %numpy_typemaps(complex double, NPY_CDOUBLE, int) - * - * %numpy_typemaps(complex long double, NPY_CLONGDOUBLE, int) - */ - -#endif /* SWIGPYTHON */ - diff --git a/Src/Python/tests/test-multifab.py b/Src/Python/tests/test-multifab.py deleted file mode 100644 index 1f5a147fd..000000000 --- a/Src/Python/tests/test-multifab.py +++ /dev/null @@ -1,20 +0,0 @@ - -import boxlib - -def test_multifab(): - - ndim = 3 - size = 64 - dof = 1 - - bx = boxlib.Box(lo=[1]*ndim, hi=[size]*ndim) - ba = boxlib.BoxArray(boxes=[bx]) - ba.maxSize(32) - - mf = boxlib.MultiFab(ba, ncomp=dof, nghost=2) - - mf.FillBoundary(0, mf.nComp()) - - -if __name__ == '__main__': - test_multifab() diff --git a/Tests/BBIOBenchmark/BBIOTest.cpp b/Tests/BBIOBenchmark/BBIOTest.cpp index 0f65f6d37..fbfd0a124 100644 --- a/Tests/BBIOBenchmark/BBIOTest.cpp +++ b/Tests/BBIOBenchmark/BBIOTest.cpp @@ -1,15 +1,15 @@ // ------------------------------------------------------------- // BBIOTest.cpp // ------------------------------------------------------------- -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/Tests/BBIOBenchmark/BBIOTestDriver.cpp b/Tests/BBIOBenchmark/BBIOTestDriver.cpp index 37cebda18..12e0a580b 100644 --- a/Tests/BBIOBenchmark/BBIOTestDriver.cpp +++ b/Tests/BBIOBenchmark/BBIOTestDriver.cpp @@ -10,11 +10,11 @@ using std::ios; #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include using std::cout; using std::cerr; diff --git a/Tests/BBIOBenchmark/GNUmakefile b/Tests/BBIOBenchmark/GNUmakefile index cb68c52ff..27c989032 100644 --- a/Tests/BBIOBenchmark/GNUmakefile +++ b/Tests/BBIOBenchmark/GNUmakefile @@ -13,26 +13,26 @@ FCOMP = gfortran USE_MPI=FALSE USE_MPI=TRUE -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs EBASE = bbiotest HERE = . -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package INCLUDE_LOCATIONS += $(HERE) -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base CEXE_sources += BBIOTestDriver.cpp BBIOTest.cpp -vpath %.H $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.cpp $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.F $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.f $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.f90 $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib +vpath %.H $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.cpp $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.F $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.f $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.f90 $(HERE) $(BOXLIB_HOME)/Src/Base all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/C_BaseLib/AMRProfTestBL.cpp b/Tests/C_BaseLib/AMRProfTestBL.cpp index 79397ffb2..a06b0e047 100644 --- a/Tests/C_BaseLib/AMRProfTestBL.cpp +++ b/Tests/C_BaseLib/AMRProfTestBL.cpp @@ -12,8 +12,8 @@ using std::cout; using std::endl; -#include -#include +#include +#include #include diff --git a/Tests/C_BaseLib/BcastClasses/BcastClasses.cpp b/Tests/C_BaseLib/BcastClasses/BcastClasses.cpp index cd9aec623..195a5e315 100644 --- a/Tests/C_BaseLib/BcastClasses/BcastClasses.cpp +++ b/Tests/C_BaseLib/BcastClasses/BcastClasses.cpp @@ -5,9 +5,9 @@ // -------------------------------------------------------------------------- #include #include -#include -#include -#include +#include +#include +#include using std::cout; using std::endl; diff --git a/Tests/C_BaseLib/BcastClasses/GNUmakefile b/Tests/C_BaseLib/BcastClasses/GNUmakefile index 35a9091fe..6dc15e7fe 100644 --- a/Tests/C_BaseLib/BcastClasses/GNUmakefile +++ b/Tests/C_BaseLib/BcastClasses/GNUmakefile @@ -20,9 +20,9 @@ EBASE = BcastClasses CEXE_sources += BcastClasses.cpp -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/C_BaseLib/GNUmakefile b/Tests/C_BaseLib/GNUmakefile index c580f2a84..e62eea979 100644 --- a/Tests/C_BaseLib/GNUmakefile +++ b/Tests/C_BaseLib/GNUmakefile @@ -19,7 +19,7 @@ TRACE_PROFILE = FALSE #DEFINES += -DBL_PROFILING_SPECIAL BOXLIB_HOME = ../.. -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs # # Base name of each of the executables we want to build. @@ -50,7 +50,7 @@ ifeq ($(_progs),tFillFab) fEXE_sources += fillfab.f endif -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package all: $(addsuffix $(optionsSuffix).ex, $(_progs)) @@ -64,4 +64,4 @@ clean:: $(RM) bl3_prof bl3_prof.m $(RM) *.ex *.o -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/C_BaseLib/t8BIT.cpp b/Tests/C_BaseLib/t8BIT.cpp index f6857dc40..911f11fb9 100644 --- a/Tests/C_BaseLib/t8BIT.cpp +++ b/Tests/C_BaseLib/t8BIT.cpp @@ -4,7 +4,7 @@ #include -#include +#include int main (int argc, char** argv) diff --git a/Tests/C_BaseLib/tBA.cpp b/Tests/C_BaseLib/tBA.cpp index b00a3c360..d8a74b1be 100644 --- a/Tests/C_BaseLib/tBA.cpp +++ b/Tests/C_BaseLib/tBA.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include -#include +#include +#include +#include #include static diff --git a/Tests/C_BaseLib/tCArena.cpp b/Tests/C_BaseLib/tCArena.cpp index b2a8ad242..ea1e5f125 100644 --- a/Tests/C_BaseLib/tCArena.cpp +++ b/Tests/C_BaseLib/tCArena.cpp @@ -3,9 +3,9 @@ #include #endif -#include -#include -#include +#include +#include +#include #include #include diff --git a/Tests/C_BaseLib/tDM.cpp b/Tests/C_BaseLib/tDM.cpp index cda434414..6b9c7b15a 100644 --- a/Tests/C_BaseLib/tDM.cpp +++ b/Tests/C_BaseLib/tDM.cpp @@ -1,9 +1,9 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include static void diff --git a/Tests/C_BaseLib/tDir.cpp b/Tests/C_BaseLib/tDir.cpp index 400312a89..11c1b5412 100644 --- a/Tests/C_BaseLib/tDir.cpp +++ b/Tests/C_BaseLib/tDir.cpp @@ -1,5 +1,5 @@ -#include +#include int main (int argc, char** argv) diff --git a/Tests/C_BaseLib/tFAC.cpp b/Tests/C_BaseLib/tFAC.cpp index bc4584d51..a7471e739 100644 --- a/Tests/C_BaseLib/tFAC.cpp +++ b/Tests/C_BaseLib/tFAC.cpp @@ -7,7 +7,7 @@ #error "This code assumes BL_SPACEDIM==2" #endif -#include +#include int main (int argc, char** argv) diff --git a/Tests/C_BaseLib/tFB.cpp b/Tests/C_BaseLib/tFB.cpp index e732312b5..92ab8b2c9 100644 --- a/Tests/C_BaseLib/tFB.cpp +++ b/Tests/C_BaseLib/tFB.cpp @@ -2,8 +2,8 @@ // A test program for FillBoundary(). // -#include -#include +#include +#include const int nTimes(5); const int nStrategies(4); diff --git a/Tests/C_BaseLib/tFillFab.cpp b/Tests/C_BaseLib/tFillFab.cpp index 0eacae1db..d213102f0 100644 --- a/Tests/C_BaseLib/tFillFab.cpp +++ b/Tests/C_BaseLib/tFillFab.cpp @@ -1,11 +1,11 @@ -#include +#include #include -#include -#include -#include +#include +#include +#include BL_FORT_PROC_DECL(FILLFAB,fillfab)(Real* d, const int* nx, const int* ny); diff --git a/Tests/C_BaseLib/tMF.cpp b/Tests/C_BaseLib/tMF.cpp index ca3488b74..dfb72f51b 100644 --- a/Tests/C_BaseLib/tMF.cpp +++ b/Tests/C_BaseLib/tMF.cpp @@ -2,12 +2,12 @@ // A test program for MultiFab. // -#include +#include #include #include -#include -#include +#include +#include int main (int argc, char** argv) diff --git a/Tests/C_BaseLib/tMFcopy.cpp b/Tests/C_BaseLib/tMFcopy.cpp index 0fe5df4c9..e30dad106 100644 --- a/Tests/C_BaseLib/tMFcopy.cpp +++ b/Tests/C_BaseLib/tMFcopy.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include -#include +#include +#include +#include int main (int argc, char* argv[]) diff --git a/Tests/C_BaseLib/tParmParse.cpp b/Tests/C_BaseLib/tParmParse.cpp index b4af73dce..cb5bbdf6c 100644 --- a/Tests/C_BaseLib/tParmParse.cpp +++ b/Tests/C_BaseLib/tParmParse.cpp @@ -1,8 +1,8 @@ #include -#include -#include +#include +#include int main (int argc, char** argv) diff --git a/Tests/C_BaseLib/tProfiler.cpp b/Tests/C_BaseLib/tProfiler.cpp index 9a464a323..627b42b59 100644 --- a/Tests/C_BaseLib/tProfiler.cpp +++ b/Tests/C_BaseLib/tProfiler.cpp @@ -11,14 +11,14 @@ using std::cout; using std::endl; -#include -#include -#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include // -------------------------------------------------------------- void Sleep(unsigned int sleeptime) { diff --git a/Tests/C_BaseLib/tRABcast.cpp b/Tests/C_BaseLib/tRABcast.cpp index c0a86aaf5..b79660ae1 100644 --- a/Tests/C_BaseLib/tRABcast.cpp +++ b/Tests/C_BaseLib/tRABcast.cpp @@ -1,7 +1,7 @@ // ------------------------------------------------------------ // A test program for ReadAndBcastFile(). // ------------------------------------------------------------ -#include +#include // ------------------------------------------------------------ diff --git a/Tests/C_BaseLib/tRan.cpp b/Tests/C_BaseLib/tRan.cpp index 77493f662..d21d63e92 100644 --- a/Tests/C_BaseLib/tRan.cpp +++ b/Tests/C_BaseLib/tRan.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include // this mersenne_ran_main() outputs first 1000 generated numbers // compare against the output of mt19937int.out diff --git a/Tests/C_BaseLib/tVisMF.cpp b/Tests/C_BaseLib/tVisMF.cpp index 2c5801806..b2d966b19 100644 --- a/Tests/C_BaseLib/tVisMF.cpp +++ b/Tests/C_BaseLib/tVisMF.cpp @@ -5,8 +5,8 @@ #include #include -#include -#include +#include +#include static int nBoxs = 10; diff --git a/Tests/C_BaseLib/tVisMF2.cpp b/Tests/C_BaseLib/tVisMF2.cpp index 23cf5e3da..505250c6c 100644 --- a/Tests/C_BaseLib/tVisMF2.cpp +++ b/Tests/C_BaseLib/tVisMF2.cpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include int main (int argc, char** argv) diff --git a/Tests/C_BaseLib/tread.cpp b/Tests/C_BaseLib/tread.cpp index d98e64f45..50755961f 100644 --- a/Tests/C_BaseLib/tread.cpp +++ b/Tests/C_BaseLib/tread.cpp @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include int main (int argc, char** argv) diff --git a/Tests/F_BaseLib/GNUmakefile b/Tests/F_BaseLib/GNUmakefile deleted file mode 100644 index 6c125eb3c..000000000 --- a/Tests/F_BaseLib/GNUmakefile +++ /dev/null @@ -1,37 +0,0 @@ -BOXLIB_HOME := ../.. - -USE_RANDOM = TRUE - -NDEBUG := -MPI := t -OMP := - -COMP := Intel -COMP := gfortran - -MKVERBOSE := t - -PARTICLES := t - -FPARALLEL := ../.. - -include $(BOXLIB_HOME)/Tools/F_mk/GMakedefs.mak - -f90sources += t_main.f90 -f90sources += t_knapsack.f90 -f90sources += t_bx.f90 -f90sources += t_cls.f90 -f90sources += t_bxasc.f90 -f90sources += t_bl_prof.f90 -f90sources += t_particles.f90 - -programs += main.f90 -f90sources += mt19937ar.f90 - -all: $(pnames) - -include $(BOXLIB_HOME)/Src/F_BaseLib/GPackage.mak -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib - -include $(BOXLIB_HOME)/Tools/F_mk/GMakerules.mak diff --git a/Tests/F_BaseLib/ball_def.14656 b/Tests/F_BaseLib/ball_def.14656 deleted file mode 100644 index 63e374c30..000000000 --- a/Tests/F_BaseLib/ball_def.14656 +++ /dev/null @@ -1,14658 +0,0 @@ -64 -14656 -1 576 -2 16 -3 320 -4 16 -5 32 -6 480 -7 672 -8 64 -9 480 -10 1080 -11 8 -12 2520 -13 5184 -14 7040 -15 4032 -16 8 -17 96 -18 320 -19 2560 -20 16 -21 64 -22 16 -23 32 -24 8 -25 8 -26 1560 -27 6144 -28 8 -29 3600 -30 640 -31 32 -32 960 -33 144 -34 360 -35 16 -36 144 -37 8 -38 128 -39 96 -40 6336 -41 2376 -42 20160 -43 8448 -44 12800 -45 2560 -46 1440 -47 6144 -48 6336 -49 384 -50 3200 -51 2304 -52 2304 -53 32 -54 32 -55 16 -56 32 -57 16 -58 48 -59 16 -60 128 -61 8 -62 1152 -63 4752 -64 4032 -65 5832 -66 7680 -67 1320 -68 5544 -69 5616 -70 4608 -71 2304 -72 8640 -73 5120 -74 16 -75 480 -76 48 -77 64 -78 320 -79 17920 -80 8640 -81 2304 -82 5632 -83 7168 -84 17920 -85 672 -86 1920 -87 48 -88 32 -89 192 -90 64 -91 32 -92 16 -93 9216 -94 64 -95 3360 -96 432 -97 32 -98 16 -99 672 -100 8 -101 96 -102 8 -103 672 -104 32 -105 480 -106 2560 -107 64 -108 32 -109 32 -110 4096 -111 5280 -112 960 -113 5280 -114 3584 -115 16 -116 192 -117 14336 -118 192 -119 32 -120 16 -121 16 -122 640 -123 4752 -124 8640 -125 4608 -126 11520 -127 2304 -128 1296 -129 240 -130 64 -131 32 -132 3080 -133 8112 -134 16 -135 32 -136 16 -137 128 -138 8 -139 8424 -140 896 -141 6480 -142 4536 -143 6272 -144 3080 -145 2160 -146 2112 -147 1200 -148 5376 -149 512 -150 640 -151 192 -152 2880 -153 7680 -154 6912 -155 384 -156 16 -157 576 -158 24 -159 640 -160 288 -161 128 -162 1536 -163 7680 -164 5376 -165 32 -166 288 -167 192 -168 16 -169 5824 -170 768 -171 16 -172 13200 -173 192 -174 288 -175 576 -176 960 -177 7040 -178 2592 -179 8448 -180 17920 -181 21952 -182 3840 -183 6400 -184 5376 -185 192 -186 2048 -187 96 -188 32 -189 480 -190 20384 -191 2688 -192 2240 -193 8064 -194 2304 -195 3520 -196 384 -197 6480 -198 432 -199 24 -200 11520 -201 8640 -202 26880 -203 576 -204 288 -205 32 -206 800 -207 48 -208 128 -209 8 -210 12288 -211 96 -212 600 -213 480 -214 672 -215 64 -216 13200 -217 48 -218 1680 -219 64 -220 32 -221 576 -222 32 -223 16 -224 384 -225 32 -226 32 -227 9240 -228 192 -229 4224 -230 1568 -231 2464 -232 3240 -233 10240 -234 7200 -235 2112 -236 1680 -237 6240 -238 960 -239 360 -240 1760 -241 3600 -242 192 -243 96 -244 1344 -245 2240 -246 192 -247 4992 -248 2240 -249 5040 -250 9720 -251 7488 -252 7056 -253 2304 -254 3456 -255 6720 -256 192 -257 96 -258 32 -259 480 -260 2560 -261 672 -262 64 -263 3456 -264 576 -265 1176 -266 288 -267 48 -268 11232 -269 32 -270 1440 -271 96 -272 1536 -273 96 -274 256 -275 7168 -276 64 -277 32 -278 3200 -279 48 -280 4160 -281 1920 -282 480 -283 120 -284 4608 -285 11520 -286 192 -287 6336 -288 10560 -289 2016 -290 14336 -291 8960 -292 1440 -293 5280 -294 960 -295 384 -296 48 -297 64 -298 4096 -299 384 -300 1680 -301 384 -302 12320 -303 2816 -304 5120 -305 640 -306 16 -307 32 -308 24 -309 3520 -310 1600 -311 32 -312 16 -313 3072 -314 16 -315 432 -316 1056 -317 48 -318 168 -319 8 -320 1008 -321 32 -322 128 -323 288 -324 48 -325 16 -326 64 -327 256 -328 448 -329 2560 -330 936 -331 32 -332 4160 -333 192 -334 64 -335 32 -336 16 -337 128 -338 32 -339 3024 -340 288 -341 192 -342 288 -343 32 -344 360 -345 64 -346 144 -347 3584 -348 32 -349 72 -350 8 -351 8 -352 48 -353 8 -354 32 -355 32 -356 16 -357 8 -358 12096 -359 16 -360 8 -361 64 -362 96 -363 4160 -364 5280 -365 6272 -366 1056 -367 288 -368 8 -369 48 -370 3328 -371 8 -372 1024 -373 2080 -374 32 -375 8 -376 128 -377 768 -378 512 -379 48 -380 32 -381 480 -382 2560 -383 672 -384 64 -385 256 -386 48 -387 576 -388 960 -389 5376 -390 5120 -391 6912 -392 7040 -393 17920 -394 9408 -395 288 -396 6720 -397 1792 -398 336 -399 4992 -400 2912 -401 14336 -402 32 -403 11648 -404 8 -405 2240 -406 4608 -407 1536 -408 48 -409 8 -410 48 -411 144 -412 16 -413 576 -414 16 -415 32 -416 16 -417 384 -418 32 -419 32 -420 480 -421 7128 -422 576 -423 10920 -424 9600 -425 3528 -426 600 -427 8624 -428 1920 -429 2160 -430 9216 -431 4480 -432 5376 -433 480 -434 48 -435 864 -436 576 -437 32 -438 384 -439 7280 -440 96 -441 144 -442 128 -443 4536 -444 192 -445 1280 -446 24 -447 10752 -448 528 -449 6336 -450 400 -451 960 -452 240 -453 32 -454 1200 -455 2304 -456 6912 -457 5376 -458 64 -459 32 -460 32 -461 960 -462 32 -463 64 -464 1680 -465 24 -466 1200 -467 192 -468 48 -469 1120 -470 480 -471 6272 -472 4928 -473 280 -474 864 -475 2048 -476 4320 -477 5760 -478 6656 -479 1008 -480 20480 -481 9216 -482 24 -483 5120 -484 2048 -485 8448 -486 216 -487 1152 -488 240 -489 128 -490 12800 -491 2560 -492 1440 -493 10080 -494 112 -495 3840 -496 1600 -497 4368 -498 2112 -499 384 -500 448 -501 432 -502 64 -503 864 -504 5120 -505 768 -506 1344 -507 4800 -508 672 -509 8 -510 32 -511 10368 -512 800 -513 32 -514 5120 -515 720 -516 512 -517 960 -518 360 -519 144 -520 360 -521 64 -522 144 -523 128 -524 192 -525 24 -526 5760 -527 960 -528 16 -529 8 -530 1568 -531 16 -532 32 -533 16 -534 64 -535 1792 -536 144 -537 3072 -538 2496 -539 3528 -540 5184 -541 6144 -542 1680 -543 6912 -544 2640 -545 600 -546 1920 -547 4032 -548 2016 -549 192 -550 160 -551 192 -552 32 -553 7680 -554 1800 -555 6048 -556 96 -557 144 -558 128 -559 64 -560 64 -561 2048 -562 6160 -563 5616 -564 160 -565 64 -566 5880 -567 6160 -568 4480 -569 192 -570 3136 -571 192 -572 2592 -573 32 -574 5600 -575 8 -576 192 -577 432 -578 1536 -579 2800 -580 96 -581 32 -582 96 -583 7392 -584 192 -585 560 -586 3200 -587 768 -588 96 -589 384 -590 16640 -591 128 -592 1440 -593 8 -594 16 -595 2688 -596 80 -597 128 -598 13200 -599 960 -600 48 -601 192 -602 96 -603 12288 -604 6144 -605 8 -606 48 -607 32 -608 128 -609 768 -610 8 -611 16 -612 3840 -613 1000 -614 16 -615 48 -616 6240 -617 6000 -618 13520 -619 17920 -620 15360 -621 720 -622 800 -623 144 -624 1296 -625 32 -626 6336 -627 3600 -628 3840 -629 2400 -630 336 -631 1024 -632 192 -633 12288 -634 1536 -635 32 -636 7168 -637 768 -638 256 -639 72 -640 864 -641 576 -642 600 -643 11264 -644 8 -645 8 -646 960 -647 7040 -648 32 -649 288 -650 8 -651 64 -652 128 -653 600 -654 80 -655 112 -656 64 -657 128 -658 288 -659 32 -660 6144 -661 1872 -662 8 -663 144 -664 8008 -665 720 -666 2464 -667 192 -668 8064 -669 896 -670 672 -671 192 -672 8 -673 2016 -674 144 -675 16 -676 192 -677 48 -678 2520 -679 5824 -680 128 -681 768 -682 4096 -683 4480 -684 576 -685 32 -686 8 -687 6160 -688 624 -689 3200 -690 1152 -691 21504 -692 8448 -693 7168 -694 12800 -695 480 -696 11648 -697 3360 -698 4320 -699 32 -700 800 -701 48 -702 128 -703 8 -704 2688 -705 240 -706 3456 -707 9600 -708 48 -709 720 -710 240 -711 784 -712 16 -713 384 -714 32 -715 4608 -716 4032 -717 4608 -718 1344 -719 1920 -720 2464 -721 144 -722 200 -723 640 -724 6912 -725 32 -726 432 -727 288 -728 144 -729 384 -730 96 -731 1024 -732 240 -733 6272 -734 15360 -735 240 -736 64 -737 128 -738 3584 -739 9984 -740 256 -741 2304 -742 96 -743 8 -744 7168 -745 16128 -746 384 -747 7040 -748 8 -749 6272 -750 3328 -751 256 -752 8 -753 5760 -754 32 -755 64 -756 6656 -757 2304 -758 6656 -759 4928 -760 4160 -761 2304 -762 4608 -763 2304 -764 32 -765 4608 -766 6240 -767 2400 -768 192 -769 8 -770 2016 -771 144 -772 4608 -773 1152 -774 8 -775 8 -776 16 -777 32 -778 8 -779 96 -780 240 -781 12096 -782 8 -783 8 -784 8 -785 24 -786 24 -787 32 -788 8 -789 32 -790 1440 -791 672 -792 96 -793 4096 -794 4992 -795 5120 -796 72 -797 512 -798 48 -799 72 -800 32 -801 48 -802 128 -803 8 -804 288 -805 32 -806 32 -807 16 -808 64 -809 64 -810 2816 -811 192 -812 288 -813 1536 -814 16 -815 32 -816 8 -817 648 -818 8400 -819 672 -820 32 -821 640 -822 96 -823 896 -824 96 -825 3200 -826 32 -827 192 -828 480 -829 48 -830 32 -831 128 -832 26624 -833 1024 -834 8960 -835 768 -836 32 -837 1728 -838 3840 -839 72 -840 320 -841 4480 -842 672 -843 4480 -844 15360 -845 8448 -846 240 -847 1536 -848 864 -849 96 -850 5040 -851 336 -852 936 -853 64 -854 7040 -855 6400 -856 16 -857 3072 -858 11232 -859 14976 -860 16 -861 600 -862 32 -863 3200 -864 8 -865 64 -866 12320 -867 16 -868 576 -869 8 -870 144 -871 48 -872 5760 -873 96 -874 960 -875 32 -876 8 -877 1568 -878 16 -879 32 -880 16 -881 64 -882 5760 -883 1960 -884 1728 -885 240 -886 960 -887 3600 -888 1008 -889 5488 -890 432 -891 5808 -892 1152 -893 640 -894 96 -895 10976 -896 5600 -897 288 -898 240 -899 360 -900 96 -901 192 -902 72 -903 32 -904 64 -905 32 -906 72 -907 144 -908 2880 -909 96 -910 144 -911 720 -912 32 -913 6144 -914 4608 -915 7392 -916 8 -917 704 -918 64 -919 8 -920 96 -921 480 -922 48 -923 216 -924 480 -925 384 -926 96 -927 8 -928 32 -929 32 -930 800 -931 960 -932 8 -933 15360 -934 2304 -935 192 -936 96 -937 288 -938 16 -939 144 -940 6048 -941 480 -942 16 -943 8 -944 32 -945 96 -946 48 -947 1728 -948 32 -949 576 -950 384 -951 1344 -952 3072 -953 16224 -954 1440 -955 720 -956 3136 -957 320 -958 24 -959 15680 -960 32 -961 16 -962 896 -963 2880 -964 616 -965 3872 -966 384 -967 192 -968 7168 -969 768 -970 256 -971 8448 -972 96 -973 9216 -974 5760 -975 32 -976 672 -977 8 -978 11880 -979 16 -980 16 -981 32 -982 32 -983 128 -984 2304 -985 192 -986 1280 -987 32 -988 7680 -989 384 -990 432 -991 640 -992 288 -993 96 -994 1200 -995 288 -996 96 -997 32 -998 64 -999 48 -1000 288 -1001 96 -1002 64 -1003 64 -1004 32 -1005 768 -1006 504 -1007 2816 -1008 3080 -1009 4928 -1010 5600 -1011 8064 -1012 4800 -1013 6480 -1014 128 -1015 96 -1016 240 -1017 32 -1018 192 -1019 120 -1020 64 -1021 16 -1022 1600 -1023 96 -1024 96 -1025 72 -1026 320 -1027 128 -1028 48 -1029 4032 -1030 32 -1031 3360 -1032 256 -1033 192 -1034 8 -1035 144 -1036 96 -1037 48 -1038 72 -1039 80 -1040 2240 -1041 864 -1042 5880 -1043 384 -1044 1008 -1045 3960 -1046 3840 -1047 3360 -1048 4800 -1049 768 -1050 96 -1051 288 -1052 384 -1053 48 -1054 4928 -1055 3960 -1056 8624 -1057 10080 -1058 4608 -1059 1920 -1060 224 -1061 640 -1062 768 -1063 392 -1064 5280 -1065 320 -1066 1536 -1067 600 -1068 3840 -1069 4096 -1070 768 -1071 192 -1072 2240 -1073 48 -1074 32 -1075 64 -1076 600 -1077 9984 -1078 9216 -1079 72 -1080 32 -1081 32 -1082 32 -1083 384 -1084 64 -1085 1120 -1086 288 -1087 1344 -1088 96 -1089 32 -1090 144 -1091 4608 -1092 432 -1093 128 -1094 8 -1095 192 -1096 96 -1097 96 -1098 16 -1099 64 -1100 144 -1101 8 -1102 128 -1103 600 -1104 1400 -1105 480 -1106 800 -1107 1008 -1108 192 -1109 144 -1110 32 -1111 32 -1112 2304 -1113 2560 -1114 3584 -1115 4928 -1116 2800 -1117 3600 -1118 2520 -1119 3072 -1120 5760 -1121 6144 -1122 64 -1123 360 -1124 32 -1125 32 -1126 384 -1127 1600 -1128 8 -1129 32 -1130 48 -1131 32 -1132 48 -1133 3456 -1134 720 -1135 5280 -1136 24 -1137 16128 -1138 6912 -1139 8 -1140 640 -1141 96 -1142 32 -1143 32 -1144 240 -1145 32 -1146 256 -1147 480 -1148 64 -1149 64 -1150 720 -1151 288 -1152 48 -1153 8 -1154 8 -1155 32 -1156 8 -1157 48 -1158 96 -1159 32 -1160 144 -1161 7200 -1162 8 -1163 216 -1164 144 -1165 96 -1166 800 -1167 96 -1168 144 -1169 256 -1170 24 -1171 16 -1172 128 -1173 3024 -1174 8 -1175 48 -1176 3168 -1177 336 -1178 288 -1179 24 -1180 640 -1181 1440 -1182 480 -1183 1280 -1184 2048 -1185 6400 -1186 448 -1187 384 -1188 96 -1189 32 -1190 288 -1191 6912 -1192 7392 -1193 3168 -1194 800 -1195 960 -1196 640 -1197 1568 -1198 144 -1199 5120 -1200 7040 -1201 16 -1202 9072 -1203 48 -1204 720 -1205 2048 -1206 8448 -1207 6400 -1208 2560 -1209 10080 -1210 13440 -1211 1440 -1212 256 -1213 144 -1214 19712 -1215 5600 -1216 32 -1217 3528 -1218 288 -1219 96 -1220 8 -1221 32 -1222 11520 -1223 256 -1224 9984 -1225 600 -1226 32 -1227 4320 -1228 448 -1229 480 -1230 6160 -1231 8 -1232 32 -1233 32 -1234 16 -1235 64 -1236 2592 -1237 3888 -1238 2592 -1239 10920 -1240 1176 -1241 7392 -1242 9984 -1243 1440 -1244 512 -1245 160 -1246 288 -1247 72 -1248 2560 -1249 48 -1250 64 -1251 96 -1252 72 -1253 96 -1254 192 -1255 6048 -1256 18816 -1257 32 -1258 1024 -1259 3520 -1260 16 -1261 576 -1262 17472 -1263 6400 -1264 576 -1265 480 -1266 8 -1267 8 -1268 120 -1269 9984 -1270 256 -1271 12544 -1272 5376 -1273 12544 -1274 5376 -1275 25200 -1276 8624 -1277 1792 -1278 160 -1279 80 -1280 5632 -1281 13312 -1282 48 -1283 48 -1284 1728 -1285 960 -1286 240 -1287 48 -1288 192 -1289 480 -1290 120 -1291 48 -1292 1120 -1293 32 -1294 8 -1295 32 -1296 48 -1297 48 -1298 64 -1299 48 -1300 80 -1301 40 -1302 6144 -1303 4992 -1304 3520 -1305 40 -1306 32 -1307 48 -1308 1440 -1309 5760 -1310 2304 -1311 16 -1312 2304 -1313 6656 -1314 24 -1315 2048 -1316 3520 -1317 2816 -1318 16 -1319 192 -1320 8 -1321 8 -1322 8 -1323 8 -1324 64 -1325 528 -1326 144 -1327 11200 -1328 16 -1329 8008 -1330 3456 -1331 24 -1332 16 -1333 16 -1334 2016 -1335 96 -1336 480 -1337 2080 -1338 6144 -1339 24 -1340 192 -1341 4096 -1342 8 -1343 480 -1344 32 -1345 7488 -1346 5376 -1347 16 -1348 192 -1349 6600 -1350 5616 -1351 4800 -1352 8736 -1353 16 -1354 8 -1355 64 -1356 8 -1357 16 -1358 1200 -1359 8 -1360 32 -1361 32 -1362 12096 -1363 24 -1364 8 -1365 64 -1366 8 -1367 5040 -1368 4608 -1369 3456 -1370 2880 -1371 6912 -1372 16 -1373 16 -1374 16 -1375 3456 -1376 768 -1377 48 -1378 1200 -1379 1120 -1380 240 -1381 3456 -1382 2200 -1383 8 -1384 128 -1385 32 -1386 8 -1387 8 -1388 32 -1389 2352 -1390 96 -1391 192 -1392 8 -1393 32 -1394 8 -1395 144 -1396 16 -1397 4320 -1398 32 -1399 384 -1400 32 -1401 1760 -1402 32 -1403 64 -1404 384 -1405 32 -1406 48 -1407 32 -1408 48 -1409 8 -1410 8 -1411 64 -1412 360 -1413 96 -1414 64 -1415 32 -1416 24 -1417 48 -1418 64 -1419 64 -1420 256 -1421 32 -1422 32 -1423 32 -1424 1568 -1425 6240 -1426 2304 -1427 48 -1428 128 -1429 7200 -1430 2880 -1431 2304 -1432 3072 -1433 32 -1434 48 -1435 2240 -1436 128 -1437 640 -1438 96 -1439 7680 -1440 16 -1441 8800 -1442 192 -1443 128 -1444 24 -1445 80 -1446 128 -1447 720 -1448 48 -1449 216 -1450 96 -1451 96 -1452 16 -1453 32 -1454 6048 -1455 10368 -1456 80 -1457 4096 -1458 8 -1459 2048 -1460 64 -1461 128 -1462 160 -1463 1152 -1464 3072 -1465 1152 -1466 144 -1467 480 -1468 160 -1469 2352 -1470 2304 -1471 1280 -1472 10752 -1473 800 -1474 1008 -1475 17920 -1476 1080 -1477 720 -1478 896 -1479 672 -1480 7168 -1481 768 -1482 256 -1483 512 -1484 24 -1485 8 -1486 8 -1487 624 -1488 9504 -1489 9984 -1490 32 -1491 600 -1492 48 -1493 48 -1494 8 -1495 32 -1496 128 -1497 1000 -1498 8 -1499 96 -1500 8 -1501 320 -1502 32 -1503 64 -1504 48 -1505 288 -1506 96 -1507 64 -1508 8 -1509 32 -1510 2016 -1511 3136 -1512 4224 -1513 672 -1514 280 -1515 1176 -1516 480 -1517 192 -1518 1568 -1519 2304 -1520 160 -1521 96 -1522 48 -1523 216 -1524 240 -1525 32 -1526 32 -1527 8 -1528 16 -1529 96 -1530 5184 -1531 6144 -1532 1200 -1533 144 -1534 3240 -1535 1792 -1536 8064 -1537 6912 -1538 48 -1539 2048 -1540 3168 -1541 5760 -1542 128 -1543 32 -1544 128 -1545 288 -1546 32 -1547 96 -1548 24 -1549 32 -1550 512 -1551 1152 -1552 1536 -1553 48 -1554 144 -1555 16 -1556 144 -1557 48 -1558 144 -1559 96 -1560 96 -1561 96 -1562 5760 -1563 16 -1564 32 -1565 9504 -1566 10368 -1567 16 -1568 144 -1569 2016 -1570 32 -1571 384 -1572 64 -1573 96 -1574 48 -1575 240 -1576 8 -1577 480 -1578 13312 -1579 672 -1580 4992 -1581 1792 -1582 1344 -1583 672 -1584 72 -1585 2592 -1586 768 -1587 48 -1588 1680 -1589 192 -1590 336 -1591 80 -1592 480 -1593 4096 -1594 1920 -1595 32 -1596 96 -1597 24 -1598 32 -1599 256 -1600 32 -1601 32 -1602 2560 -1603 128 -1604 2160 -1605 32 -1606 8 -1607 16 -1608 672 -1609 144 -1610 1152 -1611 96 -1612 32 -1613 32 -1614 192 -1615 256 -1616 8 -1617 6912 -1618 72 -1619 1024 -1620 160 -1621 96 -1622 864 -1623 1792 -1624 4928 -1625 5184 -1626 144 -1627 256 -1628 192 -1629 32 -1630 72 -1631 32 -1632 480 -1633 32 -1634 16 -1635 24 -1636 8 -1637 288 -1638 72 -1639 144 -1640 48 -1641 48 -1642 16 -1643 10296 -1644 2816 -1645 5824 -1646 3920 -1647 144 -1648 512 -1649 640 -1650 2592 -1651 192 -1652 3960 -1653 1920 -1654 9408 -1655 5488 -1656 1344 -1657 576 -1658 24 -1659 192 -1660 640 -1661 192 -1662 32 -1663 3960 -1664 3080 -1665 4480 -1666 3136 -1667 2560 -1668 768 -1669 6720 -1670 4032 -1671 224 -1672 1600 -1673 3360 -1674 480 -1675 16 -1676 384 -1677 8 -1678 11760 -1679 16 -1680 32 -1681 16 -1682 48 -1683 5720 -1684 64 -1685 128 -1686 16 -1687 32 -1688 32 -1689 32 -1690 48 -1691 32 -1692 32 -1693 4800 -1694 32 -1695 64 -1696 32 -1697 64 -1698 16 -1699 448 -1700 1920 -1701 32 -1702 1600 -1703 720 -1704 2880 -1705 8 -1706 3456 -1707 5184 -1708 4608 -1709 2016 -1710 96 -1711 9216 -1712 768 -1713 624 -1714 96 -1715 240 -1716 32 -1717 16 -1718 64 -1719 384 -1720 1080 -1721 32 -1722 96 -1723 16 -1724 144 -1725 16 -1726 3600 -1727 1152 -1728 672 -1729 32 -1730 1536 -1731 144 -1732 8 -1733 64 -1734 8 -1735 128 -1736 216 -1737 16 -1738 64 -1739 32 -1740 192 -1741 32 -1742 336 -1743 96 -1744 5040 -1745 7560 -1746 8736 -1747 64 -1748 256 -1749 64 -1750 432 -1751 192 -1752 8 -1753 32 -1754 4320 -1755 64 -1756 8448 -1757 8 -1758 5376 -1759 6048 -1760 4480 -1761 96 -1762 3136 -1763 864 -1764 432 -1765 96 -1766 256 -1767 96 -1768 1536 -1769 896 -1770 768 -1771 480 -1772 96 -1773 96 -1774 8 -1775 144 -1776 32 -1777 9216 -1778 7200 -1779 32 -1780 96 -1781 6400 -1782 336 -1783 7392 -1784 7920 -1785 4992 -1786 1568 -1787 624 -1788 360 -1789 480 -1790 288 -1791 7168 -1792 3840 -1793 10080 -1794 128 -1795 1792 -1796 1728 -1797 4608 -1798 7776 -1799 20480 -1800 15360 -1801 720 -1802 800 -1803 2560 -1804 160 -1805 7040 -1806 16 -1807 3456 -1808 48 -1809 64 -1810 1920 -1811 12800 -1812 480 -1813 128 -1814 8 -1815 64 -1816 17920 -1817 5376 -1818 256 -1819 4800 -1820 360 -1821 8 -1822 96 -1823 16 -1824 8 -1825 32 -1826 32 -1827 128 -1828 2496 -1829 96 -1830 14976 -1831 800 -1832 504 -1833 216 -1834 96 -1835 640 -1836 384 -1837 144 -1838 16 -1839 24 -1840 1176 -1841 320 -1842 96 -1843 96 -1844 160 -1845 8 -1846 128 -1847 32 -1848 64 -1849 32 -1850 624 -1851 24 -1852 2112 -1853 1728 -1854 144 -1855 96 -1856 1600 -1857 4320 -1858 240 -1859 16 -1860 480 -1861 24 -1862 144 -1863 16016 -1864 5760 -1865 640 -1866 10560 -1867 7680 -1868 1024 -1869 32 -1870 256 -1871 9360 -1872 15360 -1873 4032 -1874 10752 -1875 1440 -1876 8 -1877 128 -1878 32 -1879 64 -1880 48 -1881 192 -1882 160 -1883 1280 -1884 1280 -1885 144 -1886 7744 -1887 3840 -1888 5760 -1889 960 -1890 64 -1891 8 -1892 144 -1893 192 -1894 672 -1895 8 -1896 96 -1897 7680 -1898 80 -1899 384 -1900 128 -1901 96 -1902 352 -1903 80 -1904 576 -1905 48 -1906 144 -1907 16 -1908 800 -1909 480 -1910 120 -1911 8 -1912 64 -1913 96 -1914 32 -1915 8 -1916 8 -1917 32 -1918 16 -1919 144 -1920 32 -1921 768 -1922 144 -1923 32 -1924 4096 -1925 16 -1926 120 -1927 3520 -1928 3328 -1929 8 -1930 5376 -1931 288 -1932 3328 -1933 48 -1934 144 -1935 8 -1936 320 -1937 1120 -1938 192 -1939 32 -1940 2304 -1941 192 -1942 3584 -1943 96 -1944 3072 -1945 4608 -1946 8 -1947 1920 -1948 176 -1949 576 -1950 6656 -1951 32 -1952 1664 -1953 3520 -1954 1152 -1955 8 -1956 128 -1957 6720 -1958 128 -1959 96 -1960 1920 -1961 1920 -1962 1728 -1963 24 -1964 8 -1965 64 -1966 1536 -1967 480 -1968 192 -1969 32 -1970 48 -1971 16 -1972 336 -1973 32 -1974 320 -1975 32 -1976 144 -1977 32 -1978 528 -1979 3120 -1980 1440 -1981 3168 -1982 576 -1983 4480 -1984 4224 -1985 192 -1986 8960 -1987 384 -1988 5760 -1989 2112 -1990 1344 -1991 144 -1992 2560 -1993 8 -1994 1056 -1995 72 -1996 64 -1997 288 -1998 8 -1999 864 -2000 16 -2001 16 -2002 5376 -2003 4928 -2004 8 -2005 4480 -2006 5280 -2007 112 -2008 4608 -2009 32 -2010 64 -2011 7680 -2012 16640 -2013 768 -2014 1120 -2015 64 -2016 1920 -2017 2240 -2018 16 -2019 224 -2020 2016 -2021 3120 -2022 16 -2023 1920 -2024 1664 -2025 8736 -2026 5376 -2027 7056 -2028 1152 -2029 1536 -2030 960 -2031 720 -2032 8448 -2033 32 -2034 6144 -2035 672 -2036 32 -2037 16 -2038 16 -2039 192 -2040 768 -2041 480 -2042 24 -2043 32 -2044 1792 -2045 8 -2046 144 -2047 32 -2048 128 -2049 8 -2050 64 -2051 672 -2052 240 -2053 960 -2054 32 -2055 14976 -2056 576 -2057 2520 -2058 2048 -2059 8 -2060 3888 -2061 2816 -2062 144 -2063 128 -2064 8 -2065 4224 -2066 640 -2067 8320 -2068 384 -2069 4480 -2070 64 -2071 384 -2072 64 -2073 144 -2074 64 -2075 384 -2076 3744 -2077 32 -2078 32 -2079 32 -2080 16 -2081 360 -2082 96 -2083 16 -2084 448 -2085 96 -2086 8 -2087 240 -2088 32 -2089 192 -2090 6912 -2091 8 -2092 8 -2093 64 -2094 2880 -2095 3456 -2096 1680 -2097 2800 -2098 896 -2099 4608 -2100 640 -2101 32 -2102 16 -2103 64 -2104 32 -2105 12096 -2106 1152 -2107 960 -2108 960 -2109 1152 -2110 32 -2111 720 -2112 576 -2113 384 -2114 8 -2115 512 -2116 8 -2117 8 -2118 64 -2119 216 -2120 64 -2121 32 -2122 864 -2123 3840 -2124 32 -2125 8 -2126 32 -2127 48 -2128 24 -2129 120 -2130 72 -2131 64 -2132 48 -2133 192 -2134 128 -2135 32 -2136 48 -2137 32 -2138 48 -2139 16 -2140 32 -2141 480 -2142 216 -2143 32 -2144 320 -2145 64 -2146 8 -2147 192 -2148 32 -2149 8960 -2150 1536 -2151 6048 -2152 5544 -2153 6272 -2154 864 -2155 288 -2156 5760 -2157 1008 -2158 6912 -2159 720 -2160 4992 -2161 24 -2162 192 -2163 576 -2164 64 -2165 768 -2166 384 -2167 24 -2168 3600 -2169 3584 -2170 32 -2171 1920 -2172 384 -2173 72 -2174 48 -2175 144 -2176 64 -2177 16896 -2178 288 -2179 3360 -2180 32 -2181 4320 -2182 9600 -2183 16 -2184 1568 -2185 384 -2186 3136 -2187 288 -2188 8 -2189 96 -2190 2400 -2191 64 -2192 8 -2193 32 -2194 16 -2195 1440 -2196 12800 -2197 3072 -2198 4096 -2199 1152 -2200 24 -2201 448 -2202 48 -2203 480 -2204 96 -2205 768 -2206 168 -2207 1584 -2208 1320 -2209 192 -2210 192 -2211 224 -2212 3528 -2213 6000 -2214 1920 -2215 8 -2216 13520 -2217 1600 -2218 720 -2219 720 -2220 800 -2221 784 -2222 144 -2223 320 -2224 32 -2225 1120 -2226 1200 -2227 576 -2228 96 -2229 2160 -2230 24 -2231 32 -2232 2560 -2233 560 -2234 8 -2235 1280 -2236 16 -2237 32 -2238 16 -2239 14976 -2240 64 -2241 16 -2242 32 -2243 128 -2244 128 -2245 8 -2246 216 -2247 8 -2248 96 -2249 128 -2250 1280 -2251 144 -2252 576 -2253 336 -2254 144 -2255 144 -2256 72 -2257 32 -2258 32 -2259 96 -2260 16 -2261 1920 -2262 12960 -2263 8 -2264 1344 -2265 480 -2266 3528 -2267 6720 -2268 4032 -2269 7488 -2270 2880 -2271 280 -2272 2160 -2273 1920 -2274 1008 -2275 216 -2276 24 -2277 8 -2278 4032 -2279 4032 -2280 5632 -2281 32 -2282 32 -2283 32 -2284 48 -2285 288 -2286 32 -2287 144 -2288 32 -2289 16 -2290 64 -2291 16 -2292 48 -2293 864 -2294 800 -2295 9984 -2296 96 -2297 16 -2298 128 -2299 16 -2300 32 -2301 8 -2302 96 -2303 32 -2304 800 -2305 1536 -2306 240 -2307 96 -2308 3600 -2309 32 -2310 896 -2311 640 -2312 96 -2313 96 -2314 288 -2315 288 -2316 1800 -2317 720 -2318 144 -2319 48 -2320 96 -2321 48 -2322 128 -2323 16 -2324 96 -2325 128 -2326 32 -2327 64 -2328 192 -2329 480 -2330 32 -2331 48 -2332 120 -2333 32 -2334 8 -2335 216 -2336 32 -2337 64 -2338 32 -2339 8 -2340 32 -2341 32 -2342 32 -2343 32 -2344 24 -2345 96 -2346 8 -2347 32 -2348 64 -2349 6912 -2350 48 -2351 192 -2352 192 -2353 576 -2354 576 -2355 96 -2356 48 -2357 32 -2358 288 -2359 64 -2360 64 -2361 32 -2362 64 -2363 144 -2364 144 -2365 2304 -2366 3520 -2367 9856 -2368 1728 -2369 8064 -2370 3360 -2371 8 -2372 5760 -2373 6144 -2374 1760 -2375 288 -2376 3456 -2377 360 -2378 160 -2379 192 -2380 2592 -2381 5184 -2382 3456 -2383 3136 -2384 144 -2385 5544 -2386 4032 -2387 3920 -2388 256 -2389 800 -2390 3360 -2391 4032 -2392 96 -2393 640 -2394 32 -2395 128 -2396 32 -2397 16 -2398 768 -2399 640 -2400 48 -2401 1792 -2402 16 -2403 16 -2404 32 -2405 32 -2406 2016 -2407 384 -2408 8 -2409 480 -2410 32 -2411 16 -2412 8 -2413 240 -2414 16 -2415 32 -2416 2304 -2417 1152 -2418 24 -2419 96 -2420 32 -2421 144 -2422 24 -2423 8 -2424 288 -2425 3584 -2426 16 -2427 16 -2428 1008 -2429 72 -2430 32 -2431 3136 -2432 4032 -2433 6656 -2434 3696 -2435 1344 -2436 2160 -2437 32 -2438 144 -2439 16 -2440 32 -2441 672 -2442 64 -2443 32 -2444 48 -2445 128 -2446 192 -2447 64 -2448 720 -2449 8 -2450 16 -2451 32 -2452 1024 -2453 48 -2454 80 -2455 288 -2456 96 -2457 128 -2458 9984 -2459 96 -2460 16 -2461 32 -2462 2240 -2463 640 -2464 8 -2465 32 -2466 48 -2467 32 -2468 8 -2469 48 -2470 8 -2471 8 -2472 48 -2473 64 -2474 16 -2475 5760 -2476 1152 -2477 8064 -2478 576 -2479 128 -2480 1320 -2481 336 -2482 128 -2483 32 -2484 8 -2485 5376 -2486 576 -2487 432 -2488 24 -2489 192 -2490 48 -2491 48 -2492 16 -2493 16 -2494 48 -2495 32 -2496 480 -2497 384 -2498 384 -2499 216 -2500 48 -2501 144 -2502 64 -2503 32 -2504 7040 -2505 9408 -2506 8640 -2507 3840 -2508 320 -2509 448 -2510 5184 -2511 64 -2512 168 -2513 728 -2514 56 -2515 80 -2516 5760 -2517 144 -2518 5376 -2519 19968 -2520 3840 -2521 4096 -2522 3360 -2523 3072 -2524 144 -2525 1440 -2526 4608 -2527 2304 -2528 64 -2529 32 -2530 2560 -2531 1320 -2532 384 -2533 3072 -2534 192 -2535 160 -2536 10240 -2537 2520 -2538 48 -2539 16 -2540 32 -2541 1008 -2542 384 -2543 96 -2544 576 -2545 48 -2546 192 -2547 128 -2548 1440 -2549 72 -2550 32 -2551 32 -2552 16384 -2553 24 -2554 48 -2555 1920 -2556 32 -2557 32 -2558 32 -2559 144 -2560 72 -2561 1152 -2562 96 -2563 48 -2564 32 -2565 8 -2566 3072 -2567 16 -2568 16 -2569 48 -2570 3584 -2571 1440 -2572 896 -2573 64 -2574 96 -2575 72 -2576 16 -2577 48 -2578 32 -2579 64 -2580 192 -2581 16 -2582 800 -2583 192 -2584 48 -2585 96 -2586 864 -2587 48 -2588 96 -2589 144 -2590 2464 -2591 16 -2592 32 -2593 5376 -2594 1760 -2595 7200 -2596 5120 -2597 9984 -2598 3584 -2599 10752 -2600 8320 -2601 11648 -2602 15360 -2603 1024 -2604 96 -2605 288 -2606 9152 -2607 5120 -2608 8320 -2609 32 -2610 6552 -2611 1760 -2612 2592 -2613 144 -2614 96 -2615 32 -2616 32 -2617 24 -2618 16 -2619 5040 -2620 352 -2621 1920 -2622 32 -2623 32 -2624 32 -2625 8 -2626 64 -2627 8 -2628 32 -2629 6240 -2630 24 -2631 8448 -2632 2688 -2633 192 -2634 128 -2635 8 -2636 576 -2637 16 -2638 3520 -2639 128 -2640 192 -2641 64 -2642 16 -2643 64 -2644 8 -2645 3520 -2646 16 -2647 7680 -2648 480 -2649 16 -2650 64 -2651 256 -2652 288 -2653 64 -2654 144 -2655 96 -2656 8 -2657 6048 -2658 32 -2659 2160 -2660 32 -2661 32 -2662 192 -2663 48 -2664 768 -2665 24 -2666 8 -2667 4608 -2668 3072 -2669 1760 -2670 3072 -2671 8 -2672 256 -2673 16 -2674 32 -2675 2160 -2676 288 -2677 32 -2678 288 -2679 32 -2680 144 -2681 1024 -2682 896 -2683 216 -2684 2112 -2685 384 -2686 480 -2687 72 -2688 32 -2689 32 -2690 32 -2691 288 -2692 216 -2693 8 -2694 24 -2695 1536 -2696 16 -2697 1792 -2698 32 -2699 128 -2700 32 -2701 792 -2702 96 -2703 4992 -2704 16 -2705 8 -2706 32 -2707 8 -2708 192 -2709 384 -2710 32 -2711 32 -2712 32 -2713 1024 -2714 1792 -2715 256 -2716 480 -2717 216 -2718 32 -2719 8 -2720 16016 -2721 1280 -2722 16 -2723 12000 -2724 28672 -2725 4480 -2726 8960 -2727 16 -2728 8 -2729 8 -2730 240 -2731 96 -2732 5760 -2733 384 -2734 8 -2735 1056 -2736 1152 -2737 5120 -2738 32 -2739 8 -2740 960 -2741 384 -2742 32 -2743 784 -2744 288 -2745 16 -2746 8448 -2747 8 -2748 8 -2749 7680 -2750 32 -2751 3072 -2752 8 -2753 576 -2754 8 -2755 240 -2756 216 -2757 480 -2758 48 -2759 16 -2760 8 -2761 1664 -2762 960 -2763 576 -2764 5376 -2765 128 -2766 672 -2767 240 -2768 8 -2769 9680 -2770 768 -2771 336 -2772 4800 -2773 96 -2774 2880 -2775 2304 -2776 10240 -2777 1600 -2778 8 -2779 8 -2780 1848 -2781 16 -2782 64 -2783 240 -2784 32 -2785 288 -2786 48 -2787 8 -2788 16 -2789 32 -2790 128 -2791 5376 -2792 4480 -2793 16 -2794 48 -2795 32 -2796 4224 -2797 16 -2798 8 -2799 144 -2800 24 -2801 8 -2802 4608 -2803 32 -2804 32 -2805 19200 -2806 5120 -2807 960 -2808 64 -2809 96 -2810 3520 -2811 32 -2812 8 -2813 32 -2814 2496 -2815 16 -2816 3600 -2817 5760 -2818 32 -2819 32 -2820 2880 -2821 7680 -2822 1920 -2823 480 -2824 896 -2825 1600 -2826 800 -2827 16 -2828 1408 -2829 1920 -2830 8 -2831 720 -2832 768 -2833 16 -2834 1152 -2835 32 -2836 1920 -2837 1120 -2838 48 -2839 8 -2840 192 -2841 48 -2842 2048 -2843 720 -2844 96 -2845 1152 -2846 400 -2847 1280 -2848 1440 -2849 96 -2850 15488 -2851 48 -2852 480 -2853 960 -2854 5880 -2855 3072 -2856 2112 -2857 1536 -2858 96 -2859 7488 -2860 1920 -2861 7040 -2862 2816 -2863 16 -2864 1408 -2865 320 -2866 64 -2867 16 -2868 3072 -2869 64 -2870 6656 -2871 3840 -2872 144 -2873 360 -2874 8 -2875 96 -2876 32 -2877 256 -2878 7680 -2879 576 -2880 32 -2881 5120 -2882 6656 -2883 192 -2884 6336 -2885 4608 -2886 384 -2887 32 -2888 48 -2889 80 -2890 1408 -2891 32 -2892 8 -2893 16 -2894 17280 -2895 1152 -2896 40 -2897 4576 -2898 5280 -2899 1584 -2900 24 -2901 48 -2902 32 -2903 192 -2904 24 -2905 128 -2906 1600 -2907 8 -2908 192 -2909 128 -2910 384 -2911 128 -2912 144 -2913 5120 -2914 1728 -2915 8 -2916 640 -2917 48 -2918 4096 -2919 32 -2920 16 -2921 1152 -2922 384 -2923 64 -2924 9600 -2925 6240 -2926 256 -2927 2816 -2928 8 -2929 16 -2930 48 -2931 1120 -2932 1760 -2933 6144 -2934 1152 -2935 1120 -2936 192 -2937 192 -2938 5120 -2939 1024 -2940 1536 -2941 96 -2942 1920 -2943 192 -2944 4160 -2945 8 -2946 1600 -2947 32 -2948 32 -2949 128 -2950 96 -2951 64 -2952 1680 -2953 144 -2954 96 -2955 864 -2956 32 -2957 48 -2958 16 -2959 1152 -2960 5760 -2961 96 -2962 2200 -2963 384 -2964 128 -2965 32 -2966 8 -2967 384 -2968 48 -2969 8 -2970 1536 -2971 768 -2972 3456 -2973 5040 -2974 2904 -2975 4032 -2976 2304 -2977 2880 -2978 6912 -2979 32 -2980 640 -2981 24 -2982 320 -2983 768 -2984 480 -2985 800 -2986 32 -2987 16 -2988 96 -2989 48 -2990 8 -2991 32 -2992 64 -2993 72 -2994 32 -2995 32 -2996 48 -2997 576 -2998 576 -2999 8 -3000 8 -3001 64 -3002 24 -3003 128 -3004 1024 -3005 288 -3006 32 -3007 96 -3008 64 -3009 48 -3010 16 -3011 64 -3012 40 -3013 128 -3014 16 -3015 16 -3016 8 -3017 64 -3018 16 -3019 7056 -3020 4928 -3021 64 -3022 2560 -3023 4032 -3024 4480 -3025 3136 -3026 4200 -3027 1664 -3028 240 -3029 192 -3030 5040 -3031 4480 -3032 4800 -3033 5120 -3034 6144 -3035 360 -3036 7680 -3037 72 -3038 2520 -3039 1792 -3040 32 -3041 8 -3042 8 -3043 96 -3044 12096 -3045 5040 -3046 480 -3047 1400 -3048 96 -3049 32 -3050 48 -3051 96 -3052 24 -3053 16 -3054 144 -3055 128 -3056 5120 -3057 6400 -3058 23040 -3059 6720 -3060 768 -3061 32 -3062 384 -3063 64 -3064 8 -3065 16 -3066 32 -3067 8 -3068 96 -3069 5200 -3070 2304 -3071 1600 -3072 384 -3073 2304 -3074 24 -3075 672 -3076 240 -3077 24 -3078 16 -3079 1008 -3080 2688 -3081 128 -3082 480 -3083 48 -3084 120 -3085 8 -3086 120 -3087 3640 -3088 8 -3089 1920 -3090 3584 -3091 32 -3092 1008 -3093 192 -3094 160 -3095 416 -3096 96 -3097 144 -3098 128 -3099 288 -3100 32 -3101 64 -3102 96 -3103 64 -3104 192 -3105 216 -3106 840 -3107 120 -3108 224 -3109 96 -3110 16 -3111 720 -3112 192 -3113 32 -3114 32 -3115 1200 -3116 800 -3117 32 -3118 96 -3119 96 -3120 32 -3121 32 -3122 64 -3123 128 -3124 32 -3125 8 -3126 32 -3127 32 -3128 672 -3129 192 -3130 72 -3131 2800 -3132 3960 -3133 2592 -3134 8064 -3135 288 -3136 48 -3137 3600 -3138 1568 -3139 3024 -3140 7840 -3141 3360 -3142 3456 -3143 8 -3144 7488 -3145 352 -3146 560 -3147 864 -3148 8 -3149 96 -3150 128 -3151 3072 -3152 16 -3153 64 -3154 16 -3155 64 -3156 32 -3157 48 -3158 8 -3159 32 -3160 16 -3161 256 -3162 32 -3163 80 -3164 32 -3165 80 -3166 384 -3167 32 -3168 96 -3169 32 -3170 3600 -3171 1920 -3172 48 -3173 320 -3174 72 -3175 192 -3176 216 -3177 1344 -3178 384 -3179 16 -3180 96 -3181 32 -3182 32 -3183 64 -3184 32 -3185 32 -3186 96 -3187 32 -3188 32 -3189 128 -3190 64 -3191 64 -3192 16 -3193 32 -3194 16 -3195 96 -3196 32 -3197 32 -3198 1200 -3199 96 -3200 96 -3201 1000 -3202 96 -3203 96 -3204 384 -3205 160 -3206 216 -3207 2592 -3208 1080 -3209 768 -3210 3072 -3211 3520 -3212 64 -3213 48 -3214 3136 -3215 6720 -3216 6144 -3217 5544 -3218 7488 -3219 224 -3220 216 -3221 144 -3222 6160 -3223 32 -3224 240 -3225 3584 -3226 2352 -3227 256 -3228 64 -3229 16 -3230 160 -3231 32 -3232 96 -3233 16 -3234 32 -3235 480 -3236 32 -3237 16 -3238 4032 -3239 16 -3240 16 -3241 32 -3242 16 -3243 16 -3244 960 -3245 96 -3246 48 -3247 96 -3248 64 -3249 64 -3250 1920 -3251 32 -3252 720 -3253 144 -3254 96 -3255 2688 -3256 1960 -3257 4608 -3258 120 -3259 32 -3260 8 -3261 48 -3262 64 -3263 32 -3264 672 -3265 144 -3266 48 -3267 144 -3268 72 -3269 8 -3270 32 -3271 96 -3272 32 -3273 32 -3274 1600 -3275 512 -3276 32 -3277 8 -3278 48 -3279 16 -3280 1200 -3281 48 -3282 24 -3283 32 -3284 192 -3285 256 -3286 32 -3287 16 -3288 32 -3289 1344 -3290 32 -3291 8 -3292 32 -3293 128 -3294 128 -3295 48 -3296 5376 -3297 9216 -3298 2160 -3299 960 -3300 64 -3301 64 -3302 48 -3303 4200 -3304 4480 -3305 144 -3306 32 -3307 48 -3308 16 -3309 8 -3310 288 -3311 96 -3312 384 -3313 288 -3314 48 -3315 192 -3316 32 -3317 32 -3318 3456 -3319 160 -3320 2400 -3321 2400 -3322 512 -3323 3200 -3324 384 -3325 4840 -3326 528 -3327 288 -3328 1056 -3329 192 -3330 72 -3331 32 -3332 432 -3333 48 -3334 12288 -3335 4704 -3336 336 -3337 2560 -3338 9600 -3339 1920 -3340 3072 -3341 64 -3342 80 -3343 864 -3344 2400 -3345 480 -3346 4096 -3347 3200 -3348 1008 -3349 2880 -3350 160 -3351 6048 -3352 672 -3353 192 -3354 64 -3355 96 -3356 16 -3357 32 -3358 1680 -3359 64 -3360 24 -3361 128 -3362 72 -3363 16 -3364 16 -3365 11520 -3366 1536 -3367 320 -3368 600 -3369 16 -3370 8 -3371 128 -3372 8 -3373 72 -3374 8 -3375 576 -3376 320 -3377 16 -3378 96 -3379 192 -3380 48 -3381 16 -3382 128 -3383 352 -3384 32 -3385 16 -3386 32 -3387 32 -3388 96 -3389 864 -3390 144 -3391 336 -3392 96 -3393 64 -3394 72 -3395 32 -3396 216 -3397 8 -3398 15600 -3399 5760 -3400 5376 -3401 3000 -3402 4800 -3403 72 -3404 11232 -3405 512 -3406 19200 -3407 160 -3408 1152 -3409 14336 -3410 480 -3411 32 -3412 72 -3413 1120 -3414 1680 -3415 1008 -3416 528 -3417 320 -3418 32 -3419 24 -3420 176 -3421 2880 -3422 12480 -3423 4800 -3424 480 -3425 32 -3426 144 -3427 16 -3428 160 -3429 288 -3430 16 -3431 8 -3432 56 -3433 240 -3434 32 -3435 320 -3436 64 -3437 6144 -3438 96 -3439 32 -3440 128 -3441 16 -3442 48 -3443 80 -3444 8 -3445 6912 -3446 400 -3447 288 -3448 144 -3449 4800 -3450 720 -3451 32 -3452 320 -3453 64 -3454 12480 -3455 23400 -3456 2304 -3457 336 -3458 56 -3459 80 -3460 384 -3461 8 -3462 96 -3463 2016 -3464 8 -3465 288 -3466 16 -3467 64 -3468 320 -3469 96 -3470 32 -3471 64 -3472 16 -3473 32 -3474 8 -3475 640 -3476 32 -3477 64 -3478 32 -3479 8 -3480 96 -3481 8 -3482 6240 -3483 384 -3484 384 -3485 32 -3486 64 -3487 64 -3488 576 -3489 96 -3490 1920 -3491 48 -3492 8 -3493 4992 -3494 16 -3495 1536 -3496 1024 -3497 288 -3498 3072 -3499 3072 -3500 288 -3501 2880 -3502 192 -3503 32 -3504 192 -3505 16 -3506 24 -3507 96 -3508 8 -3509 432 -3510 16 -3511 4608 -3512 96 -3513 224 -3514 16 -3515 64 -3516 1920 -3517 8 -3518 8 -3519 64 -3520 192 -3521 224 -3522 144 -3523 768 -3524 32 -3525 24 -3526 32 -3527 384 -3528 32 -3529 8 -3530 32 -3531 576 -3532 48 -3533 16 -3534 8 -3535 128 -3536 32 -3537 192 -3538 32 -3539 384 -3540 192 -3541 16 -3542 16 -3543 11264 -3544 1120 -3545 12480 -3546 336 -3547 2112 -3548 3840 -3549 672 -3550 192 -3551 16 -3552 768 -3553 1200 -3554 1024 -3555 768 -3556 14336 -3557 48 -3558 16 -3559 72 -3560 704 -3561 384 -3562 8 -3563 64 -3564 32 -3565 48 -3566 4368 -3567 1848 -3568 5184 -3569 7680 -3570 4608 -3571 8 -3572 16 -3573 32 -3574 1560 -3575 2352 -3576 672 -3577 7680 -3578 8320 -3579 16 -3580 6552 -3581 4992 -3582 48 -3583 24 -3584 32 -3585 288 -3586 32 -3587 216 -3588 8 -3589 16 -3590 216 -3591 8 -3592 2496 -3593 896 -3594 16 -3595 384 -3596 480 -3597 72 -3598 3072 -3599 256 -3600 16 -3601 4096 -3602 32 -3603 8 -3604 4608 -3605 3072 -3606 32 -3607 8 -3608 8 -3609 64 -3610 7680 -3611 24 -3612 768 -3613 256 -3614 480 -3615 8 -3616 672 -3617 144 -3618 16 -3619 4480 -3620 5632 -3621 64 -3622 24 -3623 8800 -3624 384 -3625 32 -3626 24 -3627 240 -3628 3744 -3629 672 -3630 64 -3631 32 -3632 19712 -3633 10752 -3634 7680 -3635 216 -3636 8 -3637 32 -3638 5632 -3639 8 -3640 960 -3641 360 -3642 16 -3643 32 -3644 64 -3645 48 -3646 288 -3647 1872 -3648 1728 -3649 144 -3650 32 -3651 64 -3652 1344 -3653 384 -3654 96 -3655 32 -3656 32 -3657 960 -3658 16 -3659 32 -3660 1056 -3661 640 -3662 64 -3663 16 -3664 96 -3665 16 -3666 256 -3667 8 -3668 48 -3669 16 -3670 768 -3671 64 -3672 128 -3673 2880 -3674 384 -3675 8 -3676 576 -3677 24 -3678 16 -3679 144 -3680 64 -3681 96 -3682 4480 -3683 4928 -3684 5376 -3685 384 -3686 8 -3687 312 -3688 7168 -3689 48 -3690 5376 -3691 384 -3692 96 -3693 16 -3694 32 -3695 96 -3696 8 -3697 96 -3698 64 -3699 48 -3700 32 -3701 144 -3702 96 -3703 24 -3704 32 -3705 4608 -3706 4320 -3707 7168 -3708 8 -3709 8 -3710 32 -3711 48 -3712 128 -3713 64 -3714 8960 -3715 1344 -3716 64 -3717 768 -3718 32 -3719 32 -3720 600 -3721 3888 -3722 8 -3723 288 -3724 16 -3725 32 -3726 128 -3727 32 -3728 96 -3729 32 -3730 16 -3731 64 -3732 8 -3733 96 -3734 96 -3735 32 -3736 3072 -3737 6272 -3738 1152 -3739 11520 -3740 12320 -3741 8 -3742 2304 -3743 48 -3744 32 -3745 8 -3746 3584 -3747 4800 -3748 8 -3749 288 -3750 16 -3751 3840 -3752 5280 -3753 40 -3754 1408 -3755 32 -3756 96 -3757 7680 -3758 360 -3759 176 -3760 176 -3761 1728 -3762 384 -3763 48 -3764 11648 -3765 1008 -3766 8 -3767 8 -3768 32 -3769 14080 -3770 1600 -3771 2880 -3772 1600 -3773 256 -3774 32 -3775 15360 -3776 32 -3777 32 -3778 16 -3779 2880 -3780 2240 -3781 240 -3782 3600 -3783 2560 -3784 800 -3785 96 -3786 240 -3787 840 -3788 480 -3789 24 -3790 1440 -3791 512 -3792 2240 -3793 32 -3794 32 -3795 1152 -3796 576 -3797 64 -3798 832 -3799 24 -3800 32 -3801 320 -3802 8 -3803 640 -3804 440 -3805 576 -3806 96 -3807 432 -3808 144 -3809 48 -3810 128 -3811 512 -3812 64 -3813 720 -3814 1440 -3815 768 -3816 3744 -3817 768 -3818 3360 -3819 1200 -3820 16 -3821 8320 -3822 576 -3823 32 -3824 2592 -3825 9984 -3826 4032 -3827 1152 -3828 32 -3829 32 -3830 4224 -3831 1152 -3832 32 -3833 96 -3834 32 -3835 240 -3836 32 -3837 5376 -3838 384 -3839 64 -3840 3072 -3841 24 -3842 192 -3843 128 -3844 9216 -3845 4480 -3846 256 -3847 1728 -3848 128 -3849 640 -3850 128 -3851 96 -3852 24 -3853 32 -3854 1920 -3855 32 -3856 16 -3857 32 -3858 256 -3859 16 -3860 32 -3861 1664 -3862 4096 -3863 64 -3864 672 -3865 288 -3866 4480 -3867 3200 -3868 768 -3869 1792 -3870 32 -3871 32 -3872 32 -3873 32 -3874 8 -3875 256 -3876 16 -3877 96 -3878 11264 -3879 32 -3880 8 -3881 48 -3882 480 -3883 8 -3884 144 -3885 32 -3886 16 -3887 8 -3888 4224 -3889 8 -3890 8 -3891 7280 -3892 8 -3893 432 -3894 32 -3895 256 -3896 8008 -3897 16 -3898 32 -3899 32 -3900 48 -3901 10752 -3902 32 -3903 32 -3904 1728 -3905 16 -3906 240 -3907 16 -3908 16 -3909 32 -3910 16 -3911 32 -3912 1024 -3913 80 -3914 160 -3915 144 -3916 24 -3917 16 -3918 48 -3919 64 -3920 64 -3921 48 -3922 64 -3923 16 -3924 16 -3925 960 -3926 2240 -3927 720 -3928 512 -3929 32 -3930 32 -3931 960 -3932 480 -3933 32 -3934 96 -3935 8 -3936 16 -3937 12000 -3938 16 -3939 320 -3940 32 -3941 384 -3942 16 -3943 8 -3944 1760 -3945 384 -3946 8 -3947 2688 -3948 32 -3949 32 -3950 32 -3951 2000 -3952 2816 -3953 4032 -3954 1152 -3955 8 -3956 192 -3957 32 -3958 384 -3959 64 -3960 384 -3961 12096 -3962 1152 -3963 8 -3964 1536 -3965 216 -3966 64 -3967 64 -3968 8 -3969 96 -3970 40 -3971 720 -3972 32 -3973 2688 -3974 16 -3975 16 -3976 8 -3977 32 -3978 8 -3979 32 -3980 4096 -3981 2688 -3982 384 -3983 168 -3984 2080 -3985 384 -3986 3024 -3987 3168 -3988 1680 -3989 768 -3990 3456 -3991 6048 -3992 10296 -3993 32 -3994 4752 -3995 32 -3996 32 -3997 32 -3998 192 -3999 2240 -4000 768 -4001 512 -4002 40 -4003 1344 -4004 144 -4005 480 -4006 576 -4007 9216 -4008 288 -4009 48 -4010 448 -4011 96 -4012 320 -4013 128 -4014 96 -4015 32 -4016 144 -4017 8 -4018 2200 -4019 640 -4020 8 -4021 16 -4022 96 -4023 96 -4024 32 -4025 288 -4026 96 -4027 32 -4028 8 -4029 64 -4030 32 -4031 96 -4032 16 -4033 144 -4034 64 -4035 64 -4036 64 -4037 672 -4038 64 -4039 16 -4040 16 -4041 32 -4042 48 -4043 768 -4044 128 -4045 32 -4046 16 -4047 48 -4048 64 -4049 32 -4050 16 -4051 16 -4052 64 -4053 3120 -4054 480 -4055 320 -4056 32 -4057 5184 -4058 96 -4059 4224 -4060 4800 -4061 4480 -4062 648 -4063 4752 -4064 1680 -4065 256 -4066 400 -4067 2184 -4068 192 -4069 1568 -4070 3600 -4071 256 -4072 320 -4073 480 -4074 96 -4075 96 -4076 16 -4077 72 -4078 16 -4079 48 -4080 16 -4081 16 -4082 48 -4083 48 -4084 120 -4085 16 -4086 240 -4087 480 -4088 128 -4089 16 -4090 32 -4091 64 -4092 8 -4093 8 -4094 32 -4095 2000 -4096 768 -4097 480 -4098 64 -4099 32 -4100 1200 -4101 384 -4102 32 -4103 448 -4104 96 -4105 32 -4106 32 -4107 32 -4108 32 -4109 720 -4110 144 -4111 2880 -4112 160 -4113 64 -4114 96 -4115 32 -4116 64 -4117 32 -4118 96 -4119 48 -4120 128 -4121 8 -4122 144 -4123 32 -4124 480 -4125 96 -4126 72 -4127 32 -4128 32 -4129 640 -4130 8 -4131 8 -4132 96 -4133 96 -4134 72 -4135 3840 -4136 6336 -4137 840 -4138 400 -4139 144 -4140 1872 -4141 24 -4142 96 -4143 4320 -4144 5120 -4145 3136 -4146 5544 -4147 208 -4148 2688 -4149 2688 -4150 4032 -4151 4032 -4152 96 -4153 216 -4154 8 -4155 24 -4156 64 -4157 48 -4158 32 -4159 112 -4160 16 -4161 32 -4162 144 -4163 120 -4164 128 -4165 16 -4166 16 -4167 32 -4168 96 -4169 48 -4170 72 -4171 96 -4172 16 -4173 32 -4174 32 -4175 96 -4176 64 -4177 32 -4178 64 -4179 64 -4180 32 -4181 8 -4182 48 -4183 32 -4184 16 -4185 8 -4186 8 -4187 2560 -4188 192 -4189 720 -4190 576 -4191 192 -4192 5632 -4193 48 -4194 1568 -4195 3600 -4196 16 -4197 2520 -4198 280 -4199 3080 -4200 96 -4201 72 -4202 32 -4203 48 -4204 8 -4205 240 -4206 192 -4207 144 -4208 96 -4209 80 -4210 160 -4211 64 -4212 48 -4213 48 -4214 16 -4215 32 -4216 16 -4217 256 -4218 192 -4219 72 -4220 320 -4221 32 -4222 16 -4223 32 -4224 64 -4225 3360 -4226 128 -4227 64 -4228 64 -4229 16 -4230 32 -4231 8 -4232 8 -4233 32 -4234 48 -4235 16 -4236 1600 -4237 128 -4238 16 -4239 216 -4240 32 -4241 192 -4242 192 -4243 48 -4244 48 -4245 32 -4246 32 -4247 16 -4248 5376 -4249 48 -4250 8 -4251 5760 -4252 16 -4253 24 -4254 1960 -4255 6552 -4256 16 -4257 48 -4258 64 -4259 480 -4260 5760 -4261 320 -4262 320 -4263 960 -4264 320 -4265 864 -4266 512 -4267 32 -4268 3600 -4269 32 -4270 1008 -4271 384 -4272 1200 -4273 1248 -4274 4320 -4275 864 -4276 864 -4277 1344 -4278 96 -4279 1344 -4280 1280 -4281 720 -4282 18480 -4283 1536 -4284 32 -4285 8 -4286 240 -4287 576 -4288 256 -4289 192 -4290 16 -4291 16 -4292 1536 -4293 8320 -4294 3456 -4295 16 -4296 64 -4297 48 -4298 64 -4299 384 -4300 384 -4301 8 -4302 32 -4303 32 -4304 32 -4305 360 -4306 160 -4307 8 -4308 80 -4309 48 -4310 32 -4311 32 -4312 16 -4313 336 -4314 8 -4315 64 -4316 5760 -4317 320 -4318 960 -4319 480 -4320 192 -4321 2816 -4322 96 -4323 384 -4324 1680 -4325 96 -4326 16 -4327 48 -4328 16 -4329 256 -4330 6160 -4331 1728 -4332 384 -4333 2400 -4334 32 -4335 1728 -4336 8 -4337 64 -4338 16 -4339 72 -4340 6048 -4341 1920 -4342 480 -4343 32 -4344 1680 -4345 144 -4346 24 -4347 216 -4348 96 -4349 32 -4350 8 -4351 160 -4352 8 -4353 72 -4354 120 -4355 96 -4356 80 -4357 1728 -4358 128 -4359 96 -4360 840 -4361 16 -4362 64 -4363 128 -4364 6400 -4365 16 -4366 720 -4367 480 -4368 320 -4369 32 -4370 192 -4371 16 -4372 96 -4373 32 -4374 768 -4375 288 -4376 32 -4377 48 -4378 128 -4379 48 -4380 64 -4381 144 -4382 96 -4383 48 -4384 32 -4385 64 -4386 8 -4387 8 -4388 64 -4389 1536 -4390 2304 -4391 896 -4392 288 -4393 16 -4394 32 -4395 32 -4396 144 -4397 8 -4398 480 -4399 32 -4400 32 -4401 144 -4402 96 -4403 896 -4404 64 -4405 32 -4406 384 -4407 1024 -4408 32 -4409 32 -4410 240 -4411 224 -4412 32 -4413 32 -4414 64 -4415 3840 -4416 2816 -4417 8 -4418 384 -4419 112 -4420 64 -4421 128 -4422 128 -4423 32 -4424 144 -4425 384 -4426 8 -4427 32 -4428 512 -4429 64 -4430 32 -4431 192 -4432 64 -4433 32 -4434 480 -4435 32 -4436 288 -4437 96 -4438 32 -4439 144 -4440 8 -4441 32 -4442 72 -4443 128 -4444 16 -4445 144 -4446 8 -4447 144 -4448 32 -4449 32 -4450 288 -4451 3840 -4452 2400 -4453 448 -4454 144 -4455 672 -4456 192 -4457 2304 -4458 1920 -4459 16 -4460 240 -4461 288 -4462 96 -4463 8 -4464 48 -4465 3584 -4466 3072 -4467 32 -4468 192 -4469 128 -4470 256 -4471 480 -4472 672 -4473 32 -4474 32 -4475 1920 -4476 256 -4477 4224 -4478 48 -4479 16 -4480 7040 -4481 32 -4482 256 -4483 512 -4484 8 -4485 32 -4486 1024 -4487 3200 -4488 2800 -4489 400 -4490 192 -4491 1680 -4492 64 -4493 8 -4494 8 -4495 16 -4496 192 -4497 64 -4498 32 -4499 32 -4500 2048 -4501 16 -4502 48 -4503 216 -4504 32 -4505 8 -4506 32 -4507 4608 -4508 3600 -4509 2816 -4510 13824 -4511 16 -4512 1584 -4513 384 -4514 16 -4515 16 -4516 768 -4517 16 -4518 96 -4519 768 -4520 1344 -4521 288 -4522 8 -4523 800 -4524 8 -4525 32 -4526 32 -4527 72 -4528 32 -4529 168 -4530 8 -4531 4992 -4532 6656 -4533 64 -4534 7680 -4535 32 -4536 8 -4537 384 -4538 128 -4539 64 -4540 11880 -4541 2688 -4542 144 -4543 288 -4544 8 -4545 8 -4546 32 -4547 720 -4548 64 -4549 32 -4550 672 -4551 192 -4552 16 -4553 64 -4554 96 -4555 144 -4556 8960 -4557 480 -4558 5120 -4559 288 -4560 1400 -4561 400 -4562 160 -4563 768 -4564 32 -4565 256 -4566 32 -4567 16 -4568 144 -4569 32 -4570 48 -4571 16 -4572 1680 -4573 32 -4574 48 -4575 384 -4576 12800 -4577 1320 -4578 8 -4579 560 -4580 128 -4581 32 -4582 3200 -4583 8 -4584 4608 -4585 1584 -4586 24 -4587 16 -4588 32 -4589 10296 -4590 16 -4591 240 -4592 64 -4593 6144 -4594 192 -4595 32 -4596 128 -4597 32 -4598 32 -4599 2304 -4600 64 -4601 144 -4602 32 -4603 1664 -4604 288 -4605 16 -4606 112 -4607 96 -4608 192 -4609 32 -4610 144 -4611 48 -4612 8 -4613 16 -4614 16 -4615 16 -4616 32 -4617 288 -4618 16 -4619 24 -4620 8 -4621 8 -4622 32 -4623 240 -4624 32 -4625 5040 -4626 1024 -4627 16 -4628 128 -4629 32 -4630 32 -4631 960 -4632 32 -4633 64 -4634 1560 -4635 480 -4636 432 -4637 384 -4638 48 -4639 1152 -4640 32 -4641 128 -4642 64 -4643 96 -4644 192 -4645 96 -4646 96 -4647 24 -4648 16 -4649 512 -4650 192 -4651 64 -4652 64 -4653 5376 -4654 1152 -4655 96 -4656 32 -4657 256 -4658 16 -4659 1440 -4660 128 -4661 32 -4662 8 -4663 8 -4664 48 -4665 96 -4666 8 -4667 24 -4668 24 -4669 8 -4670 5632 -4671 4320 -4672 3200 -4673 2400 -4674 512 -4675 4576 -4676 1280 -4677 16 -4678 8 -4679 96 -4680 32 -4681 3200 -4682 5120 -4683 32 -4684 8 -4685 8 -4686 6272 -4687 96 -4688 3520 -4689 16 -4690 16 -4691 176 -4692 176 -4693 128 -4694 2304 -4695 96 -4696 144 -4697 8 -4698 9600 -4699 6160 -4700 320 -4701 8 -4702 96 -4703 1600 -4704 3072 -4705 15488 -4706 8 -4707 8 -4708 16 -4709 3840 -4710 2464 -4711 192 -4712 16 -4713 32 -4714 216 -4715 16 -4716 16 -4717 8 -4718 96 -4719 16 -4720 32 -4721 48 -4722 672 -4723 8 -4724 288 -4725 8960 -4726 48 -4727 1760 -4728 48 -4729 13440 -4730 640 -4731 720 -4732 384 -4733 16 -4734 8 -4735 4992 -4736 2880 -4737 1280 -4738 64 -4739 32 -4740 1728 -4741 256 -4742 64 -4743 32 -4744 48 -4745 216 -4746 32 -4747 80 -4748 64 -4749 384 -4750 4608 -4751 4608 -4752 4608 -4753 4160 -4754 16 -4755 24 -4756 48 -4757 512 -4758 8 -4759 8320 -4760 1872 -4761 9600 -4762 5600 -4763 12480 -4764 144 -4765 8 -4766 640 -4767 192 -4768 32 -4769 8 -4770 32 -4771 8 -4772 96 -4773 4032 -4774 256 -4775 4224 -4776 4480 -4777 144 -4778 32 -4779 2560 -4780 16 -4781 32 -4782 32 -4783 16 -4784 4608 -4785 4224 -4786 3584 -4787 6720 -4788 96 -4789 48 -4790 8 -4791 3520 -4792 23296 -4793 2464 -4794 120 -4795 4320 -4796 48 -4797 5040 -4798 24 -4799 96 -4800 256 -4801 128 -4802 800 -4803 96 -4804 48 -4805 32 -4806 7056 -4807 32 -4808 144 -4809 8 -4810 4032 -4811 512 -4812 128 -4813 8 -4814 504 -4815 8 -4816 32 -4817 64 -4818 1120 -4819 1536 -4820 192 -4821 768 -4822 320 -4823 256 -4824 192 -4825 960 -4826 256 -4827 16 -4828 1056 -4829 192 -4830 1344 -4831 1280 -4832 320 -4833 1400 -4834 32 -4835 64 -4836 3840 -4837 8 -4838 128 -4839 64 -4840 160 -4841 8 -4842 64 -4843 32 -4844 288 -4845 48 -4846 240 -4847 720 -4848 16 -4849 352 -4850 768 -4851 32 -4852 8 -4853 144 -4854 8 -4855 24 -4856 48 -4857 32 -4858 96 -4859 64 -4860 192 -4861 24 -4862 16 -4863 224 -4864 72 -4865 3840 -4866 192 -4867 8 -4868 4800 -4869 8640 -4870 8 -4871 16 -4872 16 -4873 5616 -4874 2640 -4875 800 -4876 576 -4877 16 -4878 64 -4879 2048 -4880 8 -4881 16 -4882 1152 -4883 960 -4884 48 -4885 8 -4886 16 -4887 128 -4888 128 -4889 16 -4890 96 -4891 128 -4892 128 -4893 384 -4894 32 -4895 8 -4896 32 -4897 2112 -4898 640 -4899 384 -4900 32 -4901 16 -4902 8 -4903 16 -4904 32 -4905 48 -4906 32 -4907 3584 -4908 9408 -4909 1568 -4910 8 -4911 16 -4912 8 -4913 960 -4914 32 -4915 32 -4916 1728 -4917 48 -4918 4608 -4919 5120 -4920 1280 -4921 2560 -4922 16 -4923 1872 -4924 8640 -4925 1344 -4926 32 -4927 192 -4928 48 -4929 48 -4930 32 -4931 32 -4932 2304 -4933 16 -4934 32 -4935 576 -4936 9856 -4937 8 -4938 40 -4939 96 -4940 3360 -4941 32 -4942 16 -4943 32 -4944 32 -4945 32 -4946 32 -4947 72 -4948 48 -4949 32 -4950 1536 -4951 88 -4952 32 -4953 8 -4954 5280 -4955 3168 -4956 384 -4957 128 -4958 32 -4959 192 -4960 144 -4961 24 -4962 240 -4963 32 -4964 16 -4965 64 -4966 128 -4967 32 -4968 2520 -4969 96 -4970 1792 -4971 32 -4972 32 -4973 64 -4974 32 -4975 800 -4976 16 -4977 96 -4978 288 -4979 192 -4980 64 -4981 32 -4982 256 -4983 8 -4984 16 -4985 48 -4986 144 -4987 16 -4988 8 -4989 8 -4990 1440 -4991 216 -4992 8 -4993 576 -4994 24 -4995 16 -4996 288 -4997 16 -4998 8 -4999 288 -5000 32 -5001 480 -5002 32 -5003 32 -5004 16 -5005 16 -5006 16 -5007 8 -5008 48 -5009 32 -5010 72 -5011 32 -5012 16 -5013 16 -5014 32 -5015 32 -5016 32 -5017 16 -5018 32 -5019 32 -5020 32 -5021 48 -5022 16 -5023 9984 -5024 8 -5025 1120 -5026 384 -5027 192 -5028 32 -5029 720 -5030 400 -5031 768 -5032 384 -5033 40 -5034 192 -5035 16 -5036 48 -5037 64 -5038 64 -5039 2048 -5040 144 -5041 8 -5042 8 -5043 8 -5044 7488 -5045 8 -5046 96 -5047 8 -5048 1400 -5049 32 -5050 288 -5051 32 -5052 8 -5053 8 -5054 4608 -5055 8 -5056 32 -5057 96 -5058 480 -5059 1440 -5060 288 -5061 8 -5062 32 -5063 8 -5064 64 -5065 8 -5066 384 -5067 720 -5068 1728 -5069 1584 -5070 9408 -5071 3840 -5072 1728 -5073 24 -5074 128 -5075 128 -5076 640 -5077 3456 -5078 24 -5079 384 -5080 32 -5081 960 -5082 288 -5083 16 -5084 1320 -5085 840 -5086 64 -5087 32 -5088 64 -5089 32 -5090 16 -5091 48 -5092 48 -5093 8 -5094 96 -5095 32 -5096 17280 -5097 5120 -5098 10368 -5099 144 -5100 64 -5101 800 -5102 768 -5103 768 -5104 48 -5105 768 -5106 128 -5107 2880 -5108 1680 -5109 48 -5110 640 -5111 1152 -5112 4032 -5113 2304 -5114 2904 -5115 2016 -5116 12960 -5117 6048 -5118 1296 -5119 1344 -5120 9856 -5121 11880 -5122 5280 -5123 72 -5124 48 -5125 24 -5126 336 -5127 64 -5128 32 -5129 1152 -5130 8 -5131 32 -5132 7168 -5133 112 -5134 16 -5135 256 -5136 32 -5137 672 -5138 48 -5139 672 -5140 48 -5141 256 -5142 32 -5143 144 -5144 8 -5145 8 -5146 32 -5147 16 -5148 8 -5149 48 -5150 8 -5151 32 -5152 32 -5153 16 -5154 16 -5155 32 -5156 48 -5157 32 -5158 16 -5159 32 -5160 16 -5161 64 -5162 32 -5163 48 -5164 16 -5165 32 -5166 48 -5167 32 -5168 6144 -5169 576 -5170 640 -5171 24 -5172 640 -5173 72 -5174 5632 -5175 3456 -5176 5040 -5177 128 -5178 3696 -5179 4320 -5180 48 -5181 384 -5182 64 -5183 192 -5184 840 -5185 240 -5186 32 -5187 1960 -5188 24 -5189 48 -5190 64 -5191 96 -5192 48 -5193 32 -5194 16 -5195 48 -5196 64 -5197 6160 -5198 144 -5199 32 -5200 32 -5201 32 -5202 128 -5203 768 -5204 96 -5205 32 -5206 32 -5207 32 -5208 64 -5209 128 -5210 16 -5211 48 -5212 16 -5213 64 -5214 96 -5215 32 -5216 16 -5217 48 -5218 48 -5219 64 -5220 48 -5221 32 -5222 96 -5223 240 -5224 16 -5225 64 -5226 3840 -5227 768 -5228 96 -5229 32 -5230 8 -5231 96 -5232 8 -5233 8 -5234 72 -5235 32 -5236 192 -5237 4800 -5238 240 -5239 72 -5240 8 -5241 32 -5242 16 -5243 40 -5244 16 -5245 16 -5246 80 -5247 96 -5248 8 -5249 64 -5250 320 -5251 8 -5252 96 -5253 128 -5254 160 -5255 1600 -5256 80 -5257 96 -5258 48 -5259 384 -5260 5040 -5261 8736 -5262 1080 -5263 32 -5264 7920 -5265 4608 -5266 72 -5267 32 -5268 120 -5269 8 -5270 8 -5271 64 -5272 32 -5273 288 -5274 80 -5275 24 -5276 32 -5277 32 -5278 48 -5279 16 -5280 32 -5281 32 -5282 96 -5283 64 -5284 96 -5285 16 -5286 96 -5287 64 -5288 32 -5289 96 -5290 32 -5291 48 -5292 48 -5293 8 -5294 8 -5295 64 -5296 128 -5297 48 -5298 8 -5299 8 -5300 480 -5301 8 -5302 64 -5303 96 -5304 32 -5305 256 -5306 48 -5307 8 -5308 5760 -5309 48 -5310 32 -5311 128 -5312 2160 -5313 16 -5314 144 -5315 64 -5316 224 -5317 896 -5318 160 -5319 2560 -5320 64 -5321 320 -5322 96 -5323 288 -5324 24 -5325 640 -5326 480 -5327 32 -5328 16 -5329 1152 -5330 144 -5331 192 -5332 120 -5333 576 -5334 480 -5335 2400 -5336 128 -5337 480 -5338 1408 -5339 512 -5340 576 -5341 8 -5342 16 -5343 24 -5344 48 -5345 192 -5346 32 -5347 32 -5348 16 -5349 32 -5350 6336 -5351 160 -5352 32 -5353 72 -5354 192 -5355 96 -5356 720 -5357 504 -5358 32 -5359 32 -5360 32 -5361 48 -5362 32 -5363 720 -5364 1800 -5365 1200 -5366 216 -5367 32 -5368 7128 -5369 96 -5370 72 -5371 320 -5372 72 -5373 64 -5374 32 -5375 32 -5376 320 -5377 24 -5378 480 -5379 192 -5380 192 -5381 1120 -5382 16 -5383 64 -5384 16 -5385 48 -5386 16 -5387 120 -5388 32 -5389 16 -5390 192 -5391 192 -5392 128 -5393 2592 -5394 64 -5395 2880 -5396 400 -5397 504 -5398 32 -5399 448 -5400 240 -5401 72 -5402 64 -5403 672 -5404 3744 -5405 40 -5406 72 -5407 864 -5408 256 -5409 16 -5410 896 -5411 32 -5412 32 -5413 672 -5414 16 -5415 384 -5416 32 -5417 640 -5418 48 -5419 32 -5420 128 -5421 32 -5422 528 -5423 16 -5424 48 -5425 8 -5426 48 -5427 192 -5428 32 -5429 32 -5430 192 -5431 16 -5432 8 -5433 7200 -5434 768 -5435 144 -5436 8 -5437 96 -5438 3360 -5439 2400 -5440 32 -5441 2520 -5442 8 -5443 32 -5444 32 -5445 8 -5446 8 -5447 32 -5448 8 -5449 8 -5450 16 -5451 8 -5452 8 -5453 8 -5454 216 -5455 16 -5456 8 -5457 64 -5458 640 -5459 32 -5460 8 -5461 32 -5462 56 -5463 32 -5464 768 -5465 8 -5466 216 -5467 32 -5468 504 -5469 8 -5470 32 -5471 8 -5472 8 -5473 8 -5474 2048 -5475 2816 -5476 8 -5477 1280 -5478 8 -5479 48 -5480 72 -5481 112 -5482 144 -5483 8 -5484 192 -5485 32 -5486 1664 -5487 8 -5488 192 -5489 16 -5490 56 -5491 32 -5492 128 -5493 16 -5494 32 -5495 32 -5496 32 -5497 128 -5498 192 -5499 32 -5500 8 -5501 32 -5502 32 -5503 8 -5504 144 -5505 32 -5506 48 -5507 8 -5508 128 -5509 32 -5510 24 -5511 2560 -5512 256 -5513 360 -5514 576 -5515 216 -5516 96 -5517 576 -5518 128 -5519 144 -5520 4992 -5521 32 -5522 32 -5523 16 -5524 2880 -5525 576 -5526 240 -5527 32 -5528 288 -5529 144 -5530 32 -5531 32 -5532 8 -5533 2688 -5534 16 -5535 32 -5536 144 -5537 32 -5538 192 -5539 48 -5540 48 -5541 32 -5542 48 -5543 128 -5544 192 -5545 16 -5546 64 -5547 8 -5548 128 -5549 64 -5550 8 -5551 32 -5552 1536 -5553 256 -5554 16 -5555 8 -5556 32 -5557 64 -5558 8 -5559 64 -5560 128 -5561 64 -5562 128 -5563 96 -5564 48 -5565 96 -5566 32 -5567 48 -5568 96 -5569 256 -5570 3840 -5571 64 -5572 32 -5573 1200 -5574 240 -5575 32 -5576 32 -5577 8 -5578 72 -5579 64 -5580 512 -5581 16 -5582 96 -5583 1280 -5584 8 -5585 32 -5586 128 -5587 32 -5588 96 -5589 896 -5590 16 -5591 800 -5592 5760 -5593 1344 -5594 576 -5595 24 -5596 1008 -5597 32 -5598 2520 -5599 16 -5600 32 -5601 16 -5602 8 -5603 2016 -5604 1120 -5605 32 -5606 128 -5607 64 -5608 1280 -5609 120 -5610 72 -5611 8 -5612 8 -5613 24 -5614 64 -5615 32 -5616 480 -5617 288 -5618 8 -5619 768 -5620 256 -5621 480 -5622 8 -5623 11880 -5624 8 -5625 16 -5626 128 -5627 32 -5628 64 -5629 8 -5630 32 -5631 2816 -5632 576 -5633 480 -5634 8 -5635 672 -5636 72 -5637 32 -5638 32 -5639 32 -5640 96 -5641 16 -5642 2016 -5643 128 -5644 256 -5645 16 -5646 384 -5647 16 -5648 96 -5649 16 -5650 32 -5651 96 -5652 16 -5653 16 -5654 11648 -5655 64 -5656 288 -5657 288 -5658 16 -5659 96 -5660 144 -5661 1280 -5662 192 -5663 1728 -5664 16 -5665 16 -5666 192 -5667 72 -5668 600 -5669 72 -5670 16 -5671 144 -5672 32 -5673 64 -5674 720 -5675 960 -5676 3920 -5677 192 -5678 32 -5679 600 -5680 16 -5681 16 -5682 1536 -5683 320 -5684 32 -5685 144 -5686 320 -5687 32 -5688 2352 -5689 48 -5690 16 -5691 144 -5692 1728 -5693 4608 -5694 8 -5695 32 -5696 24 -5697 8 -5698 16 -5699 64 -5700 16 -5701 32 -5702 8 -5703 32 -5704 480 -5705 48 -5706 32 -5707 32 -5708 16 -5709 144 -5710 32 -5711 32 -5712 96 -5713 32 -5714 16 -5715 16 -5716 128 -5717 8 -5718 192 -5719 8 -5720 64 -5721 2304 -5722 320 -5723 96 -5724 32 -5725 144 -5726 128 -5727 32 -5728 64 -5729 192 -5730 1512 -5731 80 -5732 144 -5733 32 -5734 192 -5735 16 -5736 4480 -5737 5376 -5738 3360 -5739 5376 -5740 16 -5741 216 -5742 96 -5743 64 -5744 8 -5745 2016 -5746 72 -5747 16 -5748 8 -5749 192 -5750 32 -5751 8 -5752 384 -5753 96 -5754 128 -5755 8 -5756 32 -5757 432 -5758 24 -5759 32 -5760 512 -5761 240 -5762 1152 -5763 16 -5764 576 -5765 288 -5766 8 -5767 64 -5768 3200 -5769 4096 -5770 4320 -5771 2304 -5772 144 -5773 32 -5774 7168 -5775 96 -5776 32 -5777 5120 -5778 480 -5779 16 -5780 144 -5781 16 -5782 360 -5783 8 -5784 64 -5785 8 -5786 17920 -5787 48 -5788 48 -5789 8 -5790 640 -5791 8 -5792 96 -5793 32 -5794 40 -5795 3584 -5796 48 -5797 512 -5798 7680 -5799 1280 -5800 768 -5801 9600 -5802 48 -5803 8 -5804 8 -5805 600 -5806 32 -5807 216 -5808 192 -5809 72 -5810 48 -5811 16 -5812 320 -5813 16 -5814 400 -5815 1760 -5816 16 -5817 48 -5818 24 -5819 48 -5820 96 -5821 48 -5822 1280 -5823 16 -5824 32 -5825 288 -5826 864 -5827 16 -5828 96 -5829 64 -5830 3840 -5831 1600 -5832 640 -5833 144 -5834 384 -5835 1344 -5836 32 -5837 360 -5838 16 -5839 192 -5840 48 -5841 32 -5842 96 -5843 8 -5844 1120 -5845 480 -5846 8 -5847 32 -5848 96 -5849 32 -5850 8 -5851 24 -5852 64 -5853 16 -5854 64 -5855 8 -5856 32 -5857 48 -5858 64 -5859 32 -5860 384 -5861 32 -5862 48 -5863 64 -5864 400 -5865 16 -5866 360 -5867 48 -5868 32 -5869 12800 -5870 7200 -5871 16 -5872 144 -5873 192 -5874 384 -5875 16 -5876 384 -5877 32 -5878 2304 -5879 1920 -5880 32 -5881 32 -5882 64 -5883 480 -5884 144 -5885 16 -5886 32 -5887 576 -5888 8 -5889 32 -5890 192 -5891 48 -5892 32 -5893 16 -5894 3840 -5895 144 -5896 64 -5897 10560 -5898 6656 -5899 1560 -5900 16 -5901 32 -5902 8 -5903 32 -5904 8 -5905 864 -5906 8 -5907 8 -5908 800 -5909 384 -5910 32 -5911 32 -5912 320 -5913 384 -5914 32 -5915 32 -5916 32 -5917 480 -5918 624 -5919 3328 -5920 8 -5921 48 -5922 48 -5923 1536 -5924 4608 -5925 8 -5926 8 -5927 256 -5928 32 -5929 1280 -5930 32 -5931 20384 -5932 512 -5933 360 -5934 32 -5935 1280 -5936 2048 -5937 256 -5938 2496 -5939 8 -5940 64 -5941 32 -5942 24 -5943 16 -5944 32 -5945 3456 -5946 2304 -5947 24 -5948 384 -5949 8 -5950 1536 -5951 144 -5952 512 -5953 8 -5954 64 -5955 80 -5956 32 -5957 32 -5958 72 -5959 48 -5960 64 -5961 24 -5962 48 -5963 32 -5964 32 -5965 32 -5966 32 -5967 8 -5968 480 -5969 576 -5970 192 -5971 16 -5972 32 -5973 16 -5974 32 -5975 32 -5976 16 -5977 1120 -5978 24 -5979 32 -5980 64 -5981 72 -5982 32 -5983 1280 -5984 1920 -5985 32 -5986 320 -5987 720 -5988 64 -5989 32 -5990 64 -5991 64 -5992 32 -5993 64 -5994 48 -5995 192 -5996 64 -5997 64 -5998 32 -5999 128 -6000 560 -6001 16 -6002 8 -6003 8 -6004 96 -6005 768 -6006 8 -6007 480 -6008 32 -6009 72 -6010 32 -6011 48 -6012 32 -6013 64 -6014 1920 -6015 144 -6016 48 -6017 64 -6018 64 -6019 48 -6020 16 -6021 32 -6022 16 -6023 128 -6024 64 -6025 8 -6026 16 -6027 320 -6028 160 -6029 8 -6030 360 -6031 216 -6032 192 -6033 32 -6034 128 -6035 64 -6036 1024 -6037 64 -6038 2304 -6039 16 -6040 160 -6041 32 -6042 32 -6043 1800 -6044 32 -6045 144 -6046 1408 -6047 14080 -6048 1560 -6049 32 -6050 240 -6051 256 -6052 768 -6053 64 -6054 4992 -6055 2400 -6056 2400 -6057 7168 -6058 448 -6059 160 -6060 8 -6061 16 -6062 16 -6063 64 -6064 3520 -6065 720 -6066 128 -6067 64 -6068 24 -6069 32 -6070 384 -6071 64 -6072 192 -6073 32 -6074 48 -6075 24 -6076 2464 -6077 8 -6078 16 -6079 512 -6080 16 -6081 48 -6082 32 -6083 48 -6084 384 -6085 32 -6086 768 -6087 256 -6088 24 -6089 8 -6090 32 -6091 16 -6092 8 -6093 64 -6094 8 -6095 16 -6096 216 -6097 128 -6098 8 -6099 32 -6100 840 -6101 216 -6102 96 -6103 96 -6104 240 -6105 32 -6106 32 -6107 16 -6108 16 -6109 64 -6110 192 -6111 8 -6112 4320 -6113 864 -6114 48 -6115 1344 -6116 32 -6117 1280 -6118 1920 -6119 5120 -6120 384 -6121 16 -6122 16 -6123 16 -6124 16 -6125 48 -6126 16 -6127 288 -6128 32 -6129 32 -6130 32 -6131 16 -6132 32 -6133 8 -6134 80 -6135 32 -6136 672 -6137 32 -6138 96 -6139 16 -6140 144 -6141 16 -6142 384 -6143 96 -6144 384 -6145 256 -6146 6336 -6147 2400 -6148 480 -6149 192 -6150 8 -6151 192 -6152 32 -6153 64 -6154 16 -6155 24 -6156 32 -6157 128 -6158 1664 -6159 64 -6160 32 -6161 16 -6162 64 -6163 3640 -6164 16 -6165 8 -6166 512 -6167 32 -6168 32 -6169 80 -6170 64 -6171 32 -6172 32 -6173 16 -6174 32 -6175 48 -6176 1152 -6177 96 -6178 96 -6179 72 -6180 96 -6181 192 -6182 8 -6183 384 -6184 480 -6185 8 -6186 64 -6187 2400 -6188 128 -6189 32 -6190 32 -6191 16 -6192 8 -6193 32 -6194 144 -6195 192 -6196 32 -6197 96 -6198 96 -6199 32 -6200 144 -6201 4752 -6202 8 -6203 24 -6204 32 -6205 64 -6206 32 -6207 16 -6208 32 -6209 64 -6210 32 -6211 384 -6212 192 -6213 64 -6214 64 -6215 32 -6216 192 -6217 48 -6218 48 -6219 32 -6220 16 -6221 16 -6222 16 -6223 8320 -6224 2560 -6225 48 -6226 128 -6227 480 -6228 32 -6229 64 -6230 72 -6231 16 -6232 384 -6233 32 -6234 72 -6235 48 -6236 32 -6237 32 -6238 384 -6239 128 -6240 288 -6241 96 -6242 8 -6243 32 -6244 32 -6245 32 -6246 864 -6247 32 -6248 48 -6249 48 -6250 384 -6251 32 -6252 8 -6253 32 -6254 1000 -6255 32 -6256 32 -6257 32 -6258 8 -6259 64 -6260 32 -6261 128 -6262 32 -6263 48 -6264 576 -6265 8 -6266 64 -6267 32 -6268 16 -6269 32 -6270 64 -6271 192 -6272 32 -6273 160 -6274 64 -6275 1008 -6276 240 -6277 576 -6278 32 -6279 96 -6280 432 -6281 8 -6282 48 -6283 16 -6284 16 -6285 32 -6286 144 -6287 32 -6288 32 -6289 8 -6290 32 -6291 24 -6292 8 -6293 32 -6294 896 -6295 32 -6296 960 -6297 8 -6298 1280 -6299 5376 -6300 1344 -6301 288 -6302 64 -6303 7488 -6304 8 -6305 1200 -6306 384 -6307 8 -6308 16 -6309 10296 -6310 72 -6311 4752 -6312 960 -6313 1872 -6314 9504 -6315 192 -6316 16 -6317 12096 -6318 1200 -6319 1920 -6320 1296 -6321 1920 -6322 1200 -6323 768 -6324 9504 -6325 4752 -6326 336 -6327 288 -6328 2688 -6329 128 -6330 8 -6331 16 -6332 128 -6333 16 -6334 384 -6335 64 -6336 512 -6337 48 -6338 64 -6339 16 -6340 448 -6341 432 -6342 80 -6343 32 -6344 16 -6345 192 -6346 8 -6347 168 -6348 32 -6349 24 -6350 32 -6351 288 -6352 16 -6353 16 -6354 512 -6355 8 -6356 64 -6357 8 -6358 32 -6359 32 -6360 32 -6361 32 -6362 32 -6363 32 -6364 32 -6365 96 -6366 6912 -6367 24 -6368 600 -6369 16 -6370 1008 -6371 192 -6372 16 -6373 32 -6374 8 -6375 8 -6376 2688 -6377 5096 -6378 8 -6379 96 -6380 32 -6381 24 -6382 32 -6383 32 -6384 32 -6385 144 -6386 16 -6387 8 -6388 96 -6389 32 -6390 16 -6391 160 -6392 96 -6393 24 -6394 32 -6395 864 -6396 768 -6397 160 -6398 240 -6399 96 -6400 192 -6401 32 -6402 144 -6403 288 -6404 64 -6405 144 -6406 64 -6407 48 -6408 80 -6409 32 -6410 3456 -6411 96 -6412 80 -6413 384 -6414 32 -6415 256 -6416 16 -6417 24 -6418 80 -6419 96 -6420 32 -6421 5760 -6422 5040 -6423 2800 -6424 3360 -6425 800 -6426 72 -6427 80 -6428 64 -6429 144 -6430 24 -6431 800 -6432 8 -6433 320 -6434 8 -6435 384 -6436 96 -6437 32 -6438 16 -6439 96 -6440 96 -6441 16 -6442 32 -6443 64 -6444 288 -6445 16 -6446 64 -6447 8 -6448 8 -6449 32 -6450 8 -6451 16 -6452 384 -6453 128 -6454 192 -6455 96 -6456 64 -6457 768 -6458 8 -6459 96 -6460 2016 -6461 168 -6462 192 -6463 64 -6464 8 -6465 8 -6466 168 -6467 96 -6468 64 -6469 432 -6470 160 -6471 32 -6472 48 -6473 96 -6474 48 -6475 192 -6476 72 -6477 384 -6478 160 -6479 400 -6480 192 -6481 96 -6482 144 -6483 192 -6484 1120 -6485 64 -6486 96 -6487 16 -6488 16 -6489 16 -6490 640 -6491 48 -6492 128 -6493 16 -6494 672 -6495 128 -6496 48 -6497 16 -6498 32 -6499 80 -6500 320 -6501 320 -6502 256 -6503 600 -6504 128 -6505 320 -6506 32 -6507 192 -6508 32 -6509 1584 -6510 384 -6511 96 -6512 96 -6513 144 -6514 16 -6515 32 -6516 32 -6517 16 -6518 32 -6519 64 -6520 192 -6521 64 -6522 96 -6523 336 -6524 144 -6525 144 -6526 72 -6527 128 -6528 48 -6529 16 -6530 64 -6531 16 -6532 64 -6533 216 -6534 256 -6535 64 -6536 48 -6537 16 -6538 1680 -6539 576 -6540 960 -6541 576 -6542 32 -6543 192 -6544 120 -6545 600 -6546 8 -6547 8 -6548 576 -6549 32 -6550 96 -6551 8 -6552 32 -6553 640 -6554 96 -6555 48 -6556 96 -6557 240 -6558 16 -6559 24 -6560 256 -6561 64 -6562 288 -6563 32 -6564 32 -6565 32 -6566 176 -6567 32 -6568 16 -6569 224 -6570 32 -6571 48 -6572 48 -6573 32 -6574 48 -6575 640 -6576 64 -6577 16 -6578 8 -6579 8 -6580 48 -6581 288 -6582 32 -6583 48 -6584 672 -6585 16 -6586 64 -6587 16 -6588 600 -6589 72 -6590 192 -6591 96 -6592 32 -6593 8 -6594 144 -6595 8 -6596 64 -6597 8 -6598 96 -6599 64 -6600 48 -6601 192 -6602 64 -6603 96 -6604 192 -6605 256 -6606 32 -6607 432 -6608 8 -6609 96 -6610 224 -6611 16 -6612 32 -6613 32 -6614 1760 -6615 1792 -6616 2048 -6617 2048 -6618 128 -6619 32 -6620 1408 -6621 896 -6622 16 -6623 32 -6624 24 -6625 8 -6626 624 -6627 64 -6628 160 -6629 168 -6630 8 -6631 32 -6632 8 -6633 96 -6634 224 -6635 8 -6636 96 -6637 8 -6638 64 -6639 16 -6640 32 -6641 32 -6642 48 -6643 8 -6644 16 -6645 160 -6646 448 -6647 48 -6648 160 -6649 64 -6650 64 -6651 288 -6652 32 -6653 48 -6654 32 -6655 48 -6656 48 -6657 32 -6658 96 -6659 32 -6660 320 -6661 3456 -6662 144 -6663 32 -6664 144 -6665 16 -6666 48 -6667 24 -6668 32 -6669 32 -6670 96 -6671 96 -6672 144 -6673 32 -6674 32 -6675 64 -6676 32 -6677 32 -6678 32 -6679 32 -6680 32 -6681 64 -6682 32 -6683 64 -6684 32 -6685 32 -6686 32 -6687 16 -6688 48 -6689 24 -6690 64 -6691 32 -6692 480 -6693 8 -6694 8 -6695 768 -6696 96 -6697 16 -6698 64 -6699 256 -6700 16 -6701 32 -6702 64 -6703 32 -6704 384 -6705 8 -6706 8 -6707 24 -6708 32 -6709 32 -6710 48 -6711 32 -6712 16 -6713 32 -6714 32 -6715 48 -6716 48 -6717 672 -6718 288 -6719 32 -6720 24 -6721 24 -6722 32 -6723 32 -6724 16 -6725 16 -6726 32 -6727 16 -6728 144 -6729 96 -6730 576 -6731 16 -6732 96 -6733 4224 -6734 1280 -6735 32 -6736 8 -6737 16 -6738 32 -6739 48 -6740 8 -6741 128 -6742 32 -6743 8 -6744 96 -6745 48 -6746 16 -6747 192 -6748 448 -6749 32 -6750 256 -6751 2688 -6752 216 -6753 144 -6754 160 -6755 504 -6756 8 -6757 8 -6758 64 -6759 64 -6760 320 -6761 24 -6762 32 -6763 48 -6764 48 -6765 896 -6766 80 -6767 8 -6768 64 -6769 768 -6770 1792 -6771 2816 -6772 96 -6773 128 -6774 32 -6775 128 -6776 64 -6777 5040 -6778 96 -6779 1152 -6780 192 -6781 32 -6782 288 -6783 64 -6784 16 -6785 432 -6786 16 -6787 24 -6788 48 -6789 24 -6790 32 -6791 1792 -6792 1920 -6793 240 -6794 8 -6795 1280 -6796 640 -6797 144 -6798 64 -6799 32 -6800 192 -6801 64 -6802 32 -6803 216 -6804 16 -6805 96 -6806 32 -6807 24 -6808 16 -6809 48 -6810 384 -6811 48 -6812 8 -6813 32 -6814 16 -6815 32 -6816 32 -6817 32 -6818 96 -6819 8 -6820 9152 -6821 8 -6822 128 -6823 32 -6824 8 -6825 10080 -6826 16 -6827 240 -6828 32 -6829 16 -6830 8 -6831 8 -6832 48 -6833 48 -6834 144 -6835 80 -6836 32 -6837 96 -6838 32 -6839 32 -6840 32 -6841 16 -6842 32 -6843 96 -6844 16 -6845 3200 -6846 960 -6847 8 -6848 8 -6849 16 -6850 32 -6851 16 -6852 16 -6853 1152 -6854 8 -6855 2240 -6856 32 -6857 1760 -6858 32 -6859 96 -6860 10752 -6861 8 -6862 48 -6863 8 -6864 512 -6865 8 -6866 32 -6867 8 -6868 64 -6869 64 -6870 48 -6871 96 -6872 480 -6873 64 -6874 32 -6875 32 -6876 48 -6877 16 -6878 16 -6879 16 -6880 16 -6881 16 -6882 16 -6883 8 -6884 32 -6885 216 -6886 32 -6887 72 -6888 96 -6889 8 -6890 32 -6891 16 -6892 8 -6893 8 -6894 16 -6895 128 -6896 480 -6897 1440 -6898 264 -6899 8 -6900 64 -6901 48 -6902 32 -6903 936 -6904 288 -6905 32 -6906 8 -6907 384 -6908 48 -6909 32 -6910 32 -6911 96 -6912 32 -6913 16 -6914 8 -6915 256 -6916 8 -6917 48 -6918 32 -6919 792 -6920 32 -6921 8 -6922 64 -6923 48 -6924 64 -6925 4320 -6926 1600 -6927 8 -6928 640 -6929 16 -6930 216 -6931 16 -6932 32 -6933 16 -6934 192 -6935 144 -6936 16 -6937 16 -6938 64 -6939 64 -6940 720 -6941 16 -6942 288 -6943 8960 -6944 96 -6945 16 -6946 360 -6947 8 -6948 8 -6949 7680 -6950 32 -6951 1920 -6952 1280 -6953 32 -6954 1568 -6955 32 -6956 128 -6957 16 -6958 64 -6959 32 -6960 8 -6961 3072 -6962 8 -6963 8 -6964 192 -6965 32 -6966 8 -6967 48 -6968 1120 -6969 9600 -6970 288 -6971 8 -6972 96 -6973 2048 -6974 4224 -6975 1920 -6976 8 -6977 192 -6978 8 -6979 8 -6980 4160 -6981 32 -6982 8 -6983 8 -6984 8 -6985 8 -6986 2240 -6987 8 -6988 8 -6989 48 -6990 3888 -6991 8 -6992 32 -6993 8 -6994 64 -6995 112 -6996 6912 -6997 4608 -6998 4224 -6999 384 -7000 32 -7001 32 -7002 16 -7003 7392 -7004 240 -7005 8 -7006 144 -7007 5616 -7008 512 -7009 576 -7010 24 -7011 16 -7012 7744 -7013 32 -7014 16 -7015 96 -7016 3200 -7017 32 -7018 1440 -7019 8 -7020 96 -7021 64 -7022 48 -7023 2304 -7024 144 -7025 48 -7026 72 -7027 48 -7028 64 -7029 240 -7030 8 -7031 16 -7032 16 -7033 32 -7034 192 -7035 16 -7036 32 -7037 32 -7038 8 -7039 128 -7040 48 -7041 480 -7042 16 -7043 24 -7044 192 -7045 32 -7046 12800 -7047 8 -7048 1024 -7049 1056 -7050 1056 -7051 3600 -7052 3960 -7053 360 -7054 8 -7055 64 -7056 32 -7057 8 -7058 16 -7059 2352 -7060 360 -7061 192 -7062 8 -7063 128 -7064 32 -7065 384 -7066 16 -7067 64 -7068 8 -7069 576 -7070 32 -7071 32 -7072 24 -7073 32 -7074 64 -7075 32 -7076 32 -7077 16 -7078 32 -7079 32 -7080 48 -7081 96 -7082 32 -7083 16 -7084 32 -7085 16 -7086 16 -7087 32 -7088 32 -7089 64 -7090 144 -7091 256 -7092 8 -7093 5760 -7094 32 -7095 48 -7096 8 -7097 16 -7098 216 -7099 64 -7100 32 -7101 16 -7102 416 -7103 1440 -7104 2304 -7105 8 -7106 32 -7107 1120 -7108 32 -7109 6144 -7110 864 -7111 512 -7112 16 -7113 128 -7114 32 -7115 360 -7116 512 -7117 8 -7118 128 -7119 32 -7120 32 -7121 3360 -7122 288 -7123 128 -7124 96 -7125 16 -7126 3200 -7127 5040 -7128 32 -7129 288 -7130 1920 -7131 32 -7132 8 -7133 864 -7134 192 -7135 16 -7136 384 -7137 40 -7138 288 -7139 640 -7140 48 -7141 96 -7142 64 -7143 1152 -7144 960 -7145 32 -7146 128 -7147 32 -7148 32 -7149 96 -7150 16 -7151 16 -7152 1920 -7153 2880 -7154 2880 -7155 640 -7156 16 -7157 416 -7158 1920 -7159 288 -7160 8 -7161 32 -7162 5824 -7163 16 -7164 64 -7165 672 -7166 192 -7167 32 -7168 64 -7169 576 -7170 1664 -7171 32 -7172 96 -7173 8 -7174 96 -7175 8 -7176 128 -7177 2592 -7178 32 -7179 48 -7180 16 -7181 576 -7182 144 -7183 16 -7184 14976 -7185 320 -7186 2080 -7187 8 -7188 576 -7189 48 -7190 4032 -7191 1120 -7192 800 -7193 16 -7194 1680 -7195 72 -7196 32 -7197 32 -7198 600 -7199 48 -7200 96 -7201 32 -7202 6720 -7203 8 -7204 96 -7205 64 -7206 1200 -7207 1248 -7208 1320 -7209 480 -7210 16 -7211 72 -7212 1920 -7213 32 -7214 24 -7215 384 -7216 96 -7217 16 -7218 2688 -7219 64 -7220 840 -7221 32 -7222 3200 -7223 640 -7224 32 -7225 32 -7226 32 -7227 16 -7228 16 -7229 64 -7230 32 -7231 32 -7232 48 -7233 120 -7234 48 -7235 32 -7236 24 -7237 32 -7238 16 -7239 16 -7240 16 -7241 32 -7242 48 -7243 48 -7244 64 -7245 16 -7246 192 -7247 16 -7248 48 -7249 512 -7250 16 -7251 64 -7252 16 -7253 128 -7254 16 -7255 16 -7256 32 -7257 64 -7258 320 -7259 288 -7260 64 -7261 192 -7262 144 -7263 32 -7264 48 -7265 32 -7266 32 -7267 16 -7268 72 -7269 32 -7270 64 -7271 32 -7272 32 -7273 48 -7274 64 -7275 32 -7276 32 -7277 32 -7278 32 -7279 48 -7280 16 -7281 192 -7282 240 -7283 288 -7284 32 -7285 32 -7286 144 -7287 32 -7288 32 -7289 8 -7290 32 -7291 16 -7292 32 -7293 32 -7294 48 -7295 64 -7296 720 -7297 16 -7298 8 -7299 32 -7300 64 -7301 32 -7302 256 -7303 16 -7304 16 -7305 16 -7306 32 -7307 1200 -7308 16 -7309 32 -7310 96 -7311 240 -7312 8 -7313 192 -7314 48 -7315 256 -7316 384 -7317 32 -7318 16 -7319 480 -7320 32 -7321 96 -7322 8 -7323 192 -7324 10752 -7325 1024 -7326 24 -7327 72 -7328 16 -7329 16 -7330 32 -7331 64 -7332 32 -7333 8 -7334 1280 -7335 320 -7336 1760 -7337 192 -7338 2400 -7339 384 -7340 16 -7341 720 -7342 64 -7343 16 -7344 16 -7345 1536 -7346 16 -7347 8 -7348 32 -7349 672 -7350 48 -7351 256 -7352 32 -7353 96 -7354 48 -7355 64 -7356 384 -7357 32 -7358 32 -7359 32 -7360 64 -7361 96 -7362 16 -7363 32 -7364 64 -7365 192 -7366 32 -7367 32 -7368 16 -7369 32 -7370 64 -7371 224 -7372 48 -7373 8 -7374 8 -7375 72 -7376 32 -7377 48 -7378 72 -7379 192 -7380 768 -7381 32 -7382 1728 -7383 4160 -7384 16 -7385 32 -7386 24 -7387 1024 -7388 32 -7389 8 -7390 8 -7391 48 -7392 16 -7393 32 -7394 144 -7395 32 -7396 32 -7397 32 -7398 16 -7399 64 -7400 64 -7401 2640 -7402 8 -7403 16 -7404 1280 -7405 8 -7406 8 -7407 32 -7408 16 -7409 32 -7410 32 -7411 88 -7412 48 -7413 64 -7414 480 -7415 256 -7416 32 -7417 32 -7418 800 -7419 32 -7420 256 -7421 8 -7422 512 -7423 216 -7424 16 -7425 16 -7426 16 -7427 32 -7428 16 -7429 48 -7430 96 -7431 32 -7432 600 -7433 192 -7434 32 -7435 96 -7436 48 -7437 48 -7438 16 -7439 32 -7440 320 -7441 32 -7442 64 -7443 2200 -7444 504 -7445 8 -7446 192 -7447 32 -7448 1760 -7449 1920 -7450 24 -7451 96 -7452 8 -7453 16 -7454 32 -7455 16 -7456 32 -7457 384 -7458 32 -7459 96 -7460 384 -7461 96 -7462 192 -7463 96 -7464 64 -7465 800 -7466 8 -7467 64 -7468 48 -7469 192 -7470 32 -7471 32 -7472 48 -7473 32 -7474 32 -7475 16 -7476 48 -7477 16 -7478 16 -7479 24 -7480 64 -7481 256 -7482 64 -7483 32 -7484 48 -7485 16 -7486 48 -7487 96 -7488 64 -7489 16 -7490 32 -7491 288 -7492 8 -7493 64 -7494 24 -7495 8 -7496 48 -7497 8 -7498 288 -7499 32 -7500 16 -7501 8 -7502 8 -7503 64 -7504 48 -7505 16 -7506 32 -7507 32 -7508 24 -7509 32 -7510 288 -7511 24 -7512 288 -7513 48 -7514 432 -7515 16 -7516 864 -7517 192 -7518 32 -7519 128 -7520 32 -7521 8 -7522 32 -7523 16 -7524 96 -7525 16 -7526 32 -7527 32 -7528 4800 -7529 480 -7530 48 -7531 10368 -7532 32 -7533 8 -7534 64 -7535 672 -7536 288 -7537 320 -7538 128 -7539 8 -7540 480 -7541 32 -7542 240 -7543 384 -7544 2304 -7545 336 -7546 704 -7547 24 -7548 480 -7549 16 -7550 8 -7551 648 -7552 360 -7553 32 -7554 32 -7555 9856 -7556 4576 -7557 96 -7558 448 -7559 16 -7560 9504 -7561 1728 -7562 160 -7563 504 -7564 1560 -7565 2304 -7566 1536 -7567 800 -7568 48 -7569 640 -7570 384 -7571 8 -7572 4320 -7573 1536 -7574 216 -7575 2160 -7576 32 -7577 16 -7578 1344 -7579 1584 -7580 768 -7581 720 -7582 432 -7583 1280 -7584 192 -7585 192 -7586 144 -7587 96 -7588 5280 -7589 16 -7590 8 -7591 48 -7592 96 -7593 8 -7594 480 -7595 640 -7596 8 -7597 8 -7598 1792 -7599 640 -7600 216 -7601 8 -7602 16 -7603 768 -7604 480 -7605 144 -7606 528 -7607 96 -7608 16 -7609 8 -7610 16 -7611 64 -7612 32 -7613 8 -7614 32 -7615 32 -7616 32 -7617 32 -7618 6912 -7619 24 -7620 48 -7621 64 -7622 32 -7623 16 -7624 384 -7625 120 -7626 32 -7627 32 -7628 192 -7629 16 -7630 32 -7631 48 -7632 8 -7633 96 -7634 128 -7635 16 -7636 144 -7637 96 -7638 288 -7639 64 -7640 1152 -7641 432 -7642 24 -7643 24 -7644 144 -7645 6912 -7646 32 -7647 64 -7648 32 -7649 24 -7650 32 -7651 896 -7652 672 -7653 64 -7654 240 -7655 1080 -7656 8 -7657 320 -7658 216 -7659 16 -7660 32 -7661 16 -7662 16 -7663 32 -7664 768 -7665 256 -7666 240 -7667 48 -7668 112 -7669 32 -7670 32 -7671 8 -7672 112 -7673 72 -7674 32 -7675 32 -7676 64 -7677 32 -7678 16 -7679 72 -7680 32 -7681 32 -7682 112 -7683 64 -7684 48 -7685 144 -7686 112 -7687 48 -7688 288 -7689 160 -7690 160 -7691 288 -7692 192 -7693 16 -7694 128 -7695 1120 -7696 480 -7697 32 -7698 16 -7699 480 -7700 768 -7701 64 -7702 32 -7703 192 -7704 32 -7705 96 -7706 64 -7707 192 -7708 288 -7709 288 -7710 256 -7711 32 -7712 288 -7713 32 -7714 64 -7715 64 -7716 168 -7717 72 -7718 32 -7719 720 -7720 288 -7721 72 -7722 72 -7723 32 -7724 32 -7725 8 -7726 8 -7727 16 -7728 72 -7729 144 -7730 48 -7731 48 -7732 16 -7733 64 -7734 48 -7735 24 -7736 16 -7737 32 -7738 72 -7739 48 -7740 64 -7741 32 -7742 16 -7743 240 -7744 48 -7745 192 -7746 96 -7747 64 -7748 32 -7749 8 -7750 64 -7751 64 -7752 64 -7753 8 -7754 288 -7755 8 -7756 216 -7757 32 -7758 24 -7759 8 -7760 768 -7761 384 -7762 72 -7763 32 -7764 32 -7765 96 -7766 8 -7767 32 -7768 8 -7769 432 -7770 32 -7771 128 -7772 32 -7773 32 -7774 8 -7775 192 -7776 8 -7777 16 -7778 32 -7779 96 -7780 120 -7781 8 -7782 48 -7783 192 -7784 16 -7785 96 -7786 768 -7787 48 -7788 128 -7789 32 -7790 32 -7791 192 -7792 32 -7793 8 -7794 16 -7795 32 -7796 8 -7797 8 -7798 16 -7799 16 -7800 128 -7801 8 -7802 48 -7803 16 -7804 16 -7805 32 -7806 96 -7807 32 -7808 384 -7809 16 -7810 480 -7811 8 -7812 288 -7813 8 -7814 216 -7815 80 -7816 40 -7817 32 -7818 160 -7819 192 -7820 32 -7821 64 -7822 8 -7823 32 -7824 32 -7825 8 -7826 8 -7827 32 -7828 48 -7829 256 -7830 320 -7831 128 -7832 32 -7833 16 -7834 72 -7835 32 -7836 64 -7837 16 -7838 32 -7839 32 -7840 24 -7841 16 -7842 32 -7843 32 -7844 16 -7845 32 -7846 64 -7847 32 -7848 8 -7849 48 -7850 32 -7851 48 -7852 16 -7853 8 -7854 528 -7855 96 -7856 16 -7857 192 -7858 16 -7859 16 -7860 32 -7861 32 -7862 48 -7863 48 -7864 8 -7865 8 -7866 8 -7867 32 -7868 32 -7869 576 -7870 32 -7871 32 -7872 24 -7873 144 -7874 160 -7875 256 -7876 96 -7877 16 -7878 64 -7879 16 -7880 16 -7881 32 -7882 8 -7883 32 -7884 8 -7885 32 -7886 16 -7887 32 -7888 32 -7889 128 -7890 32 -7891 32 -7892 32 -7893 32 -7894 8 -7895 16 -7896 8 -7897 32 -7898 16 -7899 32 -7900 3072 -7901 4032 -7902 32 -7903 48 -7904 144 -7905 24 -7906 48 -7907 320 -7908 8 -7909 192 -7910 96 -7911 16 -7912 128 -7913 16 -7914 32 -7915 32 -7916 48 -7917 16 -7918 32 -7919 96 -7920 64 -7921 32 -7922 16 -7923 384 -7924 128 -7925 16 -7926 32 -7927 64 -7928 160 -7929 80 -7930 288 -7931 24 -7932 32 -7933 16 -7934 32 -7935 16 -7936 32 -7937 128 -7938 2816 -7939 128 -7940 64 -7941 1408 -7942 16 -7943 32 -7944 16 -7945 1152 -7946 432 -7947 2400 -7948 144 -7949 216 -7950 8 -7951 8 -7952 160 -7953 8 -7954 48 -7955 256 -7956 32 -7957 192 -7958 256 -7959 384 -7960 192 -7961 192 -7962 96 -7963 32 -7964 32 -7965 8 -7966 96 -7967 16 -7968 32 -7969 32 -7970 32 -7971 32 -7972 16 -7973 48 -7974 96 -7975 128 -7976 32 -7977 64 -7978 48 -7979 32 -7980 16 -7981 24 -7982 192 -7983 960 -7984 96 -7985 32 -7986 16 -7987 32 -7988 192 -7989 288 -7990 32 -7991 32 -7992 80 -7993 16 -7994 32 -7995 32 -7996 32 -7997 48 -7998 16 -7999 80 -8000 24 -8001 64 -8002 128 -8003 16 -8004 32 -8005 8 -8006 32 -8007 64 -8008 144 -8009 32 -8010 24 -8011 144 -8012 32 -8013 32 -8014 16 -8015 16 -8016 400 -8017 32 -8018 512 -8019 8 -8020 96 -8021 32 -8022 896 -8023 32 -8024 32 -8025 64 -8026 192 -8027 32 -8028 32 -8029 32 -8030 48 -8031 32 -8032 192 -8033 8 -8034 32 -8035 96 -8036 32 -8037 32 -8038 32 -8039 16 -8040 288 -8041 48 -8042 16 -8043 32 -8044 16 -8045 16 -8046 8 -8047 64 -8048 32 -8049 32 -8050 160 -8051 8 -8052 64 -8053 16 -8054 128 -8055 6720 -8056 144 -8057 48 -8058 8 -8059 48 -8060 32 -8061 8 -8062 16 -8063 16 -8064 48 -8065 48 -8066 8 -8067 32 -8068 64 -8069 32 -8070 480 -8071 48 -8072 32 -8073 264 -8074 32 -8075 144 -8076 8 -8077 128 -8078 32 -8079 8 -8080 8 -8081 5632 -8082 32 -8083 32 -8084 56 -8085 4480 -8086 1600 -8087 640 -8088 640 -8089 216 -8090 32 -8091 32 -8092 64 -8093 80 -8094 8 -8095 32 -8096 1344 -8097 48 -8098 288 -8099 32 -8100 144 -8101 72 -8102 32 -8103 8 -8104 16 -8105 32 -8106 32 -8107 32 -8108 64 -8109 240 -8110 128 -8111 32 -8112 48 -8113 64 -8114 8 -8115 2200 -8116 96 -8117 32 -8118 8 -8119 32 -8120 2400 -8121 5760 -8122 8 -8123 48 -8124 10560 -8125 2880 -8126 384 -8127 256 -8128 8 -8129 16 -8130 16 -8131 5760 -8132 4608 -8133 5632 -8134 32 -8135 48 -8136 32 -8137 640 -8138 40 -8139 8 -8140 32 -8141 256 -8142 64 -8143 6160 -8144 48 -8145 384 -8146 8 -8147 48 -8148 64 -8149 1200 -8150 128 -8151 2560 -8152 1344 -8153 32 -8154 32 -8155 8 -8156 288 -8157 192 -8158 8 -8159 3520 -8160 8 -8161 288 -8162 8 -8163 11520 -8164 8 -8165 32 -8166 8 -8167 32 -8168 8 -8169 8 -8170 32 -8171 1536 -8172 96 -8173 32 -8174 288 -8175 32 -8176 128 -8177 32 -8178 16 -8179 16 -8180 8 -8181 16 -8182 32 -8183 32 -8184 240 -8185 288 -8186 32 -8187 8 -8188 96 -8189 8 -8190 64 -8191 48 -8192 16 -8193 16 -8194 32 -8195 7280 -8196 32 -8197 8 -8198 32 -8199 672 -8200 6048 -8201 3200 -8202 96 -8203 2304 -8204 16 -8205 672 -8206 64 -8207 8 -8208 216 -8209 960 -8210 8 -8211 7280 -8212 16 -8213 8 -8214 4032 -8215 16 -8216 8 -8217 5120 -8218 25088 -8219 1344 -8220 768 -8221 24 -8222 5488 -8223 176 -8224 192 -8225 8 -8226 64 -8227 5632 -8228 16 -8229 144 -8230 8 -8231 400 -8232 16 -8233 64 -8234 8 -8235 64 -8236 48 -8237 8 -8238 96 -8239 32 -8240 32 -8241 72 -8242 192 -8243 8 -8244 64 -8245 48 -8246 120 -8247 48 -8248 32 -8249 24 -8250 32 -8251 96 -8252 16 -8253 32 -8254 32 -8255 16 -8256 48 -8257 640 -8258 8 -8259 32 -8260 16 -8261 16 -8262 64 -8263 16 -8264 64 -8265 32 -8266 96 -8267 8 -8268 16 -8269 32 -8270 24 -8271 288 -8272 96 -8273 32 -8274 80 -8275 480 -8276 16 -8277 192 -8278 32 -8279 192 -8280 72 -8281 128 -8282 48 -8283 144 -8284 48 -8285 32 -8286 16 -8287 64 -8288 32 -8289 32 -8290 16 -8291 8 -8292 16 -8293 8 -8294 64 -8295 16 -8296 128 -8297 64 -8298 192 -8299 32 -8300 16 -8301 32 -8302 48 -8303 1600 -8304 48 -8305 256 -8306 32 -8307 32 -8308 640 -8309 2880 -8310 8 -8311 240 -8312 24 -8313 32 -8314 64 -8315 32 -8316 8 -8317 32 -8318 1440 -8319 288 -8320 32 -8321 32 -8322 160 -8323 896 -8324 144 -8325 8 -8326 64 -8327 3840 -8328 192 -8329 8 -8330 40 -8331 144 -8332 96 -8333 64 -8334 32 -8335 7200 -8336 32 -8337 32 -8338 2240 -8339 32 -8340 24 -8341 288 -8342 120 -8343 72 -8344 576 -8345 96 -8346 7200 -8347 16 -8348 128 -8349 48 -8350 128 -8351 96 -8352 32 -8353 64 -8354 8 -8355 288 -8356 144 -8357 8 -8358 8 -8359 48 -8360 64 -8361 8 -8362 192 -8363 32 -8364 8 -8365 144 -8366 16 -8367 24 -8368 192 -8369 144 -8370 192 -8371 32 -8372 64 -8373 648 -8374 128 -8375 8 -8376 1664 -8377 16 -8378 16 -8379 32 -8380 32 -8381 16 -8382 16 -8383 8 -8384 32 -8385 2912 -8386 24 -8387 24 -8388 48 -8389 8 -8390 72 -8391 8 -8392 128 -8393 32 -8394 128 -8395 8 -8396 32 -8397 48 -8398 64 -8399 32 -8400 2160 -8401 8 -8402 16 -8403 360 -8404 1536 -8405 96 -8406 1600 -8407 3240 -8408 32 -8409 8 -8410 8 -8411 384 -8412 4480 -8413 1920 -8414 32 -8415 256 -8416 48 -8417 160 -8418 192 -8419 32 -8420 96 -8421 3840 -8422 4320 -8423 1280 -8424 16 -8425 16 -8426 1296 -8427 16 -8428 10080 -8429 3024 -8430 48 -8431 2304 -8432 2560 -8433 8 -8434 3072 -8435 64 -8436 120 -8437 3600 -8438 32 -8439 144 -8440 8 -8441 8 -8442 1280 -8443 480 -8444 120 -8445 72 -8446 1120 -8447 8 -8448 8 -8449 48 -8450 16 -8451 16 -8452 16 -8453 8 -8454 32 -8455 16 -8456 32 -8457 1344 -8458 48 -8459 16 -8460 16 -8461 8 -8462 288 -8463 32 -8464 8 -8465 96 -8466 192 -8467 32 -8468 432 -8469 32 -8470 16 -8471 32 -8472 32 -8473 48 -8474 32 -8475 16 -8476 32 -8477 16 -8478 8 -8479 32 -8480 32 -8481 32 -8482 8 -8483 16 -8484 8 -8485 32 -8486 192 -8487 32 -8488 144 -8489 8 -8490 16 -8491 1680 -8492 32 -8493 8 -8494 8 -8495 8 -8496 32 -8497 96 -8498 32 -8499 32 -8500 8 -8501 32 -8502 16 -8503 16 -8504 32 -8505 16 -8506 64 -8507 8 -8508 192 -8509 16 -8510 32 -8511 8 -8512 8 -8513 8 -8514 16 -8515 96 -8516 8 -8517 64 -8518 64 -8519 32 -8520 48 -8521 192 -8522 240 -8523 192 -8524 320 -8525 768 -8526 16 -8527 9856 -8528 576 -8529 1344 -8530 8 -8531 2560 -8532 8 -8533 16 -8534 48 -8535 8 -8536 2304 -8537 96 -8538 1120 -8539 8 -8540 32 -8541 192 -8542 192 -8543 1792 -8544 96 -8545 144 -8546 32 -8547 32 -8548 8 -8549 32 -8550 32 -8551 64 -8552 24 -8553 128 -8554 192 -8555 144 -8556 16 -8557 240 -8558 64 -8559 8 -8560 96 -8561 16 -8562 32 -8563 64 -8564 16 -8565 96 -8566 8 -8567 32 -8568 32 -8569 144 -8570 72 -8571 8 -8572 128 -8573 64 -8574 64 -8575 64 -8576 16 -8577 8 -8578 8 -8579 96 -8580 8 -8581 3072 -8582 1024 -8583 192 -8584 16 -8585 288 -8586 24 -8587 16 -8588 1056 -8589 1792 -8590 192 -8591 3456 -8592 8 -8593 192 -8594 32 -8595 32 -8596 8 -8597 16 -8598 16 -8599 48 -8600 192 -8601 112 -8602 128 -8603 48 -8604 24 -8605 24 -8606 32 -8607 64 -8608 32 -8609 32 -8610 8 -8611 32 -8612 16 -8613 16 -8614 8 -8615 48 -8616 32 -8617 240 -8618 32 -8619 16 -8620 16 -8621 8 -8622 8 -8623 24 -8624 64 -8625 8 -8626 32 -8627 40 -8628 48 -8629 32 -8630 800 -8631 288 -8632 48 -8633 144 -8634 32 -8635 32 -8636 32 -8637 64 -8638 16 -8639 8 -8640 72 -8641 32 -8642 32 -8643 96 -8644 32 -8645 80 -8646 32 -8647 32 -8648 16 -8649 96 -8650 80 -8651 48 -8652 16 -8653 16 -8654 32 -8655 96 -8656 16 -8657 16 -8658 32 -8659 64 -8660 32 -8661 16 -8662 16 -8663 16 -8664 216 -8665 32 -8666 64 -8667 48 -8668 16 -8669 64 -8670 256 -8671 32 -8672 32 -8673 32 -8674 32 -8675 16 -8676 32 -8677 96 -8678 96 -8679 32 -8680 32 -8681 24 -8682 192 -8683 32 -8684 64 -8685 16 -8686 192 -8687 32 -8688 32 -8689 672 -8690 256 -8691 16 -8692 32 -8693 16 -8694 96 -8695 64 -8696 32 -8697 64 -8698 32 -8699 8 -8700 32 -8701 192 -8702 8 -8703 1056 -8704 8 -8705 384 -8706 216 -8707 32 -8708 16 -8709 576 -8710 480 -8711 448 -8712 1120 -8713 16 -8714 8 -8715 256 -8716 32 -8717 384 -8718 64 -8719 144 -8720 352 -8721 144 -8722 96 -8723 720 -8724 160 -8725 192 -8726 2640 -8727 24 -8728 96 -8729 96 -8730 288 -8731 32 -8732 16 -8733 8 -8734 48 -8735 8 -8736 7920 -8737 288 -8738 16 -8739 32 -8740 128 -8741 32 -8742 7056 -8743 576 -8744 4032 -8745 192 -8746 3528 -8747 960 -8748 32 -8749 32 -8750 96 -8751 3520 -8752 4608 -8753 1536 -8754 96 -8755 120 -8756 32 -8757 1344 -8758 32 -8759 384 -8760 80 -8761 72 -8762 768 -8763 40 -8764 64 -8765 1296 -8766 720 -8767 384 -8768 64 -8769 96 -8770 32 -8771 48 -8772 192 -8773 48 -8774 32 -8775 576 -8776 448 -8777 192 -8778 192 -8779 32 -8780 96 -8781 48 -8782 280 -8783 288 -8784 96 -8785 128 -8786 2816 -8787 192 -8788 16 -8789 16 -8790 192 -8791 72 -8792 32 -8793 32 -8794 8 -8795 8 -8796 32 -8797 128 -8798 32 -8799 32 -8800 32 -8801 64 -8802 80 -8803 144 -8804 288 -8805 8 -8806 144 -8807 216 -8808 32 -8809 6912 -8810 8 -8811 32 -8812 672 -8813 128 -8814 8 -8815 32 -8816 16 -8817 64 -8818 32 -8819 64 -8820 264 -8821 48 -8822 48 -8823 96 -8824 32 -8825 16 -8826 32 -8827 64 -8828 32 -8829 160 -8830 160 -8831 512 -8832 256 -8833 64 -8834 16 -8835 32 -8836 1280 -8837 240 -8838 16 -8839 64 -8840 32 -8841 48 -8842 32 -8843 16 -8844 16 -8845 16 -8846 128 -8847 288 -8848 16 -8849 32 -8850 32 -8851 24 -8852 32 -8853 32 -8854 576 -8855 24 -8856 24 -8857 16 -8858 24 -8859 80 -8860 32 -8861 96 -8862 32 -8863 32 -8864 16 -8865 64 -8866 32 -8867 32 -8868 16 -8869 8 -8870 480 -8871 480 -8872 48 -8873 32 -8874 80 -8875 528 -8876 32 -8877 144 -8878 24 -8879 16 -8880 8 -8881 16 -8882 96 -8883 32 -8884 320 -8885 32 -8886 96 -8887 32 -8888 144 -8889 32 -8890 120 -8891 48 -8892 32 -8893 16 -8894 32 -8895 8 -8896 720 -8897 32 -8898 256 -8899 32 -8900 32 -8901 192 -8902 48 -8903 32 -8904 288 -8905 8 -8906 192 -8907 32 -8908 8 -8909 32 -8910 16 -8911 16 -8912 32 -8913 32 -8914 16 -8915 32 -8916 8 -8917 240 -8918 192 -8919 32 -8920 16 -8921 96 -8922 128 -8923 640 -8924 8 -8925 32 -8926 8 -8927 8 -8928 32 -8929 32 -8930 32 -8931 8 -8932 32 -8933 32 -8934 32 -8935 64 -8936 32 -8937 32 -8938 32 -8939 16 -8940 8 -8941 16 -8942 16 -8943 8 -8944 32 -8945 16 -8946 32 -8947 16 -8948 48 -8949 48 -8950 32 -8951 48 -8952 32 -8953 64 -8954 96 -8955 96 -8956 32 -8957 40 -8958 128 -8959 32 -8960 128 -8961 96 -8962 32 -8963 384 -8964 64 -8965 8 -8966 8 -8967 8 -8968 192 -8969 8 -8970 8 -8971 8 -8972 32 -8973 32 -8974 128 -8975 16 -8976 8 -8977 32 -8978 32 -8979 96 -8980 32 -8981 32 -8982 16 -8983 96 -8984 32 -8985 16 -8986 64 -8987 24 -8988 64 -8989 16 -8990 16 -8991 16 -8992 64 -8993 32 -8994 1408 -8995 88 -8996 64 -8997 16 -8998 32 -8999 16 -9000 16 -9001 96 -9002 32 -9003 160 -9004 48 -9005 192 -9006 16 -9007 160 -9008 80 -9009 224 -9010 8 -9011 96 -9012 16 -9013 384 -9014 16 -9015 576 -9016 48 -9017 96 -9018 32 -9019 192 -9020 16 -9021 32 -9022 96 -9023 32 -9024 32 -9025 48 -9026 32 -9027 16 -9028 16 -9029 32 -9030 32 -9031 16 -9032 32 -9033 16 -9034 32 -9035 16 -9036 256 -9037 1152 -9038 32 -9039 32 -9040 24 -9041 64 -9042 64 -9043 8 -9044 128 -9045 32 -9046 48 -9047 48 -9048 32 -9049 8 -9050 32 -9051 32 -9052 32 -9053 16 -9054 24 -9055 32 -9056 16 -9057 32 -9058 16 -9059 8 -9060 16 -9061 32 -9062 16 -9063 32 -9064 32 -9065 1152 -9066 32 -9067 16 -9068 32 -9069 48 -9070 16 -9071 192 -9072 32 -9073 16 -9074 32 -9075 32 -9076 16 -9077 16 -9078 32 -9079 32 -9080 32 -9081 1792 -9082 288 -9083 96 -9084 48 -9085 192 -9086 8 -9087 32 -9088 48 -9089 64 -9090 8 -9091 8 -9092 8 -9093 32 -9094 32 -9095 64 -9096 4800 -9097 2304 -9098 1760 -9099 8 -9100 72 -9101 640 -9102 48 -9103 192 -9104 384 -9105 192 -9106 24 -9107 2400 -9108 120 -9109 48 -9110 16 -9111 80 -9112 64 -9113 32 -9114 32 -9115 640 -9116 48 -9117 80 -9118 72 -9119 32 -9120 32 -9121 32 -9122 48 -9123 16 -9124 32 -9125 32 -9126 32 -9127 16 -9128 32 -9129 16 -9130 8 -9131 16 -9132 64 -9133 16 -9134 5760 -9135 8 -9136 16 -9137 600 -9138 192 -9139 32 -9140 8 -9141 16 -9142 64 -9143 5760 -9144 56 -9145 32 -9146 8 -9147 96 -9148 1280 -9149 768 -9150 64 -9151 8 -9152 56 -9153 192 -9154 48 -9155 32 -9156 128 -9157 8 -9158 128 -9159 32 -9160 16 -9161 112 -9162 8 -9163 576 -9164 16 -9165 8 -9166 16 -9167 8 -9168 128 -9169 96 -9170 24 -9171 64 -9172 288 -9173 16 -9174 48 -9175 48 -9176 2912 -9177 8 -9178 8 -9179 432 -9180 3840 -9181 16 -9182 8 -9183 960 -9184 8 -9185 128 -9186 16 -9187 6552 -9188 8 -9189 16 -9190 8 -9191 48 -9192 1728 -9193 8 -9194 512 -9195 48 -9196 128 -9197 8 -9198 192 -9199 8 -9200 96 -9201 32 -9202 32 -9203 32 -9204 8 -9205 64 -9206 16 -9207 8 -9208 32 -9209 3840 -9210 8 -9211 192 -9212 32 -9213 8 -9214 11760 -9215 32 -9216 8 -9217 2688 -9218 32 -9219 16 -9220 40 -9221 11648 -9222 4992 -9223 2080 -9224 160 -9225 16 -9226 5760 -9227 80 -9228 16 -9229 24 -9230 32 -9231 480 -9232 16 -9233 192 -9234 384 -9235 24 -9236 32 -9237 288 -9238 64 -9239 216 -9240 32 -9241 504 -9242 432 -9243 16 -9244 96 -9245 11648 -9246 23296 -9247 480 -9248 1440 -9249 24 -9250 16 -9251 8 -9252 64 -9253 8 -9254 96 -9255 504 -9256 8 -9257 64 -9258 3360 -9259 384 -9260 2160 -9261 64 -9262 32 -9263 64 -9264 8 -9265 576 -9266 64 -9267 16 -9268 384 -9269 40 -9270 64 -9271 64 -9272 144 -9273 48 -9274 80 -9275 96 -9276 128 -9277 32 -9278 32 -9279 128 -9280 120 -9281 72 -9282 96 -9283 32 -9284 48 -9285 48 -9286 16 -9287 8 -9288 32 -9289 8 -9290 1344 -9291 120 -9292 128 -9293 32 -9294 32 -9295 48 -9296 32 -9297 32 -9298 64 -9299 8 -9300 8 -9301 192 -9302 64 -9303 48 -9304 24 -9305 1600 -9306 16 -9307 144 -9308 32 -9309 64 -9310 16 -9311 32 -9312 8 -9313 64 -9314 32 -9315 16 -9316 32 -9317 16 -9318 64 -9319 640 -9320 16 -9321 16 -9322 32 -9323 192 -9324 8 -9325 144 -9326 32 -9327 32 -9328 1280 -9329 480 -9330 8 -9331 32 -9332 32 -9333 8 -9334 8 -9335 32 -9336 192 -9337 32 -9338 32 -9339 16 -9340 8 -9341 32 -9342 64 -9343 8 -9344 8 -9345 7040 -9346 6160 -9347 512 -9348 16 -9349 56 -9350 48 -9351 144 -9352 96 -9353 32 -9354 32 -9355 128 -9356 72 -9357 448 -9358 128 -9359 288 -9360 16 -9361 480 -9362 96 -9363 8 -9364 16 -9365 448 -9366 640 -9367 64 -9368 24 -9369 64 -9370 64 -9371 64 -9372 80 -9373 64 -9374 8 -9375 32 -9376 32 -9377 64 -9378 32 -9379 64 -9380 48 -9381 384 -9382 672 -9383 32 -9384 480 -9385 64 -9386 32 -9387 32 -9388 32 -9389 16 -9390 32 -9391 240 -9392 32 -9393 192 -9394 16 -9395 64 -9396 192 -9397 8 -9398 24 -9399 6552 -9400 32 -9401 8 -9402 1008 -9403 144 -9404 1344 -9405 192 -9406 8 -9407 32 -9408 8 -9409 64 -9410 24 -9411 32 -9412 16 -9413 32 -9414 48 -9415 288 -9416 48 -9417 32 -9418 32 -9419 96 -9420 32 -9421 32 -9422 128 -9423 16 -9424 360 -9425 192 -9426 16 -9427 48 -9428 216 -9429 48 -9430 32 -9431 32 -9432 16 -9433 64 -9434 8 -9435 320 -9436 16 -9437 8 -9438 1344 -9439 8 -9440 32 -9441 64 -9442 64 -9443 8 -9444 8 -9445 16 -9446 32 -9447 32 -9448 48 -9449 192 -9450 64 -9451 32 -9452 160 -9453 64 -9454 32 -9455 24 -9456 2912 -9457 672 -9458 16 -9459 1680 -9460 64 -9461 48 -9462 192 -9463 48 -9464 96 -9465 32 -9466 1008 -9467 96 -9468 288 -9469 16 -9470 192 -9471 1008 -9472 192 -9473 32 -9474 32 -9475 96 -9476 32 -9477 32 -9478 64 -9479 24 -9480 288 -9481 48 -9482 32 -9483 320 -9484 8 -9485 32 -9486 64 -9487 96 -9488 32 -9489 32 -9490 16 -9491 32 -9492 32 -9493 32 -9494 32 -9495 128 -9496 16 -9497 32 -9498 8 -9499 16 -9500 8 -9501 8 -9502 16 -9503 96 -9504 32 -9505 8 -9506 32 -9507 32 -9508 32 -9509 32 -9510 48 -9511 32 -9512 16 -9513 16 -9514 32 -9515 64 -9516 64 -9517 32 -9518 16 -9519 32 -9520 32 -9521 24 -9522 24 -9523 64 -9524 72 -9525 320 -9526 32 -9527 288 -9528 32 -9529 64 -9530 96 -9531 3584 -9532 96 -9533 144 -9534 576 -9535 32 -9536 32 -9537 768 -9538 64 -9539 720 -9540 32 -9541 24 -9542 32 -9543 16 -9544 144 -9545 8 -9546 288 -9547 8 -9548 32 -9549 96 -9550 192 -9551 8 -9552 16 -9553 32 -9554 32 -9555 8 -9556 32 -9557 32 -9558 32 -9559 32 -9560 8 -9561 96 -9562 32 -9563 128 -9564 32 -9565 32 -9566 32 -9567 32 -9568 1152 -9569 32 -9570 96 -9571 216 -9572 672 -9573 16 -9574 32 -9575 32 -9576 32 -9577 32 -9578 64 -9579 576 -9580 40 -9581 32 -9582 64 -9583 32 -9584 32 -9585 192 -9586 96 -9587 64 -9588 64 -9589 32 -9590 48 -9591 32 -9592 32 -9593 32 -9594 384 -9595 16 -9596 8 -9597 8 -9598 8 -9599 32 -9600 144 -9601 192 -9602 64 -9603 48 -9604 8 -9605 32 -9606 32 -9607 16 -9608 16 -9609 64 -9610 64 -9611 8 -9612 8 -9613 16 -9614 96 -9615 64 -9616 96 -9617 32 -9618 32 -9619 48 -9620 128 -9621 240 -9622 8 -9623 360 -9624 8 -9625 8 -9626 192 -9627 16 -9628 8 -9629 32 -9630 128 -9631 32 -9632 32 -9633 32 -9634 32 -9635 1176 -9636 128 -9637 384 -9638 96 -9639 48 -9640 24 -9641 32 -9642 288 -9643 16 -9644 16 -9645 640 -9646 8 -9647 176 -9648 144 -9649 96 -9650 80 -9651 128 -9652 32 -9653 32 -9654 8 -9655 8 -9656 216 -9657 48 -9658 32 -9659 32 -9660 504 -9661 4928 -9662 576 -9663 80 -9664 768 -9665 8 -9666 2240 -9667 192 -9668 8 -9669 120 -9670 896 -9671 1008 -9672 960 -9673 144 -9674 640 -9675 48 -9676 160 -9677 72 -9678 32 -9679 32 -9680 4224 -9681 384 -9682 576 -9683 2688 -9684 32 -9685 24 -9686 288 -9687 128 -9688 576 -9689 32 -9690 192 -9691 24 -9692 64 -9693 16 -9694 32 -9695 128 -9696 32 -9697 1536 -9698 48 -9699 32 -9700 32 -9701 64 -9702 48 -9703 32 -9704 96 -9705 32 -9706 120 -9707 24 -9708 624 -9709 32 -9710 128 -9711 8 -9712 8 -9713 64 -9714 8 -9715 32 -9716 32 -9717 8 -9718 128 -9719 8 -9720 32 -9721 8 -9722 96 -9723 32 -9724 216 -9725 96 -9726 8 -9727 32 -9728 16 -9729 32 -9730 8 -9731 160 -9732 160 -9733 256 -9734 64 -9735 64 -9736 8 -9737 240 -9738 16 -9739 48 -9740 32 -9741 32 -9742 32 -9743 16 -9744 16 -9745 16 -9746 32 -9747 16 -9748 32 -9749 8 -9750 8 -9751 96 -9752 32 -9753 8 -9754 8 -9755 8 -9756 32 -9757 400 -9758 32 -9759 32 -9760 8 -9761 80 -9762 72 -9763 64 -9764 8 -9765 16 -9766 32 -9767 16 -9768 8 -9769 32 -9770 8 -9771 32 -9772 16 -9773 144 -9774 64 -9775 8 -9776 8 -9777 8 -9778 72 -9779 16 -9780 8 -9781 64 -9782 8 -9783 32 -9784 64 -9785 16 -9786 48 -9787 192 -9788 8 -9789 48 -9790 32 -9791 8 -9792 8 -9793 48 -9794 16 -9795 32 -9796 8 -9797 8 -9798 16 -9799 256 -9800 800 -9801 256 -9802 48 -9803 64 -9804 288 -9805 32 -9806 128 -9807 1536 -9808 32 -9809 128 -9810 64 -9811 64 -9812 8 -9813 32 -9814 16 -9815 32 -9816 32 -9817 16 -9818 32 -9819 32 -9820 16 -9821 8 -9822 96 -9823 32 -9824 8 -9825 64 -9826 128 -9827 64 -9828 192 -9829 32 -9830 32 -9831 8 -9832 32 -9833 32 -9834 32 -9835 96 -9836 64 -9837 8 -9838 16 -9839 32 -9840 32 -9841 32 -9842 32 -9843 8 -9844 216 -9845 128 -9846 32 -9847 216 -9848 32 -9849 8 -9850 32 -9851 16 -9852 128 -9853 24 -9854 16 -9855 72 -9856 8 -9857 32 -9858 32 -9859 48 -9860 288 -9861 32 -9862 16 -9863 16 -9864 16 -9865 16 -9866 72 -9867 16 -9868 112 -9869 16 -9870 8 -9871 64 -9872 32 -9873 32 -9874 96 -9875 32 -9876 576 -9877 192 -9878 640 -9879 48 -9880 32 -9881 32 -9882 80 -9883 4480 -9884 896 -9885 8 -9886 24 -9887 16 -9888 640 -9889 288 -9890 32 -9891 32 -9892 128 -9893 24 -9894 32 -9895 32 -9896 384 -9897 16 -9898 192 -9899 8 -9900 80 -9901 16 -9902 32 -9903 64 -9904 16 -9905 8 -9906 8 -9907 288 -9908 96 -9909 8 -9910 128 -9911 88 -9912 16 -9913 64 -9914 32 -9915 32 -9916 2200 -9917 48 -9918 48 -9919 640 -9920 8 -9921 8 -9922 128 -9923 32 -9924 16 -9925 64 -9926 16 -9927 48 -9928 64 -9929 1280 -9930 384 -9931 192 -9932 288 -9933 144 -9934 64 -9935 128 -9936 32 -9937 32 -9938 144 -9939 64 -9940 48 -9941 32 -9942 64 -9943 1760 -9944 128 -9945 32 -9946 8 -9947 32 -9948 64 -9949 64 -9950 16 -9951 32 -9952 32 -9953 16 -9954 64 -9955 32 -9956 64 -9957 64 -9958 96 -9959 768 -9960 8 -9961 64 -9962 96 -9963 32 -9964 288 -9965 8 -9966 32 -9967 8 -9968 96 -9969 1600 -9970 8 -9971 32 -9972 32 -9973 32 -9974 2688 -9975 512 -9976 16 -9977 32 -9978 8 -9979 8 -9980 32 -9981 576 -9982 8 -9983 48 -9984 32 -9985 48 -9986 32 -9987 1920 -9988 480 -9989 9856 -9990 19712 -9991 8 -9992 4032 -9993 8 -9994 48 -9995 32 -9996 32 -9997 96 -9998 8 -9999 720 -10000 16 -10001 96 -10002 64 -10003 32 -10004 288 -10005 96 -10006 64 -10007 32 -10008 48 -10009 8 -10010 120 -10011 13104 -10012 2048 -10013 1600 -10014 32 -10015 16 -10016 32 -10017 2520 -10018 16 -10019 8 -10020 8 -10021 768 -10022 96 -10023 240 -10024 2000 -10025 160 -10026 1512 -10027 192 -10028 64 -10029 96 -10030 128 -10031 64 -10032 96 -10033 128 -10034 16 -10035 128 -10036 144 -10037 8 -10038 144 -10039 2048 -10040 32 -10041 48 -10042 3600 -10043 48 -10044 8 -10045 3920 -10046 40 -10047 48 -10048 64 -10049 96 -10050 64 -10051 32 -10052 1728 -10053 320 -10054 16 -10055 32 -10056 192 -10057 32 -10058 96 -10059 64 -10060 32 -10061 360 -10062 32 -10063 1760 -10064 32 -10065 600 -10066 48 -10067 48 -10068 16 -10069 32 -10070 32 -10071 16 -10072 32 -10073 64 -10074 32 -10075 48 -10076 32 -10077 32 -10078 96 -10079 16 -10080 32 -10081 256 -10082 24 -10083 16 -10084 16 -10085 32 -10086 64 -10087 16 -10088 8 -10089 96 -10090 32 -10091 32 -10092 48 -10093 48 -10094 8 -10095 576 -10096 32 -10097 32 -10098 96 -10099 216 -10100 144 -10101 32 -10102 32 -10103 288 -10104 32 -10105 24 -10106 64 -10107 32 -10108 8 -10109 32 -10110 32 -10111 768 -10112 8 -10113 8 -10114 288 -10115 8 -10116 96 -10117 64 -10118 8 -10119 72 -10120 8 -10121 672 -10122 32 -10123 720 -10124 32 -10125 32 -10126 64 -10127 72 -10128 144 -10129 336 -10130 64 -10131 64 -10132 16 -10133 96 -10134 16 -10135 8 -10136 64 -10137 8 -10138 32 -10139 192 -10140 24 -10141 560 -10142 32 -10143 64 -10144 48 -10145 56 -10146 112 -10147 40 -10148 32 -10149 16 -10150 16 -10151 192 -10152 8 -10153 16 -10154 1120 -10155 8 -10156 768 -10157 192 -10158 8 -10159 240 -10160 32 -10161 48 -10162 3584 -10163 128 -10164 8 -10165 32 -10166 32 -10167 16 -10168 16 -10169 8 -10170 360 -10171 72 -10172 8 -10173 48 -10174 32 -10175 16 -10176 64 -10177 8 -10178 16 -10179 64 -10180 96 -10181 8 -10182 16 -10183 32 -10184 288 -10185 16 -10186 96 -10187 64 -10188 32 -10189 8 -10190 8 -10191 32 -10192 48 -10193 32 -10194 8 -10195 64 -10196 40 -10197 32 -10198 96 -10199 600 -10200 64 -10201 8 -10202 8 -10203 8 -10204 8 -10205 32 -10206 32 -10207 80 -10208 8 -10209 480 -10210 192 -10211 176 -10212 10368 -10213 8 -10214 96 -10215 288 -10216 40 -10217 16 -10218 256 -10219 48 -10220 32 -10221 8 -10222 960 -10223 192 -10224 16 -10225 8 -10226 72 -10227 32 -10228 64 -10229 16 -10230 8 -10231 8 -10232 32 -10233 192 -10234 32 -10235 64 -10236 192 -10237 16 -10238 384 -10239 96 -10240 32 -10241 32 -10242 32 -10243 8 -10244 8 -10245 48 -10246 16 -10247 16 -10248 96 -10249 16 -10250 8 -10251 96 -10252 48 -10253 32 -10254 16 -10255 8 -10256 16 -10257 64 -10258 96 -10259 32 -10260 32 -10261 32 -10262 8 -10263 32 -10264 32 -10265 64 -10266 16 -10267 288 -10268 8 -10269 768 -10270 64 -10271 128 -10272 144 -10273 16 -10274 384 -10275 8 -10276 288 -10277 96 -10278 480 -10279 64 -10280 96 -10281 32 -10282 64 -10283 32 -10284 144 -10285 64 -10286 48 -10287 32 -10288 24 -10289 64 -10290 48 -10291 32 -10292 64 -10293 8 -10294 16 -10295 16 -10296 32 -10297 8 -10298 16 -10299 32 -10300 16 -10301 32 -10302 32 -10303 8 -10304 16 -10305 96 -10306 48 -10307 240 -10308 96 -10309 8 -10310 48 -10311 72 -10312 192 -10313 32 -10314 96 -10315 32 -10316 32 -10317 8 -10318 32 -10319 48 -10320 16 -10321 8 -10322 32 -10323 32 -10324 64 -10325 16 -10326 64 -10327 32 -10328 32 -10329 8 -10330 8 -10331 64 -10332 32 -10333 48 -10334 32 -10335 8 -10336 96 -10337 32 -10338 64 -10339 320 -10340 336 -10341 384 -10342 16 -10343 32 -10344 72 -10345 320 -10346 96 -10347 64 -10348 96 -10349 64 -10350 48 -10351 8 -10352 240 -10353 72 -10354 4400 -10355 5720 -10356 1944 -10357 336 -10358 720 -10359 352 -10360 16 -10361 32 -10362 48 -10363 32 -10364 160 -10365 384 -10366 96 -10367 360 -10368 32 -10369 64 -10370 360 -10371 1200 -10372 144 -10373 144 -10374 288 -10375 320 -10376 1440 -10377 576 -10378 24 -10379 128 -10380 16 -10381 96 -10382 64 -10383 32 -10384 192 -10385 8 -10386 80 -10387 24 -10388 16 -10389 64 -10390 32 -10391 128 -10392 192 -10393 8 -10394 80 -10395 192 -10396 80 -10397 8 -10398 160 -10399 32 -10400 8 -10401 48 -10402 16 -10403 144 -10404 16 -10405 32 -10406 8 -10407 640 -10408 32 -10409 64 -10410 8 -10411 8 -10412 24 -10413 64 -10414 8 -10415 48 -10416 48 -10417 32 -10418 64 -10419 48 -10420 16 -10421 16 -10422 64 -10423 16 -10424 32 -10425 16 -10426 32 -10427 16 -10428 8 -10429 96 -10430 720 -10431 480 -10432 48 -10433 48 -10434 288 -10435 8 -10436 32 -10437 128 -10438 32 -10439 8 -10440 8 -10441 16 -10442 48 -10443 88 -10444 384 -10445 32 -10446 96 -10447 48 -10448 64 -10449 32 -10450 32 -10451 32 -10452 32 -10453 8 -10454 32 -10455 48 -10456 64 -10457 192 -10458 32 -10459 32 -10460 96 -10461 48 -10462 224 -10463 32 -10464 8 -10465 48 -10466 16 -10467 16 -10468 32 -10469 128 -10470 16 -10471 384 -10472 24 -10473 64 -10474 672 -10475 576 -10476 8 -10477 32 -10478 384 -10479 128 -10480 8 -10481 160 -10482 8 -10483 48 -10484 8 -10485 144 -10486 32 -10487 32 -10488 64 -10489 80 -10490 16 -10491 16 -10492 480 -10493 64 -10494 360 -10495 16 -10496 32 -10497 16 -10498 32 -10499 32 -10500 32 -10501 24 -10502 96 -10503 1200 -10504 8 -10505 64 -10506 360 -10507 96 -10508 432 -10509 16 -10510 32 -10511 32 -10512 8 -10513 96 -10514 8 -10515 32 -10516 192 -10517 48 -10518 8 -10519 32 -10520 16 -10521 8 -10522 8 -10523 256 -10524 8 -10525 64 -10526 288 -10527 16 -10528 144 -10529 8 -10530 64 -10531 128 -10532 16 -10533 64 -10534 96 -10535 16 -10536 64 -10537 32 -10538 64 -10539 320 -10540 96 -10541 144 -10542 840 -10543 64 -10544 32 -10545 32 -10546 16 -10547 32 -10548 1344 -10549 64 -10550 432 -10551 16 -10552 192 -10553 3360 -10554 256 -10555 32 -10556 1728 -10557 16 -10558 16 -10559 256 -10560 216 -10561 64 -10562 64 -10563 480 -10564 3072 -10565 96 -10566 360 -10567 16 -10568 192 -10569 24 -10570 64 -10571 504 -10572 16 -10573 32 -10574 16 -10575 3840 -10576 1080 -10577 192 -10578 16 -10579 48 -10580 16 -10581 24 -10582 16 -10583 16 -10584 384 -10585 48 -10586 16 -10587 8 -10588 192 -10589 32 -10590 8 -10591 384 -10592 96 -10593 4480 -10594 240 -10595 24 -10596 40 -10597 8 -10598 1280 -10599 192 -10600 32 -10601 8 -10602 16 -10603 32 -10604 96 -10605 16 -10606 24 -10607 32 -10608 32 -10609 32 -10610 16 -10611 32 -10612 8 -10613 192 -10614 64 -10615 16 -10616 32 -10617 16 -10618 32 -10619 32 -10620 16 -10621 16 -10622 64 -10623 32 -10624 32 -10625 24 -10626 48 -10627 32 -10628 8 -10629 16 -10630 1600 -10631 8 -10632 3456 -10633 144 -10634 48 -10635 8 -10636 48 -10637 288 -10638 8 -10639 32 -10640 768 -10641 32 -10642 384 -10643 8 -10644 512 -10645 32 -10646 48 -10647 16 -10648 32 -10649 16 -10650 64 -10651 32 -10652 32 -10653 24 -10654 64 -10655 8 -10656 144 -10657 16 -10658 512 -10659 192 -10660 144 -10661 480 -10662 8 -10663 72 -10664 112 -10665 384 -10666 48 -10667 864 -10668 16 -10669 288 -10670 16 -10671 1800 -10672 8 -10673 32 -10674 8 -10675 32 -10676 8 -10677 16 -10678 64 -10679 32 -10680 64 -10681 8 -10682 72 -10683 96 -10684 16 -10685 32 -10686 32 -10687 32 -10688 600 -10689 384 -10690 32 -10691 48 -10692 32 -10693 16 -10694 48 -10695 32 -10696 32 -10697 8 -10698 8 -10699 16 -10700 64 -10701 144 -10702 64 -10703 32 -10704 8 -10705 32 -10706 96 -10707 128 -10708 48 -10709 48 -10710 32 -10711 32 -10712 32 -10713 32 -10714 64 -10715 48 -10716 8 -10717 240 -10718 144 -10719 32 -10720 24 -10721 32 -10722 48 -10723 32 -10724 16 -10725 8 -10726 64 -10727 80 -10728 16 -10729 80 -10730 504 -10731 960 -10732 144 -10733 384 -10734 32 -10735 288 -10736 128 -10737 32 -10738 32 -10739 144 -10740 16 -10741 32 -10742 8 -10743 16 -10744 32 -10745 160 -10746 16 -10747 32 -10748 32 -10749 16 -10750 64 -10751 16 -10752 32 -10753 144 -10754 8 -10755 16 -10756 32 -10757 32 -10758 16 -10759 32 -10760 32 -10761 64 -10762 48 -10763 32 -10764 32 -10765 16 -10766 32 -10767 32 -10768 8 -10769 8 -10770 32 -10771 32 -10772 64 -10773 16 -10774 72 -10775 8 -10776 32 -10777 40 -10778 288 -10779 64 -10780 32 -10781 128 -10782 32 -10783 192 -10784 64 -10785 32 -10786 144 -10787 32 -10788 32 -10789 32 -10790 32 -10791 32 -10792 96 -10793 8 -10794 32 -10795 48 -10796 8 -10797 8 -10798 32 -10799 48 -10800 168 -10801 8 -10802 32 -10803 8 -10804 32 -10805 144 -10806 240 -10807 16 -10808 192 -10809 16 -10810 96 -10811 240 -10812 480 -10813 768 -10814 192 -10815 48 -10816 8 -10817 160 -10818 96 -10819 240 -10820 240 -10821 288 -10822 72 -10823 96 -10824 48 -10825 32 -10826 80 -10827 160 -10828 96 -10829 8 -10830 32 -10831 32 -10832 48 -10833 16 -10834 32 -10835 320 -10836 32 -10837 8 -10838 8 -10839 8 -10840 16 -10841 16 -10842 32 -10843 8 -10844 32 -10845 8 -10846 16 -10847 48 -10848 16 -10849 16 -10850 32 -10851 8 -10852 32 -10853 32 -10854 8 -10855 32 -10856 32 -10857 32 -10858 16 -10859 48 -10860 16 -10861 160 -10862 32 -10863 32 -10864 16 -10865 256 -10866 32 -10867 360 -10868 64 -10869 144 -10870 32 -10871 64 -10872 32 -10873 8 -10874 24 -10875 32 -10876 512 -10877 216 -10878 32 -10879 32 -10880 360 -10881 8 -10882 96 -10883 8 -10884 64 -10885 24 -10886 480 -10887 32 -10888 32 -10889 32 -10890 64 -10891 32 -10892 32 -10893 32 -10894 128 -10895 128 -10896 1056 -10897 8 -10898 48 -10899 32 -10900 8 -10901 384 -10902 96 -10903 64 -10904 48 -10905 32 -10906 128 -10907 288 -10908 144 -10909 16 -10910 1280 -10911 288 -10912 48 -10913 32 -10914 32 -10915 1200 -10916 32 -10917 24 -10918 24 -10919 160 -10920 160 -10921 32 -10922 192 -10923 8 -10924 32 -10925 32 -10926 8 -10927 64 -10928 64 -10929 80 -10930 32 -10931 256 -10932 16 -10933 160 -10934 32 -10935 32 -10936 96 -10937 256 -10938 48 -10939 16 -10940 96 -10941 16 -10942 32 -10943 32 -10944 240 -10945 16 -10946 864 -10947 64 -10948 32 -10949 16 -10950 16 -10951 32 -10952 32 -10953 64 -10954 16 -10955 16 -10956 16 -10957 8 -10958 32 -10959 32 -10960 64 -10961 96 -10962 16 -10963 8 -10964 48 -10965 32 -10966 32 -10967 32 -10968 24 -10969 16 -10970 32 -10971 144 -10972 32 -10973 96 -10974 192 -10975 8 -10976 32 -10977 32 -10978 8 -10979 800 -10980 128 -10981 96 -10982 32 -10983 32 -10984 384 -10985 96 -10986 32 -10987 16 -10988 192 -10989 64 -10990 32 -10991 8 -10992 32 -10993 144 -10994 64 -10995 32 -10996 192 -10997 32 -10998 32 -10999 32 -11000 32 -11001 256 -11002 16 -11003 32 -11004 64 -11005 32 -11006 64 -11007 288 -11008 8 -11009 32 -11010 288 -11011 16 -11012 16 -11013 8 -11014 48 -11015 16 -11016 504 -11017 16 -11018 48 -11019 16 -11020 192 -11021 192 -11022 8 -11023 288 -11024 24 -11025 96 -11026 32 -11027 192 -11028 32 -11029 32 -11030 176 -11031 32 -11032 32 -11033 16 -11034 144 -11035 72 -11036 8 -11037 32 -11038 8 -11039 32 -11040 384 -11041 16 -11042 48 -11043 8 -11044 16 -11045 32 -11046 32 -11047 32 -11048 8 -11049 32 -11050 32 -11051 32 -11052 216 -11053 16 -11054 96 -11055 128 -11056 128 -11057 32 -11058 32 -11059 32 -11060 32 -11061 32 -11062 32 -11063 32 -11064 16 -11065 16 -11066 32 -11067 32 -11068 160 -11069 8 -11070 384 -11071 160 -11072 32 -11073 24 -11074 64 -11075 144 -11076 8 -11077 192 -11078 96 -11079 96 -11080 8 -11081 896 -11082 288 -11083 320 -11084 48 -11085 96 -11086 16 -11087 8 -11088 32 -11089 32 -11090 32 -11091 64 -11092 8 -11093 64 -11094 32 -11095 8 -11096 8 -11097 48 -11098 64 -11099 8 -11100 8 -11101 48 -11102 32 -11103 32 -11104 32 -11105 32 -11106 32 -11107 8 -11108 128 -11109 96 -11110 32 -11111 16 -11112 32 -11113 32 -11114 32 -11115 64 -11116 8 -11117 32 -11118 144 -11119 32 -11120 96 -11121 1008 -11122 16 -11123 32 -11124 192 -11125 288 -11126 64 -11127 32 -11128 64 -11129 72 -11130 192 -11131 48 -11132 64 -11133 32 -11134 480 -11135 8 -11136 128 -11137 16 -11138 64 -11139 96 -11140 32 -11141 32 -11142 32 -11143 32 -11144 384 -11145 32 -11146 80 -11147 32 -11148 48 -11149 32 -11150 8 -11151 8 -11152 8 -11153 96 -11154 32 -11155 192 -11156 8 -11157 8 -11158 8 -11159 48 -11160 32 -11161 32 -11162 16 -11163 32 -11164 48 -11165 192 -11166 64 -11167 8 -11168 432 -11169 512 -11170 8 -11171 176 -11172 64 -11173 384 -11174 16 -11175 72 -11176 48 -11177 32 -11178 48 -11179 128 -11180 16 -11181 48 -11182 16 -11183 32 -11184 16 -11185 96 -11186 48 -11187 16 -11188 8 -11189 8 -11190 32 -11191 8 -11192 8 -11193 32 -11194 16 -11195 8 -11196 48 -11197 32 -11198 48 -11199 32 -11200 16 -11201 32 -11202 8 -11203 8 -11204 288 -11205 16 -11206 64 -11207 16 -11208 8 -11209 24 -11210 32 -11211 32 -11212 32 -11213 96 -11214 32 -11215 96 -11216 16 -11217 96 -11218 48 -11219 16 -11220 64 -11221 64 -11222 32 -11223 32 -11224 16 -11225 48 -11226 8 -11227 16 -11228 8 -11229 32 -11230 32 -11231 32 -11232 32 -11233 8 -11234 32 -11235 8 -11236 256 -11237 16 -11238 16 -11239 512 -11240 32 -11241 8 -11242 32 -11243 8 -11244 32 -11245 8 -11246 8 -11247 32 -11248 8 -11249 8 -11250 32 -11251 16 -11252 96 -11253 16 -11254 32 -11255 8 -11256 32 -11257 32 -11258 80 -11259 32 -11260 16 -11261 32 -11262 32 -11263 16 -11264 56 -11265 32 -11266 96 -11267 6048 -11268 9360 -11269 10976 -11270 3072 -11271 1792 -11272 4480 -11273 7168 -11274 6144 -11275 1792 -11276 2048 -11277 896 -11278 12544 -11279 896 -11280 1120 -11281 17472 -11282 6720 -11283 4608 -11284 3584 -11285 1344 -11286 2016 -11287 9408 -11288 1536 -11289 1024 -11290 3072 -11291 2688 -11292 1792 -11293 6144 -11294 1792 -11295 13440 -11296 9408 -11297 1792 -11298 768 -11299 8064 -11300 6144 -11301 1792 -11302 768 -11303 3840 -11304 7168 -11305 3584 -11306 2304 -11307 3584 -11308 4608 -11309 3584 -11310 17248 -11311 1024 -11312 224 -11313 1920 -11314 384 -11315 1792 -11316 768 -11317 6912 -11318 4160 -11319 6160 -11320 10192 -11321 6048 -11322 5376 -11323 768 -11324 8064 -11325 6000 -11326 7392 -11327 9408 -11328 5600 -11329 14336 -11330 5376 -11331 5376 -11332 11760 -11333 2688 -11334 6720 -11335 9856 -11336 6160 -11337 6480 -11338 5376 -11339 7840 -11340 4752 -11341 4704 -11342 6776 -11343 12544 -11344 9408 -11345 9408 -11346 5376 -11347 8400 -11348 9408 -11349 6144 -11350 8064 -11351 9600 -11352 8064 -11353 6272 -11354 4032 -11355 6552 -11356 2496 -11357 7392 -11358 4608 -11359 5376 -11360 4200 -11361 4032 -11362 10080 -11363 3136 -11364 2240 -11365 1872 -11366 13440 -11367 8736 -11368 5488 -11369 3920 -11370 2304 -11371 6160 -11372 6240 -11373 4320 -11374 4608 -11375 6720 -11376 5760 -11377 11760 -11378 6272 -11379 1680 -11380 4928 -11381 6864 -11382 7920 -11383 8736 -11384 7920 -11385 9408 -11386 4800 -11387 400 -11388 7040 -11389 7040 -11390 2816 -11391 1680 -11392 6912 -11393 7040 -11394 12672 -11395 9216 -11396 14080 -11397 6144 -11398 416 -11399 4000 -11400 3456 -11401 5040 -11402 6912 -11403 2688 -11404 6144 -11405 6400 -11406 384 -11407 384 -11408 21504 -11409 21504 -11410 9600 -11411 10368 -11412 10368 -11413 10752 -11414 19712 -11415 9984 -11416 9216 -11417 9216 -11418 4032 -11419 4032 -11420 3072 -11421 4096 -11422 4096 -11423 4096 -11424 4096 -11425 8192 -11426 5760 -11427 5280 -11428 5280 -11429 5632 -11430 7168 -11431 14336 -11432 14336 -11433 14336 -11434 14336 -11435 14336 -11436 5184 -11437 9600 -11438 10368 -11439 10368 -11440 6912 -11441 12672 -11442 8112 -11443 8112 -11444 8736 -11445 2304 -11446 2304 -11447 6144 -11448 3456 -11449 9216 -11450 8640 -11451 8960 -11452 6240 -11453 2808 -11454 9856 -11455 19712 -11456 21952 -11457 21952 -11458 4224 -11459 9600 -11460 7680 -11461 10752 -11462 2688 -11463 8736 -11464 8064 -11465 8064 -11466 2496 -11467 480 -11468 6912 -11469 13440 -11470 17280 -11471 9360 -11472 8640 -11473 26880 -11474 13312 -11475 13312 -11476 13312 -11477 13824 -11478 9240 -11479 9240 -11480 8640 -11481 6864 -11482 6720 -11483 6240 -11484 6240 -11485 2464 -11486 2688 -11487 8064 -11488 2816 -11489 3840 -11490 6912 -11491 12480 -11492 2304 -11493 7680 -11494 10752 -11495 3840 -11496 4992 -11497 4992 -11498 2880 -11499 2304 -11500 2304 -11501 576 -11502 576 -11503 6912 -11504 12672 -11505 7040 -11506 14336 -11507 14336 -11508 1728 -11509 5760 -11510 6336 -11511 6336 -11512 5120 -11513 6144 -11514 13200 -11515 3328 -11516 3072 -11517 3072 -11518 4160 -11519 4160 -11520 4992 -11521 3584 -11522 3584 -11523 13824 -11524 13824 -11525 13824 -11526 13824 -11527 13824 -11528 13824 -11529 13824 -11530 13824 -11531 13824 -11532 4480 -11533 5760 -11534 6272 -11535 6272 -11536 6272 -11537 6272 -11538 3744 -11539 2816 -11540 5120 -11541 7680 -11542 7680 -11543 21504 -11544 21504 -11545 10192 -11546 2688 -11547 5376 -11548 3136 -11549 16384 -11550 14336 -11551 14336 -11552 21504 -11553 12544 -11554 12544 -11555 12544 -11556 2688 -11557 2688 -11558 11760 -11559 9984 -11560 6144 -11561 6048 -11562 8736 -11563 14336 -11564 7680 -11565 5760 -11566 7840 -11567 7168 -11568 5632 -11569 4680 -11570 6720 -11571 6720 -11572 6720 -11573 9984 -11574 22528 -11575 7680 -11576 5632 -11577 2560 -11578 12672 -11579 9216 -11580 14080 -11581 11088 -11582 5760 -11583 1920 -11584 560 -11585 6144 -11586 11520 -11587 6144 -11588 6144 -11589 6048 -11590 5184 -11591 5184 -11592 5760 -11593 6912 -11594 2016 -11595 2640 -11596 2640 -11597 2160 -11598 6720 -11599 6776 -11600 6720 -11601 3520 -11602 16640 -11603 16640 -11604 16640 -11605 16640 -11606 3024 -11607 14336 -11608 18432 -11609 8192 -11610 6912 -11611 9216 -11612 4160 -11613 6240 -11614 6240 -11615 7488 -11616 7488 -11617 7200 -11618 7200 -11619 16224 -11620 16224 -11621 19712 -11622 23040 -11623 7920 -11624 2640 -11625 14336 -11626 18432 -11627 2304 -11628 7680 -11629 10752 -11630 12288 -11631 12288 -11632 12672 -11633 7680 -11634 6656 -11635 8736 -11636 8736 -11637 8064 -11638 8064 -11639 7392 -11640 3840 -11641 21504 -11642 21504 -11643 12672 -11644 9216 -11645 14080 -11646 3840 -11647 10800 -11648 4992 -11649 4608 -11650 4608 -11651 4368 -11652 4032 -11653 4032 -11654 6912 -11655 8064 -11656 6912 -11657 6720 -11658 6272 -11659 18432 -11660 20480 -11661 3584 -11662 3584 -11663 13312 -11664 9984 -11665 9984 -11666 2592 -11667 8960 -11668 8960 -11669 7920 -11670 6720 -11671 6240 -11672 6240 -11673 7168 -11674 7168 -11675 7168 -11676 7168 -11677 4928 -11678 4928 -11679 4928 -11680 4928 -11681 4480 -11682 4480 -11683 4160 -11684 4160 -11685 4992 -11686 3072 -11687 5376 -11688 4608 -11689 6144 -11690 3072 -11691 6144 -11692 5376 -11693 4608 -11694 6720 -11695 6656 -11696 2160 -11697 6144 -11698 6144 -11699 4608 -11700 4608 -11701 13824 -11702 1600 -11703 4096 -11704 5120 -11705 5376 -11706 6656 -11707 6656 -11708 5120 -11709 10080 -11710 1536 -11711 10080 -11712 10752 -11713 5760 -11714 4480 -11715 23040 -11716 9504 -11717 9216 -11718 9152 -11719 5376 -11720 7040 -11721 7040 -11722 7680 -11723 4608 -11724 12480 -11725 14976 -11726 14976 -11727 14976 -11728 14976 -11729 3840 -11730 3840 -11731 11520 -11732 5880 -11733 6336 -11734 12544 -11735 6720 -11736 16384 -11737 16384 -11738 17280 -11739 2880 -11740 1680 -11741 16224 -11742 16224 -11743 1600 -11744 17248 -11745 7680 -11746 10752 -11747 8448 -11748 8448 -11749 2880 -11750 8960 -11751 5544 -11752 6720 -11753 12096 -11754 5760 -11755 5760 -11756 6912 -11757 2688 -11758 6272 -11759 3840 -11760 5280 -11761 6144 -11762 5760 -11763 4608 -11764 4608 -11765 14976 -11766 10752 -11767 11520 -11768 6912 -11769 3456 -11770 2800 -11771 8192 -11772 6912 -11773 9216 -11774 2400 -11775 17280 -11776 7680 -11777 7920 -11778 3168 -11779 3168 -11780 8064 -11781 6144 -11782 6400 -11783 14080 -11784 8448 -11785 10080 -11786 12672 -11787 9216 -11788 9600 -11789 7680 -11790 11088 -11791 21504 -11792 13824 -11793 13824 -11794 9984 -11795 9984 -11796 11232 -11797 4320 -11798 11648 -11799 9856 -11800 9984 -11801 9984 -11802 2816 -11803 6720 -11804 25088 -11805 25088 -11806 25088 -11807 25088 -11808 18816 -11809 18816 -11810 21504 -11811 21504 -11812 20384 -11813 17472 -11814 17472 -11815 7680 -11816 13312 -11817 9984 -11818 9984 -11819 6720 -11820 6048 -11821 7040 -11822 6336 -11823 14976 -11824 6656 -11825 6656 -11826 6656 -11827 6656 -11828 5376 -11829 5376 -11830 3840 -11831 3840 -11832 4224 -11833 1600 -11834 6144 -11835 6144 -11836 5760 -11837 5760 -11838 3072 -11839 3072 -11840 2304 -11841 3840 -11842 3840 -11843 4224 -11844 4224 -11845 3072 -11846 3072 -11847 13440 -11848 12320 -11849 8008 -11850 8008 -11851 3744 -11852 2160 -11853 576 -11854 576 -11855 2240 -11856 8192 -11857 8192 -11858 8192 -11859 6912 -11860 5120 -11861 5376 -11862 5376 -11863 5376 -11864 5376 -11865 5616 -11866 5616 -11867 6240 -11868 5760 -11869 13824 -11870 13824 -11871 13824 -11872 13824 -11873 13824 -11874 13824 -11875 13824 -11876 13824 -11877 13824 -11878 5760 -11879 3456 -11880 3456 -11881 13824 -11882 9216 -11883 4608 -11884 4800 -11885 6864 -11886 4320 -11887 2592 -11888 3328 -11889 3072 -11890 3072 -11891 2520 -11892 8320 -11893 11520 -11894 10560 -11895 6720 -11896 11520 -11897 6144 -11898 6144 -11899 6144 -11900 2592 -11901 14336 -11902 10752 -11903 19712 -11904 7680 -11905 10752 -11906 10560 -11907 10752 -11908 12480 -11909 3920 -11910 4608 -11911 4752 -11912 6912 -11913 6144 -11914 6144 -11915 3600 -11916 8960 -11917 1280 -11918 10560 -11919 11520 -11920 16640 -11921 7488 -11922 2240 -11923 240 -11924 6144 -11925 6144 -11926 7776 -11927 7680 -11928 6160 -11929 2880 -11930 10976 -11931 6272 -11932 3528 -11933 2880 -11934 8064 -11935 12544 -11936 12544 -11937 1920 -11938 5184 -11939 4320 -11940 1728 -11941 6480 -11942 6048 -11943 6720 -11944 12288 -11945 12288 -11946 7200 -11947 7200 -11948 7200 -11949 7200 -11950 7680 -11951 7680 -11952 8064 -11953 4608 -11954 5760 -11955 1944 -11956 5120 -11957 8640 -11958 7776 -11959 7776 -11960 22528 -11961 23040 -11962 2880 -11963 3072 -11964 10560 -11965 14080 -11966 19712 -11967 14976 -11968 14976 -11969 16640 -11970 1760 -11971 17472 -11972 17472 -11973 18304 -11974 6400 -11975 6912 -11976 11616 -11977 11520 -11978 10400 -11979 8712 -11980 8448 -11981 8448 -11982 4800 -11983 4224 -11984 8448 -11985 8640 -11986 8192 -11987 8192 -11988 3840 -11989 3840 -11990 4224 -11991 3328 -11992 3328 -11993 6272 -11994 5376 -11995 3328 -11996 3328 -11997 3072 -11998 7168 -11999 3840 -12000 3584 -12001 3584 -12002 3584 -12003 6144 -12004 4096 -12005 4096 -12006 4608 -12007 4608 -12008 4992 -12009 2304 -12010 3872 -12011 3840 -12012 7200 -12013 6720 -12014 3744 -12015 1584 -12016 3432 -12017 4928 -12018 2880 -12019 2816 -12020 1152 -12021 5376 -12022 5376 -12023 5376 -12024 5376 -12025 5376 -12026 5376 -12027 4928 -12028 4928 -12029 4928 -12030 4928 -12031 5376 -12032 4800 -12033 4480 -12034 6144 -12035 6144 -12036 6144 -12037 6144 -12038 6144 -12039 6144 -12040 6144 -12041 4608 -12042 4608 -12043 8192 -12044 7680 -12045 7680 -12046 11520 -12047 17920 -12048 17920 -12049 17920 -12050 2304 -12051 2240 -12052 2240 -12053 2240 -12054 1920 -12055 2688 -12056 2240 -12057 2240 -12058 2160 -12059 2496 -12060 6048 -12061 7560 -12062 7056 -12063 7056 -12064 7056 -12065 10560 -12066 11264 -12067 11264 -12068 11264 -12069 8192 -12070 8192 -12071 12288 -12072 16224 -12073 3072 -12074 4320 -12075 720 -12076 8320 -12077 8320 -12078 5376 -12079 6720 -12080 13824 -12081 3456 -12082 3456 -12083 3744 -12084 1920 -12085 3000 -12086 3000 -12087 3000 -12088 3000 -12089 3000 -12090 3000 -12091 3000 -12092 2800 -12093 2800 -12094 13824 -12095 4800 -12096 9856 -12097 7200 -12098 9984 -12099 9984 -12100 5376 -12101 18432 -12102 18432 -12103 4800 -12104 14080 -12105 15360 -12106 3840 -12107 6144 -12108 6144 -12109 5120 -12110 1584 -12111 1584 -12112 3920 -12113 7200 -12114 7200 -12115 16224 -12116 16224 -12117 1920 -12118 3840 -12119 3920 -12120 11232 -12121 14976 -12122 7680 -12123 10368 -12124 2496 -12125 2304 -12126 8736 -12127 8736 -12128 8736 -12129 3920 -12130 9216 -12131 3456 -12132 3456 -12133 3888 -12134 3920 -12135 6048 -12136 10752 -12137 12480 -12138 6144 -12139 6144 -12140 8960 -12141 7680 -12142 7680 -12143 10752 -12144 10752 -12145 10752 -12146 10752 -12147 9408 -12148 9408 -12149 10752 -12150 9216 -12151 5760 -12152 360 -12153 672 -12154 5760 -12155 6912 -12156 21504 -12157 4320 -12158 6144 -12159 5120 -12160 4608 -12161 2880 -12162 2880 -12163 2880 -12164 11520 -12165 12288 -12166 20480 -12167 1920 -12168 1920 -12169 8640 -12170 8640 -12171 8000 -12172 13312 -12173 9984 -12174 9984 -12175 3584 -12176 3584 -12177 12096 -12178 12544 -12179 12544 -12180 12544 -12181 16384 -12182 16384 -12183 10296 -12184 9152 -12185 9152 -12186 6400 -12187 9152 -12188 7280 -12189 7488 -12190 6240 -12191 6240 -12192 9152 -12193 9216 -12194 8640 -12195 4608 -12196 4608 -12197 5376 -12198 3328 -12199 3072 -12200 3072 -12201 6144 -12202 6144 -12203 1760 -12204 1760 -12205 2112 -12206 2112 -12207 3072 -12208 5376 -12209 5376 -12210 4992 -12211 4992 -12212 17472 -12213 14400 -12214 13200 -12215 28672 -12216 28672 -12217 28672 -12218 6912 -12219 8640 -12220 6400 -12221 1152 -12222 5632 -12223 10560 -12224 11264 -12225 11264 -12226 11264 -12227 8192 -12228 1200 -12229 5760 -12230 11616 -12231 5760 -12232 2592 -12233 11520 -12234 2016 -12235 5376 -12236 5376 -12237 5376 -12238 5376 -12239 5376 -12240 5376 -12241 5376 -12242 6144 -12243 6144 -12244 6144 -12245 6144 -12246 6144 -12247 6144 -12248 6144 -12249 4608 -12250 4608 -12251 20480 -12252 19200 -12253 19200 -12254 4224 -12255 4224 -12256 2688 -12257 7680 -12258 5760 -12259 5760 -12260 3072 -12261 7680 -12262 2080 -12263 1584 -12264 768 -12265 768 -12266 768 -12267 896 -12268 768 -12269 768 -12270 1728 -12271 2304 -12272 2240 -12273 1232 -12274 4096 -12275 1280 -12276 1600 -12277 15488 -12278 15488 -12279 4608 -12280 2048 -12281 8064 -12282 2080 -12283 7680 -12284 7168 -12285 4320 -12286 5632 -12287 7488 -12288 4992 -12289 4992 -12290 6144 -12291 6144 -12292 2400 -12293 1536 -12294 896 -12295 896 -12296 896 -12297 768 -12298 4608 -12299 5760 -12300 3168 -12301 4320 -12302 3072 -12303 3072 -12304 3072 -12305 3072 -12306 3072 -12307 3072 -12308 3072 -12309 2304 -12310 2304 -12311 3840 -12312 9216 -12313 13824 -12314 6720 -12315 4928 -12316 5544 -12317 6400 -12318 6144 -12319 6144 -12320 8000 -12321 7040 -12322 24960 -12323 6240 -12324 5376 -12325 5376 -12326 9408 -12327 3960 -12328 8400 -12329 3600 -12330 4704 -12331 8112 -12332 8112 -12333 8112 -12334 7392 -12335 7392 -12336 11520 -12337 5040 -12338 5376 -12339 3456 -12340 3456 -12341 3456 -12342 3456 -12343 2880 -12344 2880 -12345 2880 -12346 2880 -12347 4800 -12348 576 -12349 3200 -12350 3840 -12351 2400 -12352 3840 -12353 4608 -12354 3840 -12355 6480 -12356 6720 -12357 13824 -12358 1728 -12359 5824 -12360 5400 -12361 12168 -12362 23040 -12363 16384 -12364 16384 -12365 560 -12366 480 -12367 1920 -12368 14560 -12369 12480 -12370 12480 -12371 800 -12372 15600 -12373 6720 -12374 6656 -12375 6656 -12376 4992 -12377 4992 -12378 2304 -12379 3456 -12380 3328 -12381 3328 -12382 3328 -12383 3328 -12384 3072 -12385 6144 -12386 5376 -12387 4608 -12388 14080 -12389 4160 -12390 864 -12391 14336 -12392 5616 -12393 8192 -12394 8192 -12395 8192 -12396 8640 -12397 1680 -12398 15360 -12399 9152 -12400 7280 -12401 5616 -12402 4096 -12403 4096 -12404 4096 -12405 3456 -12406 6144 -12407 6144 -12408 5376 -12409 4096 -12410 4096 -12411 6144 -12412 4928 -12413 8448 -12414 8448 -12415 9680 -12416 4032 -12417 21120 -12418 14336 -12419 10752 -12420 10752 -12421 11520 -12422 10240 -12423 7680 -12424 7680 -12425 6336 -12426 1872 -12427 1728 -12428 4480 -12429 4480 -12430 4480 -12431 4480 -12432 5376 -12433 5280 -12434 4928 -12435 6144 -12436 7168 -12437 7168 -12438 7168 -12439 6144 -12440 7168 -12441 4608 -12442 5120 -12443 4608 -12444 4800 -12445 7168 -12446 9600 -12447 9600 -12448 9600 -12449 9856 -12450 1440 -12451 1536 -12452 1536 -12453 4096 -12454 6720 -12455 7168 -12456 7168 -12457 7168 -12458 15360 -12459 15360 -12460 15360 -12461 13200 -12462 13440 -12463 4480 -12464 3840 -12465 3840 -12466 3840 -12467 3840 -12468 3840 -12469 4800 -12470 4800 -12471 4160 -12472 5760 -12473 8192 -12474 7680 -12475 7680 -12476 8640 -12477 17472 -12478 15360 -12479 3456 -12480 3456 -12481 2880 -12482 576 -12483 2464 -12484 1024 -12485 1600 -12486 8320 -12487 8320 -12488 14976 -12489 6048 -12490 2304 -12491 2048 -12492 16896 -12493 13440 -12494 13200 -12495 13200 -12496 12960 -12497 4096 -12498 3072 -12499 2240 -12500 2240 -12501 2080 -12502 2080 -12503 3456 -12504 3168 -12505 3168 -12506 1920 -12507 768 -12508 768 -12509 3744 -12510 8064 -12511 11088 -12512 5280 -12513 2400 -12514 2240 -12515 2240 -12516 2240 -12517 2240 -12518 2240 -12519 3360 -12520 5280 -12521 3840 -12522 6336 -12523 6336 -12524 8448 -12525 4752 -12526 5632 -12527 6400 -12528 5120 -12529 11264 -12530 1080 -12531 1600 -12532 19800 -12533 12480 -12534 5184 -12535 432 -12536 7392 -12537 7056 -12538 2016 -12539 6400 -12540 7680 -12541 4096 -12542 3072 -12543 3072 -12544 5632 -12545 576 -12546 3072 -12547 2592 -12548 4032 -12549 3456 -12550 3456 -12551 8448 -12552 5184 -12553 4320 -12554 15360 -12555 6656 -12556 6656 -12557 6656 -12558 7168 -12559 3584 -12560 3584 -12561 9856 -12562 7680 -12563 4992 -12564 6144 -12565 6144 -12566 6144 -12567 5824 -12568 5632 -12569 4608 -12570 4800 -12571 3520 -12572 3840 -12573 4576 -12574 4576 -12575 6720 -12576 7168 -12577 7168 -12578 7168 -12579 4224 -12580 4224 -12581 2688 -12582 12800 -12583 10560 -12584 4096 -12585 3840 -12586 16896 -12587 9600 -12588 72 -12589 4608 -12590 4608 -12591 4608 -12592 4608 -12593 6144 -12594 4608 -12595 4608 -12596 8960 -12597 14400 -12598 13440 -12599 4320 -12600 4032 -12601 4032 -12602 4576 -12603 4800 -12604 4608 -12605 5632 -12606 5632 -12607 4032 -12608 4096 -12609 4096 -12610 7200 -12611 23296 -12612 23296 -12613 5760 -12614 5760 -12615 5760 -12616 5760 -12617 5760 -12618 4320 -12619 4320 -12620 960 -12621 4320 -12622 5280 -12623 10800 -12624 5616 -12625 5616 -12626 6240 -12627 648 -12628 3072 -12629 7168 -12630 12544 -12631 1920 -12632 6912 -12633 5120 -12634 2016 -12635 2688 -12636 2048 -12637 96 -12638 10816 -12639 2560 -12640 5120 -12641 1536 -12642 3840 -12643 1920 -12644 1920 -12645 1920 -12646 1680 -12647 1680 -12648 1680 -12649 1680 -12650 1680 -12651 1680 -12652 1280 -12653 1280 -12654 1280 -12655 1280 -12656 1152 -12657 1152 -12658 4320 -12659 3072 -12660 3072 -12661 3072 -12662 3072 -12663 3072 -12664 3072 -12665 3072 -12666 2304 -12667 2304 -12668 3168 -12669 17280 -12670 17280 -12671 13824 -12672 13824 -12673 13824 -12674 13824 -12675 13824 -12676 13824 -12677 13824 -12678 13824 -12679 13824 -12680 13824 -12681 8064 -12682 12672 -12683 5720 -12684 7168 -12685 7168 -12686 7040 -12687 6048 -12688 5184 -12689 5184 -12690 3200 -12691 6912 -12692 384 -12693 800 -12694 5760 -12695 960 -12696 2304 -12697 4224 -12698 2816 -12699 2816 -12700 1920 -12701 6656 -12702 3024 -12703 4608 -12704 8640 -12705 12544 -12706 6912 -12707 4800 -12708 4480 -12709 6144 -12710 7168 -12711 6272 -12712 3520 -12713 3840 -12714 4096 -12715 6144 -12716 4800 -12717 4320 -12718 4320 -12719 4608 -12720 7168 -12721 7168 -12722 5120 -12723 5632 -12724 19200 -12725 17920 -12726 17920 -12727 4096 -12728 5376 -12729 8192 -12730 10240 -12731 10240 -12732 10240 -12733 10560 -12734 72 -12735 5120 -12736 5120 -12737 5120 -12738 11520 -12739 576 -12740 576 -12741 23296 -12742 3840 -12743 2880 -12744 2560 -12745 15360 -12746 8960 -12747 4800 -12748 6144 -12749 6912 -12750 2880 -12751 8960 -12752 3840 -12753 5376 -12754 5376 -12755 8424 -12756 11088 -12757 5280 -12758 12672 -12759 13824 -12760 12096 -12761 12096 -12762 16128 -12763 16128 -12764 16128 -12765 16128 -12766 16128 -12767 16128 -12768 16128 -12769 16128 -12770 12096 -12771 12096 -12772 1440 -12773 1440 -12774 12672 -12775 3360 -12776 448 -12777 3072 -12778 2304 -12779 4608 -12780 2048 -12781 6048 -12782 9856 -12783 9984 -12784 4608 -12785 4800 -12786 1920 -12787 9600 -12788 9600 -12789 4096 -12790 12800 -12791 10560 -12792 4928 -12793 4576 -12794 2464 -12795 8064 -12796 9216 -12797 9216 -12798 5376 -12799 6144 -12800 6144 -12801 4608 -12802 5632 -12803 5632 -12804 8064 -12805 3840 -12806 2688 -12807 15360 -12808 3960 -12809 7200 -12810 6400 -12811 3456 -12812 6656 -12813 3840 -12814 3840 -12815 5600 -12816 1920 -12817 1920 -12818 3168 -12819 3200 -12820 2112 -12821 6240 -12822 16640 -12823 1320 -12824 1408 -12825 320 -12826 4576 -12827 4576 -12828 4576 -12829 4576 -12830 12672 -12831 5760 -12832 6336 -12833 6336 -12834 2016 -12835 720 -12836 5632 -12837 1920 -12838 2600 -12839 6400 -12840 6144 -12841 4608 -12842 4608 -12843 2880 -12844 12800 -12845 12672 -12846 7840 -12847 8008 -12848 8064 -12849 8064 -12850 3072 -12851 3072 -12852 7840 -12853 8008 -12854 4608 -12855 7200 -12856 7200 -12857 2560 -12858 2560 -12859 1792 -12860 4320 -12861 4160 -12862 4608 -12863 1440 -12864 9504 -12865 4400 -12866 6144 -12867 288 -12868 288 -12869 96 -12870 5120 -12871 5280 -12872 4608 -12873 1920 -12874 11520 -12875 6400 -12876 12544 -12877 6336 -12878 12544 -12879 7680 -12880 7920 -12881 512 -12882 7280 -12883 6160 -12884 2400 -12885 11088 -12886 14560 -12887 3960 -12888 768 -12889 5280 -12890 96 -12891 160 -12892 1152 -12893 6552 -12894 9984 -12895 9984 -12896 9984 -12897 11760 -12898 11760 -12899 11760 -12900 11760 -12901 11760 -12902 11760 -12903 11760 -12904 10976 -12905 10976 -12906 10976 -12907 10976 -12908 4096 -12909 4096 -12910 4096 -12911 4096 -12912 4096 -12913 4096 -12914 4096 -12915 4096 -12916 3072 -12917 3072 -12918 2048 -12919 2048 -12920 2048 -12921 2048 -12922 2048 -12923 2048 -12924 2048 -12925 2048 -12926 1792 -12927 1792 -12928 5376 -12929 5120 -12930 5120 -12931 5120 -12932 5120 -12933 5120 -12934 5120 -12935 5120 -12936 5120 -12937 5120 -12938 5120 -12939 5120 -12940 5120 -12941 5120 -12942 10752 -12943 8192 -12944 8192 -12945 8192 -12946 8192 -12947 8192 -12948 8192 -12949 8192 -12950 8192 -12951 8192 -12952 8192 -12953 8192 -12954 7168 -12955 7168 -12956 7168 -12957 7168 -12958 8192 -12959 8192 -12960 8192 -12961 8192 -12962 8192 -12963 8192 -12964 8192 -12965 8192 -12966 8192 -12967 8192 -12968 8192 -12969 8192 -12970 8192 -12971 2048 -12972 2048 -12973 2048 -12974 2048 -12975 2048 -12976 2048 -12977 2048 -12978 2048 -12979 2048 -12980 2048 -12981 2048 -12982 2048 -12983 2048 -12984 2048 -12985 2048 -12986 2048 -12987 2048 -12988 2048 -12989 2048 -12990 2048 -12991 2048 -12992 2048 -12993 2048 -12994 2048 -12995 2048 -12996 2048 -12997 1024 -12998 1024 -12999 1024 -13000 1024 -13001 1024 -13002 1024 -13003 1024 -13004 1024 -13005 1024 -13006 896 -13007 896 -13008 896 -13009 896 -13010 12544 -13011 12544 -13012 14336 -13013 14336 -13014 14336 -13015 14336 -13016 14336 -13017 14336 -13018 14336 -13019 14336 -13020 14336 -13021 14336 -13022 14336 -13023 12544 -13024 12544 -13025 12544 -13026 12544 -13027 1024 -13028 1024 -13029 1024 -13030 1024 -13031 1024 -13032 1024 -13033 1024 -13034 896 -13035 896 -13036 896 -13037 896 -13038 896 -13039 896 -13040 1280 -13041 1280 -13042 1280 -13043 1280 -13044 1280 -13045 1280 -13046 1280 -13047 1280 -13048 1280 -13049 1280 -13050 1280 -13051 1280 -13052 1280 -13053 17472 -13054 17472 -13055 19968 -13056 19968 -13057 19968 -13058 19968 -13059 19968 -13060 19968 -13061 19968 -13062 19968 -13063 19968 -13064 19968 -13065 19968 -13066 17472 -13067 17472 -13068 17472 -13069 17472 -13070 7840 -13071 7680 -13072 7680 -13073 7680 -13074 7680 -13075 7680 -13076 7680 -13077 7680 -13078 7680 -13079 7680 -13080 7680 -13081 6720 -13082 6720 -13083 6720 -13084 6720 -13085 6144 -13086 6144 -13087 6144 -13088 6144 -13089 6144 -13090 6144 -13091 6144 -13092 4608 -13093 4608 -13094 4096 -13095 4096 -13096 4096 -13097 3584 -13098 3584 -13099 3584 -13100 3584 -13101 1536 -13102 1536 -13103 1536 -13104 1536 -13105 1536 -13106 2304 -13107 2304 -13108 2304 -13109 2304 -13110 10752 -13111 10752 -13112 10752 -13113 10752 -13114 10752 -13115 10752 -13116 2048 -13117 2048 -13118 2048 -13119 2048 -13120 2048 -13121 2048 -13122 2048 -13123 1024 -13124 1024 -13125 1024 -13126 1024 -13127 1024 -13128 1024 -13129 4096 -13130 4096 -13131 4096 -13132 4096 -13133 4096 -13134 4096 -13135 4096 -13136 3072 -13137 3072 -13138 3072 -13139 3072 -13140 3072 -13141 2688 -13142 2688 -13143 2688 -13144 2688 -13145 2048 -13146 2048 -13147 2048 -13148 1792 -13149 1792 -13150 1792 -13151 1792 -13152 12288 -13153 12288 -13154 12288 -13155 12288 -13156 12288 -13157 12288 -13158 12288 -13159 12288 -13160 12288 -13161 12288 -13162 12288 -13163 12288 -13164 12288 -13165 12288 -13166 2048 -13167 2048 -13168 2048 -13169 2048 -13170 2048 -13171 2048 -13172 2048 -13173 2048 -13174 2048 -13175 2048 -13176 2048 -13177 2048 -13178 2048 -13179 16128 -13180 16128 -13181 15360 -13182 15360 -13183 15360 -13184 15360 -13185 15360 -13186 15360 -13187 15360 -13188 15360 -13189 15360 -13190 15360 -13191 15360 -13192 15360 -13193 13440 -13194 13440 -13195 10752 -13196 10752 -13197 10752 -13198 10752 -13199 9408 -13200 9408 -13201 9408 -13202 9408 -13203 9408 -13204 9408 -13205 10752 -13206 10752 -13207 10752 -13208 10752 -13209 10752 -13210 10752 -13211 10752 -13212 10752 -13213 10752 -13214 10752 -13215 10752 -13216 9408 -13217 9408 -13218 9408 -13219 9408 -13220 2048 -13221 2048 -13222 2048 -13223 2048 -13224 2048 -13225 2048 -13226 2048 -13227 1792 -13228 1792 -13229 1792 -13230 1792 -13231 1792 -13232 1792 -13233 1024 -13234 1024 -13235 1024 -13236 1024 -13237 1024 -13238 1024 -13239 1024 -13240 1024 -13241 1024 -13242 1024 -13243 768 -13244 768 -13245 8960 -13246 16128 -13247 16128 -13248 16128 -13249 16128 -13250 16128 -13251 16128 -13252 16128 -13253 16128 -13254 16128 -13255 16128 -13256 16128 -13257 16128 -13258 8192 -13259 8192 -13260 8192 -13261 8192 -13262 8192 -13263 8192 -13264 8192 -13265 8192 -13266 8192 -13267 8192 -13268 8192 -13269 8192 -13270 2240 -13271 2048 -13272 2048 -13273 2048 -13274 2048 -13275 2048 -13276 2048 -13277 2048 -13278 2048 -13279 2048 -13280 2048 -13281 1792 -13282 1792 -13283 768 -13284 768 -13285 768 -13286 768 -13287 768 -13288 768 -13289 5120 -13290 5120 -13291 5120 -13292 5120 -13293 5120 -13294 5120 -13295 5120 -13296 5120 -13297 5120 -13298 5120 -13299 5120 -13300 5120 -13301 8192 -13302 8192 -13303 8192 -13304 8192 -13305 8192 -13306 8192 -13307 8192 -13308 8192 -13309 8192 -13310 8192 -13311 8192 -13312 7168 -13313 7168 -13314 7168 -13315 7168 -13316 7168 -13317 7168 -13318 7168 -13319 7168 -13320 7168 -13321 7168 -13322 7168 -13323 7168 -13324 7168 -13325 3072 -13326 3072 -13327 3072 -13328 3072 -13329 3072 -13330 3072 -13331 3072 -13332 3072 -13333 3072 -13334 3072 -13335 3072 -13336 3072 -13337 4096 -13338 4096 -13339 4096 -13340 4096 -13341 4096 -13342 4096 -13343 4096 -13344 4096 -13345 3584 -13346 3584 -13347 3584 -13348 3584 -13349 6144 -13350 6144 -13351 6144 -13352 6144 -13353 6144 -13354 6144 -13355 6144 -13356 6144 -13357 6144 -13358 6144 -13359 6144 -13360 6144 -13361 4096 -13362 4096 -13363 4096 -13364 4096 -13365 4096 -13366 4096 -13367 4096 -13368 4096 -13369 3584 -13370 3584 -13371 3584 -13372 3584 -13373 19712 -13374 19712 -13375 19712 -13376 19712 -13377 19712 -13378 19712 -13379 17248 -13380 17248 -13381 17248 -13382 17248 -13383 17248 -13384 17248 -13385 1536 -13386 1024 -13387 1024 -13388 1024 -13389 1024 -13390 1024 -13391 1024 -13392 1024 -13393 1024 -13394 1024 -13395 1024 -13396 1024 -13397 256 -13398 256 -13399 256 -13400 256 -13401 256 -13402 224 -13403 224 -13404 224 -13405 224 -13406 224 -13407 224 -13408 2560 -13409 2560 -13410 2560 -13411 2560 -13412 2560 -13413 2560 -13414 2560 -13415 2560 -13416 2560 -13417 2560 -13418 1920 -13419 1920 -13420 384 -13421 384 -13422 384 -13423 384 -13424 384 -13425 384 -13426 384 -13427 384 -13428 384 -13429 384 -13430 1792 -13431 1792 -13432 1792 -13433 1792 -13434 1792 -13435 1792 -13436 1792 -13437 1792 -13438 1792 -13439 1792 -13440 1792 -13441 768 -13442 768 -13443 1536 -13444 1536 -13445 1536 -13446 1536 -13447 1536 -13448 1536 -13449 1536 -13450 1536 -13451 1536 -13452 1536 -13453 1536 -13454 7680 -13455 10368 -13456 9216 -13457 9216 -13458 9216 -13459 9216 -13460 9216 -13461 9216 -13462 9216 -13463 9216 -13464 9216 -13465 9216 -13466 9216 -13467 4680 -13468 7392 -13469 7392 -13470 11648 -13471 11648 -13472 10976 -13473 6480 -13474 6720 -13475 6144 -13476 8736 -13477 8064 -13478 8736 -13479 6400 -13480 8624 -13481 7392 -13482 7392 -13483 10752 -13484 10752 -13485 10752 -13486 9408 -13487 9408 -13488 10976 -13489 6720 -13490 5600 -13491 5600 -13492 15360 -13493 5824 -13494 6048 -13495 6272 -13496 10752 -13497 12600 -13498 4032 -13499 7200 -13500 8064 -13501 9856 -13502 6720 -13503 6720 -13504 7200 -13505 6480 -13506 6480 -13507 5760 -13508 5376 -13509 8960 -13510 8960 -13511 8960 -13512 5280 -13513 5184 -13514 5184 -13515 5040 -13516 7392 -13517 7392 -13518 13440 -13519 10192 -13520 10192 -13521 9408 -13522 10752 -13523 10752 -13524 10752 -13525 10752 -13526 10752 -13527 10752 -13528 10752 -13529 9408 -13530 9408 -13531 9408 -13532 9408 -13533 5824 -13534 5376 -13535 10976 -13536 10080 -13537 9408 -13538 9408 -13539 6656 -13540 9216 -13541 8640 -13542 9600 -13543 9600 -13544 8736 -13545 8064 -13546 8736 -13547 8064 -13548 8064 -13549 7168 -13550 7168 -13551 4608 -13552 7056 -13553 2688 -13554 2688 -13555 2496 -13556 2496 -13557 8008 -13558 7392 -13559 7392 -13560 8064 -13561 8064 -13562 6144 -13563 6144 -13564 6144 -13565 4608 -13566 4608 -13567 9216 -13568 9216 -13569 6272 -13570 5376 -13571 5376 -13572 4200 -13573 4200 -13574 4032 -13575 4032 -13576 4032 -13577 4032 -13578 11760 -13579 10080 -13580 10080 -13581 10080 -13582 10080 -13583 10080 -13584 10080 -13585 3584 -13586 3584 -13587 3584 -13588 3584 -13589 3136 -13590 3136 -13591 3136 -13592 3136 -13593 3136 -13594 3136 -13595 2400 -13596 2400 -13597 2400 -13598 2400 -13599 2400 -13600 2400 -13601 2400 -13602 2240 -13603 2016 -13604 2016 -13605 13440 -13606 13440 -13607 13440 -13608 13440 -13609 13440 -13610 13440 -13611 13440 -13612 13440 -13613 13440 -13614 13440 -13615 13440 -13616 9464 -13617 9464 -13618 9464 -13619 9408 -13620 9408 -13621 9408 -13622 8736 -13623 8736 -13624 5880 -13625 5880 -13626 5880 -13627 5488 -13628 4200 -13629 3920 -13630 3920 -13631 3920 -13632 2688 -13633 2688 -13634 2688 -13635 6720 -13636 6720 -13637 8320 -13638 8320 -13639 5184 -13640 5184 -13641 4800 -13642 6144 -13643 9216 -13644 9216 -13645 9216 -13646 7200 -13647 7200 -13648 7200 -13649 6720 -13650 7392 -13651 11520 -13652 11520 -13653 11520 -13654 11520 -13655 12544 -13656 12544 -13657 12544 -13658 12544 -13659 12544 -13660 12544 -13661 11760 -13662 11760 -13663 12600 -13664 11760 -13665 11760 -13666 6720 -13667 6720 -13668 6720 -13669 6720 -13670 6720 -13671 6720 -13672 6720 -13673 6272 -13674 6272 -13675 1920 -13676 1920 -13677 1920 -13678 1920 -13679 1920 -13680 1920 -13681 9856 -13682 9856 -13683 7392 -13684 8448 -13685 8448 -13686 8640 -13687 8640 -13688 9408 -13689 9464 -13690 8640 -13691 8640 -13692 10752 -13693 10752 -13694 10752 -13695 10752 -13696 10752 -13697 10752 -13698 9408 -13699 9408 -13700 5760 -13701 5600 -13702 5600 -13703 5600 -13704 4800 -13705 13824 -13706 7680 -13707 11520 -13708 11520 -13709 8192 -13710 8192 -13711 8192 -13712 8192 -13713 5632 -13714 5632 -13715 11520 -13716 11520 -13717 8736 -13718 8736 -13719 11520 -13720 8736 -13721 8736 -13722 20160 -13723 14976 -13724 14976 -13725 14976 -13726 7392 -13727 6864 -13728 6864 -13729 7680 -13730 11520 -13731 3456 -13732 3456 -13733 6912 -13734 6912 -13735 7680 -13736 4992 -13737 4992 -13738 24576 -13739 21504 -13740 21504 -13741 6912 -13742 8960 -13743 8448 -13744 13824 -13745 6720 -13746 5760 -13747 5760 -13748 7392 -13749 21504 -13750 9216 -13751 12288 -13752 10368 -13753 7488 -13754 7488 -13755 7488 -13756 7488 -13757 21504 -13758 11520 -13759 13824 -13760 13824 -13761 13824 -13762 24576 -13763 11200 -13764 6760 -13765 4928 -13766 4928 -13767 4928 -13768 4928 -13769 5376 -13770 5376 -13771 4992 -13772 4992 -13773 7168 -13774 6144 -13775 7168 -13776 6144 -13777 7168 -13778 5120 -13779 7168 -13780 7168 -13781 12096 -13782 10368 -13783 10296 -13784 9984 -13785 18432 -13786 18432 -13787 11520 -13788 13440 -13789 9216 -13790 12288 -13791 10368 -13792 7680 -13793 16896 -13794 13824 -13795 11520 -13796 11232 -13797 11232 -13798 28672 -13799 28672 -13800 28672 -13801 28672 -13802 28672 -13803 28672 -13804 28672 -13805 28672 -13806 21504 -13807 21504 -13808 21504 -13809 21504 -13810 7920 -13811 7168 -13812 7168 -13813 4608 -13814 4608 -13815 3456 -13816 4608 -13817 4608 -13818 4608 -13819 4608 -13820 14784 -13821 9216 -13822 9216 -13823 9216 -13824 6240 -13825 6240 -13826 18432 -13827 5120 -13828 12480 -13829 14336 -13830 11520 -13831 13440 -13832 5184 -13833 6912 -13834 6912 -13835 9216 -13836 8640 -13837 7200 -13838 6720 -13839 6912 -13840 8640 -13841 8640 -13842 3456 -13843 16640 -13844 16640 -13845 19968 -13846 19968 -13847 7680 -13848 12672 -13849 9504 -13850 9504 -13851 5280 -13852 9504 -13853 4608 -13854 4608 -13855 7680 -13856 7168 -13857 7168 -13858 7168 -13859 8192 -13860 8192 -13861 4992 -13862 4992 -13863 4224 -13864 3168 -13865 5376 -13866 5376 -13867 5376 -13868 5376 -13869 5376 -13870 5376 -13871 5376 -13872 5376 -13873 5376 -13874 5376 -13875 5376 -13876 5376 -13877 12288 -13878 11520 -13879 11520 -13880 2688 -13881 2688 -13882 2688 -13883 2304 -13884 2688 -13885 2688 -13886 14080 -13887 14080 -13888 14080 -13889 16384 -13890 16384 -13891 8064 -13892 16896 -13893 9216 -13894 7680 -13895 7680 -13896 11520 -13897 13440 -13898 12288 -13899 12288 -13900 12288 -13901 12288 -13902 10752 -13903 10752 -13904 7680 -13905 3240 -13906 13824 -13907 10368 -13908 9600 -13909 9600 -13910 10296 -13911 10296 -13912 7488 -13913 7488 -13914 10368 -13915 5376 -13916 5376 -13917 6656 -13918 6656 -13919 6144 -13920 6144 -13921 6144 -13922 6144 -13923 5376 -13924 5376 -13925 5376 -13926 5376 -13927 15840 -13928 10368 -13929 7680 -13930 9600 -13931 14080 -13932 14080 -13933 14080 -13934 5376 -13935 5376 -13936 5376 -13937 5376 -13938 5376 -13939 5376 -13940 5376 -13941 5376 -13942 2688 -13943 18432 -13944 7392 -13945 8800 -13946 6048 -13947 4800 -13948 5760 -13949 7200 -13950 6656 -13951 6656 -13952 6656 -13953 6656 -13954 3744 -13955 3744 -13956 3744 -13957 7168 -13958 6144 -13959 9216 -13960 9216 -13961 9216 -13962 4608 -13963 4608 -13964 4608 -13965 7168 -13966 7168 -13967 8192 -13968 8192 -13969 12672 -13970 15360 -13971 11520 -13972 11520 -13973 5376 -13974 5376 -13975 5376 -13976 5376 -13977 8192 -13978 8192 -13979 5120 -13980 5120 -13981 10560 -13982 10560 -13983 10560 -13984 7680 -13985 7680 -13986 7680 -13987 20480 -13988 20480 -13989 14400 -13990 4800 -13991 4800 -13992 4800 -13993 4800 -13994 4800 -13995 9216 -13996 8640 -13997 8640 -13998 14520 -13999 8448 -14000 8448 -14001 7040 -14002 8192 -14003 6144 -14004 6144 -14005 3456 -14006 3888 -14007 6656 -14008 5120 -14009 4224 -14010 7680 -14011 7680 -14012 7680 -14013 14080 -14014 5120 -14015 6144 -14016 6144 -14017 6144 -14018 6144 -14019 4608 -14020 4608 -14021 6240 -14022 6240 -14023 18432 -14024 18432 -14025 18432 -14026 18432 -14027 18432 -14028 18432 -14029 18432 -14030 18432 -14031 18432 -14032 18432 -14033 18432 -14034 18432 -14035 18432 -14036 18432 -14037 18432 -14038 18432 -14039 18432 -14040 18432 -14041 18432 -14042 18432 -14043 4224 -14044 4224 -14045 8192 -14046 4224 -14047 6144 -14048 4800 -14049 4800 -14050 5632 -14051 6144 -14052 11264 -14053 11264 -14054 11264 -14055 3200 -14056 18432 -14057 18432 -14058 18432 -14059 18432 -14060 18432 -14061 18432 -14062 18432 -14063 18432 -14064 13824 -14065 13824 -14066 16128 -14067 16128 -14068 16128 -14069 16128 -14070 16128 -14071 16128 -14072 16128 -14073 16128 -14074 12096 -14075 12096 -14076 16128 -14077 16128 -14078 16128 -14079 16128 -14080 16128 -14081 16128 -14082 16128 -14083 16128 -14084 12096 -14085 12096 -14086 3456 -14087 10752 -14088 5120 -14089 14080 -14090 10752 -14091 10752 -14092 7168 -14093 7168 -14094 6144 -14095 6144 -14096 8000 -14097 14080 -14098 8624 -14099 8624 -14100 4680 -14101 5632 -14102 12800 -14103 8640 -14104 11760 -14105 11760 -14106 11760 -14107 11760 -14108 11760 -14109 11760 -14110 11760 -14111 11760 -14112 11760 -14113 11760 -14114 11760 -14115 11760 -14116 11760 -14117 11760 -14118 11760 -14119 11760 -14120 11760 -14121 11760 -14122 11760 -14123 11760 -14124 11760 -14125 11760 -14126 11760 -14127 11760 -14128 11760 -14129 11760 -14130 11760 -14131 11760 -14132 6144 -14133 6144 -14134 6144 -14135 6144 -14136 6144 -14137 6144 -14138 6144 -14139 6144 -14140 6144 -14141 6144 -14142 6144 -14143 6144 -14144 6144 -14145 12288 -14146 12288 -14147 12288 -14148 12288 -14149 12288 -14150 12288 -14151 12288 -14152 12288 -14153 12288 -14154 12288 -14155 12288 -14156 10752 -14157 10752 -14158 10752 -14159 10752 -14160 14336 -14161 14336 -14162 14336 -14163 14336 -14164 14336 -14165 14336 -14166 14336 -14167 14336 -14168 14336 -14169 14336 -14170 14336 -14171 12544 -14172 12544 -14173 12544 -14174 12544 -14175 14336 -14176 14336 -14177 14336 -14178 14336 -14179 14336 -14180 14336 -14181 14336 -14182 14336 -14183 14336 -14184 14336 -14185 14336 -14186 12544 -14187 12544 -14188 12544 -14189 12544 -14190 19968 -14191 19968 -14192 19968 -14193 19968 -14194 19968 -14195 19968 -14196 19968 -14197 19968 -14198 19968 -14199 19968 -14200 19968 -14201 17472 -14202 17472 -14203 17472 -14204 17472 -14205 19968 -14206 19968 -14207 19968 -14208 19968 -14209 19968 -14210 19968 -14211 19968 -14212 19968 -14213 19968 -14214 19968 -14215 19968 -14216 17472 -14217 17472 -14218 17472 -14219 17472 -14220 8960 -14221 8960 -14222 8960 -14223 8960 -14224 8960 -14225 8960 -14226 8960 -14227 8960 -14228 8960 -14229 8960 -14230 7840 -14231 7840 -14232 7840 -14233 7840 -14234 18432 -14235 18432 -14236 18432 -14237 18432 -14238 18432 -14239 18432 -14240 18432 -14241 18432 -14242 18432 -14243 18432 -14244 18432 -14245 18432 -14246 16128 -14247 16128 -14248 18432 -14249 18432 -14250 18432 -14251 18432 -14252 18432 -14253 18432 -14254 18432 -14255 18432 -14256 18432 -14257 18432 -14258 18432 -14259 18432 -14260 16128 -14261 16128 -14262 12288 -14263 12288 -14264 12288 -14265 12288 -14266 12288 -14267 12288 -14268 12288 -14269 12288 -14270 12288 -14271 12288 -14272 12288 -14273 10752 -14274 10752 -14275 10752 -14276 10752 -14277 12288 -14278 12288 -14279 12288 -14280 12288 -14281 12288 -14282 12288 -14283 12288 -14284 12288 -14285 12288 -14286 12288 -14287 12288 -14288 10752 -14289 10752 -14290 10752 -14291 10752 -14292 12288 -14293 12288 -14294 12288 -14295 12288 -14296 12288 -14297 12288 -14298 12288 -14299 12288 -14300 12288 -14301 12288 -14302 12288 -14303 10752 -14304 10752 -14305 10752 -14306 10752 -14307 12288 -14308 12288 -14309 12288 -14310 12288 -14311 12288 -14312 12288 -14313 12288 -14314 12288 -14315 12288 -14316 12288 -14317 12288 -14318 10752 -14319 10752 -14320 10752 -14321 10752 -14322 10752 -14323 10752 -14324 10752 -14325 10752 -14326 10752 -14327 10752 -14328 10752 -14329 10752 -14330 10752 -14331 10752 -14332 10752 -14333 9408 -14334 9408 -14335 9408 -14336 9408 -14337 10752 -14338 10752 -14339 10752 -14340 10752 -14341 10752 -14342 10752 -14343 10752 -14344 10752 -14345 10752 -14346 10752 -14347 10752 -14348 9408 -14349 9408 -14350 9408 -14351 9408 -14352 10752 -14353 10752 -14354 10752 -14355 10752 -14356 10752 -14357 10752 -14358 10752 -14359 10752 -14360 10752 -14361 10752 -14362 10752 -14363 9408 -14364 9408 -14365 9408 -14366 9408 -14367 10752 -14368 10752 -14369 10752 -14370 10752 -14371 10752 -14372 10752 -14373 10752 -14374 10752 -14375 10752 -14376 10752 -14377 10752 -14378 9408 -14379 9408 -14380 9408 -14381 9408 -14382 10752 -14383 10752 -14384 10752 -14385 10752 -14386 10752 -14387 10752 -14388 10752 -14389 10752 -14390 10752 -14391 10752 -14392 10752 -14393 9408 -14394 9408 -14395 9408 -14396 9408 -14397 10752 -14398 10752 -14399 10752 -14400 10752 -14401 10752 -14402 10752 -14403 10752 -14404 10752 -14405 10752 -14406 10752 -14407 10752 -14408 9408 -14409 9408 -14410 9408 -14411 9408 -14412 17920 -14413 17920 -14414 17920 -14415 17920 -14416 17920 -14417 17920 -14418 17920 -14419 17920 -14420 17920 -14421 17920 -14422 17920 -14423 17920 -14424 2560 -14425 2560 -14426 2560 -14427 2560 -14428 2560 -14429 2560 -14430 2560 -14431 2560 -14432 2560 -14433 2560 -14434 2240 -14435 2240 -14436 1536 -14437 1536 -14438 1536 -14439 1536 -14440 1536 -14441 1536 -14442 1536 -14443 1536 -14444 1536 -14445 1536 -14446 1536 -14447 1536 -14448 1536 -14449 1536 -14450 1536 -14451 1536 -14452 1536 -14453 1536 -14454 1536 -14455 1536 -14456 1536 -14457 1536 -14458 1536 -14459 1536 -14460 1536 -14461 1536 -14462 1536 -14463 1536 -14464 1536 -14465 1536 -14466 1536 -14467 1536 -14468 1536 -14469 11520 -14470 10240 -14471 10240 -14472 10240 -14473 10240 -14474 10240 -14475 10240 -14476 10240 -14477 10240 -14478 10240 -14479 10240 -14480 10240 -14481 13824 -14482 13824 -14483 13824 -14484 13824 -14485 13824 -14486 13824 -14487 13824 -14488 13824 -14489 13824 -14490 13824 -14491 13824 -14492 12544 -14493 12544 -14494 7200 -14495 9464 -14496 8736 -14497 12544 -14498 12544 -14499 12544 -14500 10976 -14501 10976 -14502 6720 -14503 6720 -14504 6552 -14505 12544 -14506 8640 -14507 7200 -14508 7200 -14509 5760 -14510 5760 -14511 11648 -14512 11648 -14513 11648 -14514 11648 -14515 11648 -14516 11648 -14517 11648 -14518 10192 -14519 10192 -14520 10192 -14521 10192 -14522 10752 -14523 10752 -14524 10752 -14525 10752 -14526 10752 -14527 10752 -14528 10752 -14529 9408 -14530 9408 -14531 9408 -14532 9408 -14533 11760 -14534 10976 -14535 10976 -14536 9984 -14537 9464 -14538 8736 -14539 8736 -14540 8736 -14541 8064 -14542 8064 -14543 8736 -14544 8736 -14545 8064 -14546 8064 -14547 8064 -14548 8064 -14549 12288 -14550 12288 -14551 12288 -14552 12288 -14553 12288 -14554 12288 -14555 9216 -14556 9216 -14557 9216 -14558 9216 -14559 11760 -14560 11760 -14561 11760 -14562 11760 -14563 11760 -14564 11760 -14565 13440 -14566 13440 -14567 13440 -14568 13440 -14569 13440 -14570 13440 -14571 13440 -14572 13440 -14573 13440 -14574 13440 -14575 13440 -14576 13440 -14577 13440 -14578 13440 -14579 13440 -14580 13440 -14581 13440 -14582 13440 -14583 10192 -14584 10192 -14585 10192 -14586 9464 -14587 9464 -14588 10192 -14589 10192 -14590 10192 -14591 9464 -14592 9464 -14593 10192 -14594 10192 -14595 10192 -14596 9464 -14597 9464 -14598 5760 -14599 5760 -14600 12288 -14601 12288 -14602 12288 -14603 7920 -14604 7920 -14605 7920 -14606 7392 -14607 13440 -14608 12544 -14609 12544 -14610 13440 -14611 12544 -14612 12544 -14613 13440 -14614 12544 -14615 12544 -14616 13440 -14617 12544 -14618 12544 -14619 13440 -14620 12544 -14621 12544 -14622 13440 -14623 12544 -14624 12544 -14625 12600 -14626 11760 -14627 11760 -14628 12600 -14629 11760 -14630 11760 -14631 9216 -14632 9216 -14633 9216 -14634 9216 -14635 10192 -14636 6720 -14637 6720 -14638 6720 -14639 5760 -14640 13824 -14641 11232 -14642 13824 -14643 11520 -14644 11520 -14645 11520 -14646 15360 -14647 15360 -14648 15360 -14649 15360 -14650 15360 -14651 15360 -14652 15360 -14653 15360 -14654 15360 -14655 15360 -14656 15360 diff --git a/Tests/F_BaseLib/conn_defs b/Tests/F_BaseLib/conn_defs deleted file mode 100644 index 89586de77..000000000 --- a/Tests/F_BaseLib/conn_defs +++ /dev/null @@ -1,3729 +0,0 @@ - 3728 - 1 4608 3 123 1998 3017 - 2 3072 2 3319 3320 - 3 1536 6 12 35 39 40 2109 2115 - 4 512 5 11 68 71 266 2252 - 5 4608 3 522 2058 2444 - 6 4096 3 39 2115 3017 - 7 4096 4 22 1815 2096 2989 - 8 512 4 26 83 211 2222 - 9 4096 8 30 590 594 900 1234 2105 2486 3371 - 10 8192 8 110 170 2006 2007 2097 2332 3033 3034 - 11 3072 5 4 37 68 266 2252 - 12 512 5 3 39 40 124 2115 - 13 1024 6 48 49 144 338 611 2180 - 14 512 5 55 67 265 2159 3172 - 15 512 3 59 60 61 - 16 2048 7 64 65 66 171 2134 2135 3162 - 17 512 4 67 68 69 71 - 18 3072 7 19 67 70 71 267 513 2109 - 19 2048 6 18 35 71 266 267 2109 - 20 1024 6 1019 2099 2724 3136 3316 3317 - 21 2048 6 22 76 186 392 2987 2989 - 22 13824 12 7 21 76 186 187 422 1815 2012 2096 2987 2989 3038 - 23 9216 9 79 194 2098 2217 2368 2369 2743 3217 3492 - 24 3072 5 2099 2100 2373 3136 3322 - 25 9216 8 80 82 403 1365 1625 1627 2223 3219 - 26 4096 10 8 82 83 84 85 200 211 2222 2223 3219 - 27 18432 10 90 766 2101 2140 2141 2411 3164 3342 3343 3679 - 28 4096 7 29 1166 2102 2103 2104 2804 3137 - 29 3072 9 28 1166 1740 2102 2104 2106 2804 2814 3138 - 30 9216 9 9 589 590 900 2105 2108 2489 2674 3140 - 31 9216 9 97 98 99 107 234 235 236 252 472 - 32 2048 6 101 2247 2843 3231 3392 3535 - 33 4096 6 102 103 504 3032 3204 3652 - 34 512 3 106 108 247 - 35 12288 8 3 19 40 124 266 267 2109 2115 - 36 13824 7 37 63 111 261 512 802 2133 - 37 9216 7 11 36 63 68 512 2133 2252 - 38 1024 7 39 118 283 2114 3017 3028 3604 - 39 16384 9 3 6 12 38 283 2114 2115 3017 3145 - 40 2048 6 3 12 35 124 2109 2115 - 41 1024 0 - 42 8192 9 132 304 305 319 2116 2122 2280 2284 3156 - 43 512 6 134 136 2164 2173 2174 3182 - 44 512 4 327 329 332 2300 - 45 4096 5 48 142 337 2119 3154 - 46 9216 8 145 2118 2121 2122 3152 3153 3156 3636 - 47 9216 7 143 145 2123 2178 2179 2181 3198 - 48 12288 10 13 45 49 142 144 337 338 611 2119 2180 - 49 2048 7 13 48 611 2119 2120 2180 2181 - 50 6144 5 141 164 2124 2177 2194 - 51 512 4 363 365 2193 3202 - 52 4096 11 2125 2126 2127 2132 2134 3157 3158 3159 3161 3162 3637 - 53 6144 8 54 163 368 2128 2157 2158 3171 3172 - 54 6144 5 53 2128 2129 3171 3172 - 55 4096 9 14 67 265 2125 2129 2132 2159 3157 3172 - 56 8192 10 59 60 370 1999 2008 2130 2131 2331 3033 3160 - 57 2048 10 164 165 166 372 1999 2000 2194 3018 3019 3596 - 58 1024 7 59 370 2330 3018 3033 3596 3607 - 59 18432 15 15 56 58 60 61 370 1999 2006 2130 2330 3018 3032 3033 3596 3607 - 60 4096 9 15 56 59 61 370 1999 2008 2130 3033 - 61 2048 6 15 59 60 2006 2008 3033 - 62 512 3 110 170 2332 - 63 12288 14 36 37 66 67 68 69 512 513 2132 2133 2134 2252 3161 3162 - 64 8192 4 16 2134 2135 3162 - 65 6144 8 16 66 168 169 171 374 2135 3162 - 66 4096 9 16 63 65 171 2132 2133 2134 3161 3162 - 67 18432 17 14 17 18 55 63 68 69 70 71 265 266 267 513 2132 2134 2159 2252 - 68 9216 13 4 11 17 37 63 67 69 71 266 267 513 2132 2252 - 69 2048 6 17 63 67 68 2132 2134 - 70 2048 6 18 67 114 267 513 2159 - 71 4096 10 4 17 18 19 67 68 266 267 513 2252 - 72 1024 6 179 180 181 1564 2206 3608 - 73 2048 5 173 176 2202 3304 3306 - 74 3072 9 75 182 183 184 185 2723 2724 3484 3485 - 75 1024 6 74 182 184 185 2723 2724 - 76 512 4 21 22 186 392 - 77 2048 7 190 191 194 195 1619 2353 2960 - 78 12288 12 193 194 398 2098 2136 2137 2368 2369 3163 3217 3314 3315 - 79 4096 7 23 194 195 1619 2098 2368 3492 - 80 9216 14 25 81 82 196 197 400 402 403 421 424 1624 1625 2216 3219 - 81 1536 5 80 196 1624 2217 2743 - 82 24576 17 25 26 80 83 85 198 199 200 211 403 1365 1625 1627 2138 2222 2223 3219 - 83 8192 14 8 26 82 84 85 198 199 200 211 403 2138 2222 2223 3219 - 84 1024 6 26 83 85 199 200 2138 - 85 1024 5 26 82 83 84 200 - 86 4096 10 210 437 438 439 2221 2384 2385 2390 3331 3332 - 87 18432 9 212 214 443 444 445 741 2139 2224 2395 - 88 12288 9 213 214 215 449 450 2101 2141 2224 3164 - 89 4096 11 90 208 216 217 436 2033 2035 2140 2141 3063 3164 - 90 9216 8 27 89 2101 2140 2141 2411 3164 3342 - 91 3072 9 853 1513 1748 2142 2145 2647 2648 3167 3443 - 92 1536 6 222 223 452 824 2103 2803 - 93 12288 16 96 225 227 233 462 463 466 1102 1672 2146 2229 2405 2421 3223 3227 3345 - 94 1536 10 98 229 230 234 235 472 765 2151 2230 2244 - 95 9216 7 98 230 232 468 470 471 2411 - 96 9216 9 93 233 235 1102 2229 2240 2425 3223 3227 - 97 4096 8 31 107 234 235 236 252 472 2240 - 98 13824 9 31 94 95 99 230 232 234 471 472 - 99 512 3 31 98 472 - 100 1024 4 473 497 786 3390 - 101 2048 8 32 238 474 2247 2843 3231 3384 3535 - 102 4096 10 33 103 348 475 476 504 2193 3032 3607 3652 - 103 2048 4 33 102 3032 3607 - 104 18432 8 241 269 481 1089 2148 2254 2415 3234 - 105 12288 9 245 250 517 782 2150 2238 2438 2439 3350 - 106 6144 10 34 108 246 247 251 252 491 2151 2240 2244 - 107 1024 3 31 97 252 - 108 4096 6 34 106 247 252 2151 2240 - 109 2048 10 256 257 356 499 508 2430 3053 3279 3346 3614 - 110 18432 9 10 62 111 170 260 261 373 2097 2332 - 111 4096 9 36 110 260 261 373 505 802 2133 2195 - 112 8192 6 263 521 2152 2153 2160 2249 - 113 12288 5 2153 2154 2155 3141 3168 - 114 16384 8 70 267 2109 2115 2158 2159 3145 3172 - 115 3072 11 270 514 807 1118 1416 2440 2441 2444 3509 3605 3606 - 116 18432 7 118 119 271 272 517 2438 3028 - 117 1536 9 276 277 278 283 2113 2114 2259 3603 3604 - 118 1024 7 38 116 271 278 2255 3028 3604 - 119 9216 6 116 120 271 2002 2004 3028 - 120 6144 2 119 2004 - 121 12288 12 122 518 521 809 1119 2110 2160 2258 3351 3598 3599 3600 - 122 12288 16 121 279 280 518 809 1119 2005 2258 2445 3021 3022 3023 3351 3598 3599 3600 - 123 2048 5 1 284 1998 2018 3017 - 124 1024 5 12 35 40 2109 2115 - 125 512 5 291 292 537 2275 3255 - 126 2048 4 288 532 1161 2161 - 127 1536 6 305 306 2122 3153 3156 3636 - 128 1024 7 308 309 562 574 2469 2470 3369 - 129 512 4 311 312 580 2288 - 130 4608 4 2273 2274 3254 3255 - 131 512 5 316 2278 2279 2291 2292 - 132 512 4 42 318 319 2116 - 133 8192 8 909 1235 1756 2162 2163 2824 3173 3381 - 134 9216 16 43 135 143 165 372 2164 2171 2173 2174 2178 2179 3180 3182 3196 3198 3651 - 135 6144 7 134 324 2131 2164 2174 2295 3160 - 136 4096 8 43 588 2117 2173 2174 2179 3148 3182 - 137 2048 6 328 601 910 911 2299 3265 - 138 2048 5 308 330 331 562 2469 - 139 1024 5 329 332 604 2301 2493 - 140 6144 7 335 610 2175 2282 2283 3154 3634 - 141 6144 6 50 2124 2169 2176 2177 3197 - 142 1024 5 45 48 337 611 2119 - 143 12288 6 47 134 2123 2178 2179 3198 - 144 8192 11 13 48 164 338 612 2123 2177 2178 2180 3197 3198 - 145 18432 9 46 47 2117 2118 2121 2179 2181 3148 3152 - 146 2048 9 345 1108 2182 2309 2320 2609 2610 2611 3272 - 147 6144 9 167 348 365 2183 2185 2193 3032 3200 3607 - 148 2048 4 353 933 2319 2686 - 149 2048 10 347 351 637 945 2183 2191 2313 2315 3200 3277 - 150 32768 16 254 497 634 635 784 786 2186 2246 2517 2518 2520 2842 3231 3232 3283 3389 - 151 3072 8 355 360 2187 2248 2249 2322 2328 3233 - 152 9216 10 158 357 358 362 947 1270 2188 2190 2323 2326 - 153 512 5 359 361 507 2189 3168 - 154 12288 13 155 156 362 368 639 2027 2431 2432 3053 3169 3170 3346 3347 - 155 2048 6 154 156 2027 2189 2431 3169 - 156 1536 7 154 155 368 2431 2432 3169 3170 - 157 2048 5 369 2155 2156 3169 3170 - 158 16384 9 152 358 947 2190 2191 2192 2326 3201 3202 - 159 12288 16 259 502 503 504 790 2127 2192 2193 2196 3158 3159 3202 3203 3205 3637 3652 - 160 512 4 161 363 945 2183 - 161 512 4 160 363 365 2183 - 162 6144 16 366 367 368 510 511 640 799 946 1112 1113 1114 2128 2129 2433 3157 3637 - 163 512 4 53 368 2128 3171 - 164 12288 11 50 57 144 166 2000 2123 2124 2177 2178 2194 3019 - 165 9216 13 57 134 372 1999 2131 2164 2171 2194 2331 3018 3180 3284 3596 - 166 512 4 57 164 372 2194 - 167 1024 6 147 348 630 2185 2330 3607 - 168 8192 15 65 169 171 374 644 645 2135 2195 2196 2197 3162 3203 3204 3205 3652 - 169 512 4 65 168 171 374 - 170 2048 7 10 62 110 2006 2007 2097 2332 - 171 9216 12 16 65 66 168 169 373 374 645 2133 2195 3161 3162 - 172 6144 9 664 1005 1284 2198 2201 2714 3208 3296 3298 - 173 6144 10 73 176 380 657 709 2030 2202 2715 3304 3306 - 174 6144 7 175 659 1288 2203 2205 2530 2848 - 175 12288 13 174 177 1288 1781 2203 2204 2205 2530 2531 2866 3209 3479 3480 - 176 3072 6 73 173 1013 2030 2715 3306 - 177 9216 11 175 661 674 1013 1781 2019 2204 2531 2716 3048 3480 - 178 1024 7 385 386 667 2360 2361 3301 3303 - 179 12288 6 72 180 181 1564 2206 2207 - 180 12288 10 72 179 181 388 1306 1559 1564 2206 2207 2546 - 181 6144 5 72 179 180 2206 2207 - 182 32768 18 74 75 183 184 185 389 390 391 669 671 672 970 971 2363 2364 2528 2723 3484 - 183 2048 9 74 182 184 389 390 671 971 3484 3485 - 184 3072 5 74 75 182 183 185 - 185 6144 9 74 75 182 184 391 672 2364 2723 3316 - 186 3072 11 21 22 76 187 392 393 2012 2337 2987 2989 3038 - 187 6144 10 22 186 393 422 1815 2012 2096 2987 2989 3038 - 188 12288 5 190 191 2211 2212 3213 - 189 9216 14 191 396 398 680 683 684 2137 2209 2210 2215 3163 3211 3212 3215 - 190 18432 16 77 188 191 395 397 684 685 2211 2212 2339 2340 2353 2960 3213 3286 3295 - 191 16384 17 77 188 189 190 194 397 398 399 684 2137 2210 2211 2212 2353 3163 3212 3213 - 192 18432 15 193 398 2136 2213 2214 2215 3163 3214 3215 3216 3310 3311 3312 3313 3653 - 193 13824 11 78 192 398 686 983 2136 2137 2213 2215 3163 3215 - 194 12288 15 23 77 78 79 191 195 399 1619 2098 2137 2353 2368 2960 3314 3492 - 195 2048 8 77 79 194 1619 2353 2368 2960 3492 - 196 6144 9 80 81 400 402 421 1624 2216 2217 3217 - 197 1024 4 80 400 401 402 - 198 1536 7 82 83 403 687 2138 2222 3219 - 199 3072 9 82 83 84 200 403 404 687 984 2138 - 200 4096 8 26 82 83 84 85 199 403 2138 - 201 1024 5 408 409 696 2345 2543 - 202 12288 9 410 412 413 2553 2725 2729 3035 3041 3609 - 203 4096 9 204 414 1566 2032 2080 2219 2350 2352 3627 - 204 2048 6 203 1566 2032 2219 2352 3627 - 205 512 5 418 713 1911 2357 2569 - 206 16384 10 424 2222 2377 2889 2890 2891 3067 3068 3069 3219 - 207 1024 6 428 2566 2752 2754 3416 3497 - 208 12288 17 89 216 435 436 725 1082 1392 1657 2033 2140 2388 2564 2967 3063 3164 3343 3679 - 209 2048 8 2220 2221 2382 2383 2598 3218 3337 3437 - 210 1024 5 86 438 439 732 1049 - 211 12288 10 8 26 82 83 2222 2223 2573 2583 3219 3421 - 212 6144 9 87 214 443 444 445 741 2139 2224 2395 - 213 4608 12 88 214 216 446 447 448 449 744 745 2141 2224 3164 - 214 16384 10 87 88 212 213 444 446 738 743 2224 2395 - 215 1024 4 88 450 2101 2224 - 216 24576 17 89 208 213 217 436 447 448 2034 2035 2141 2389 2396 3062 3063 3070 3077 3164 - 217 3072 6 89 216 2033 2034 2035 3063 - 218 9216 10 220 451 1832 2081 2225 2226 2397 2993 3125 3220 - 219 4096 7 220 451 1675 2081 2094 2397 3135 - 220 1536 5 218 219 451 2081 3135 - 221 3072 8 223 452 824 2227 2626 2803 3079 3137 - 222 4608 6 92 452 824 1128 2227 2786 - 223 2048 6 92 221 452 2103 2803 3137 - 224 1536 8 457 458 465 763 1076 1390 1671 2768 - 225 2048 9 93 462 463 1102 1672 2146 2229 3221 3345 - 226 6144 8 227 461 466 1081 1391 2401 2402 2404 - 227 12288 11 93 226 231 233 461 462 466 1083 2146 2405 3223 - 228 12288 8 467 2057 2228 2407 3107 3108 3221 3623 - 229 6144 16 94 230 234 235 765 2151 2228 2229 2230 2240 2244 2425 3221 3222 3223 3654 - 230 6144 13 94 95 98 229 234 468 469 471 472 765 1084 2230 2410 - 231 512 4 227 233 1083 3223 - 232 512 4 95 98 234 471 - 233 4608 6 93 96 227 231 2229 3223 - 234 18432 13 31 94 97 98 229 230 232 235 471 472 2229 2230 3223 - 235 8192 13 31 94 96 97 229 234 236 252 472 2151 2229 2240 2425 - 236 1024 6 31 97 235 252 472 2151 - 237 2048 2 2231 2934 - 238 2048 8 101 474 497 2685 3231 3384 3390 3535 - 239 4096 12 2232 2233 2234 2236 3096 3097 3224 3225 3226 3615 3616 3655 - 240 6144 9 479 771 1397 1663 2147 2148 2235 3092 3617 - 241 3072 3 104 481 3234 - 242 6144 15 480 769 770 771 772 1087 1397 1659 1662 2147 2235 2236 3097 3098 3617 - 243 18432 14 275 483 485 486 777 806 1098 1117 1670 2256 2416 2418 2616 2617 - 244 12288 10 488 489 490 2149 2237 2239 2422 2424 3230 3656 - 245 8192 6 105 806 2238 2439 2617 3350 - 246 8192 8 106 247 251 491 492 493 781 3229 - 247 18432 17 34 106 108 246 252 491 493 779 781 2151 2239 2240 2243 3227 3229 3230 3656 - 248 12288 8 249 2241 2242 2243 3228 3229 3230 3656 - 249 18432 10 248 250 272 494 495 783 1104 2241 2242 3228 - 250 18432 12 105 249 272 494 517 782 2150 2242 2438 2439 3228 3350 - 251 3072 8 106 246 491 492 780 2055 2151 2244 - 252 16384 10 31 97 106 107 108 235 236 247 2151 2240 - 253 4608 7 942 2245 2308 2509 2608 2691 2771 - 254 6144 12 150 497 784 786 2186 2246 2517 2842 3231 3232 3283 3389 - 255 4096 12 356 498 787 1268 2246 2247 2250 2329 2430 2842 3231 3283 - 256 1024 10 109 257 356 498 499 508 2329 2430 3279 3614 - 257 512 5 109 256 499 508 2430 - 258 4096 11 362 500 501 788 789 946 1106 2188 2190 2428 3347 - 259 1024 6 159 504 790 2193 3203 3652 - 260 4096 8 110 111 261 373 505 791 2097 2332 - 261 8192 6 36 110 111 260 505 802 - 262 32768 7 506 2152 2248 2249 2429 2442 2443 - 263 12288 9 112 360 361 2152 2153 2249 2251 3168 3233 - 264 3072 14 507 508 509 2027 2154 2189 2430 2431 3052 3053 3168 3169 3346 3614 - 265 8192 18 14 55 67 511 513 800 801 1113 1115 2125 2129 2132 2159 3157 3158 3161 3172 3637 - 266 9216 11 4 11 19 35 67 68 71 267 513 2109 2252 - 267 18432 13 18 19 35 67 68 70 71 114 266 513 2109 2159 2252 - 268 6144 11 270 514 1419 2001 2253 2254 2612 3049 3234 3611 3612 - 269 3072 7 104 514 2254 2415 2612 2772 3234 - 270 2048 12 115 268 514 807 1118 1416 2253 2612 3605 3606 3611 3612 - 271 9216 12 116 118 119 272 278 517 2255 2438 2439 3028 3350 3604 - 272 24576 8 116 249 250 271 494 517 782 2438 - 273 9216 16 274 516 518 804 2110 2111 2437 2446 2613 2614 2773 3141 3142 3351 3600 3601 - 274 4096 11 273 519 804 2256 2257 2613 2614 2615 3600 3601 3602 - 275 8192 12 243 276 277 805 806 1117 2255 2256 2257 2439 2615 2617 - 276 6144 14 117 275 277 805 2112 2113 2255 2256 2257 2259 2615 3047 3602 3603 - 277 1024 7 117 275 276 805 2255 3603 3604 - 278 2048 5 117 118 271 2255 3604 - 279 9216 11 122 280 1121 2005 2015 2258 2776 3021 3022 3598 3599 - 280 512 4 122 279 2005 2015 - 281 12288 8 523 2016 2111 2446 3024 3046 3601 3613 - 282 8192 11 283 284 2017 2024 2259 3026 3027 3047 3051 3603 3604 - 283 13824 10 38 39 117 282 284 2114 2259 3017 3028 3604 - 284 6144 13 123 282 283 1998 2002 2018 2024 2259 3017 3027 3028 3051 3604 - 285 512 5 286 527 822 826 2262 - 286 24576 14 285 291 292 527 537 823 2039 2262 2275 3242 3249 3255 3662 3668 - 287 6144 5 819 2069 2263 2264 3235 - 288 512 6 126 525 532 534 821 2161 - 289 12288 9 290 525 533 534 1223 2265 2290 3253 3254 - 290 1024 5 289 535 2265 2290 3254 - 291 1024 9 125 286 292 536 537 835 2262 3255 3668 - 292 2048 9 125 286 291 537 2262 2275 3249 3255 3668 - 293 4608 5 539 2916 2917 3573 3574 - 294 1024 5 524 530 543 2264 2447 - 295 1024 4 544 546 841 2636 - 296 1024 5 297 547 1216 1217 2822 - 297 18432 21 296 547 552 1138 1150 1151 1152 1153 1161 1216 1217 1444 1445 2266 2453 2668 2792 2800 2821 2823 3457 - 298 512 2 550 551 - 299 6144 9 569 2268 2274 2275 2477 3248 3249 3255 3668 - 300 512 4 556 2462 2649 3361 - 301 4096 6 557 560 857 2462 3365 3379 - 302 2048 7 563 564 866 914 1248 2043 2657 - 303 6144 11 335 565 568 609 610 919 1253 2276 2282 2476 3259 - 304 12288 10 42 305 306 319 875 2116 2277 2280 2284 3258 - 305 16384 19 42 127 304 306 319 572 2116 2122 2277 2280 2281 2284 3149 3153 3156 3258 3261 3633 3636 - 306 8192 10 127 304 305 572 2277 2281 3149 3153 3633 3636 - 307 3072 7 553 1185 1212 1214 2285 2458 2811 - 308 6144 8 128 138 331 562 574 575 2469 2480 - 309 2048 8 128 562 574 882 2286 2469 2470 3369 - 310 9216 7 312 315 576 577 884 2287 2289 - 311 8192 13 129 312 578 579 580 887 888 1220 1221 2288 2289 2481 2482 - 312 18432 11 129 310 311 313 315 576 580 2287 2288 2289 2482 - 313 1024 4 312 580 2289 2482 - 314 6144 6 890 2272 2273 2290 3253 3254 - 315 2048 5 310 312 1224 2287 2289 - 316 2048 7 131 1512 2278 2279 2291 2817 2818 - 317 12288 6 2116 2283 2284 2292 3154 3155 - 318 4096 8 132 319 583 2116 2280 2284 2291 2292 - 319 2048 9 42 132 304 305 318 583 2116 2280 2284 - 320 2048 7 585 2293 2484 2491 2494 2825 3374 - 321 9216 11 587 937 2184 2294 2689 3178 3179 3199 3284 3647 3649 - 322 1024 6 590 593 594 900 2486 3371 - 323 2048 9 591 592 642 2131 2164 2295 2331 3160 3180 - 324 12288 9 135 593 594 901 2131 2174 2295 2490 3160 - 325 4096 13 1245 2163 2296 2297 2298 2498 2499 2827 3173 3262 3263 3264 3669 - 326 18432 13 330 331 575 599 908 913 2468 2469 2499 2500 3365 3366 3379 - 327 8192 13 44 332 615 902 941 1266 1267 1764 2299 2300 2505 2676 3265 - 328 4096 8 137 600 907 910 911 1244 2499 3265 - 329 2048 6 44 139 332 604 2300 2301 - 330 8192 12 138 326 331 562 603 913 2467 2468 2469 2500 3365 3366 - 331 4096 7 138 308 326 330 575 2468 2469 - 332 8192 11 44 139 327 329 595 604 902 2300 2301 2493 2676 - 333 1024 6 597 606 2165 2679 3184 3461 - 334 12288 9 350 1252 2167 2302 2303 2317 2830 3188 3266 - 335 1024 5 140 303 610 919 2282 - 336 3072 6 2176 3146 3191 3192 3197 3631 - 337 4096 8 45 48 142 611 2119 3150 3154 3634 - 338 2048 6 13 48 144 611 612 2180 - 339 9216 14 342 618 1258 2304 2305 2307 2507 2683 2835 3267 3269 3271 3382 3671 - 340 4096 9 613 615 616 620 632 924 940 1266 2505 - 341 1024 4 342 618 619 620 - 342 9216 9 339 341 613 618 620 940 1258 2307 2683 - 343 6144 7 344 621 622 633 943 2308 2506 - 344 3072 7 343 622 929 2308 2509 2682 3383 - 345 8192 9 146 624 792 2182 2309 2607 2609 2610 3272 - 346 4096 7 506 795 2310 2311 2441 2442 3272 - 347 4096 15 149 351 363 637 945 2183 2191 2312 2313 2315 3200 3273 3275 3277 3673 - 348 18432 19 102 147 167 365 475 630 631 938 939 1264 1265 1538 2183 2185 2193 3032 3200 3202 3607 - 349 3072 6 595 1259 2316 2491 2494 3532 - 350 3072 9 334 1252 2167 2168 2314 2317 3176 3177 3276 - 351 4608 10 149 347 629 936 2191 2313 2315 2318 2327 3277 - 352 4096 3 2318 3199 3200 - 353 4096 7 148 933 1269 1882 2319 2519 2686 - 354 8192 11 794 1108 2187 2311 2320 2321 2322 2429 2520 2611 3278 - 355 6144 11 151 360 635 797 1111 2187 2248 2322 2328 2520 3233 - 356 13824 17 109 255 256 498 499 508 636 787 1268 2026 2247 2324 2329 2430 2521 3279 3614 - 357 8192 13 152 358 362 2025 2188 2323 2324 2325 2326 3279 3280 3281 3674 - 358 9216 10 152 158 357 2190 2191 2325 2326 2327 3201 3282 - 359 9216 14 153 360 361 507 2189 2250 2251 2328 2329 2430 3052 3168 3283 3614 - 360 6144 11 151 263 355 359 361 507 2249 2251 2328 3168 3233 - 361 2048 8 153 263 359 360 507 2251 2328 3168 - 362 18432 14 152 154 258 357 500 639 946 1270 2025 2188 2323 3053 3346 3347 - 363 9216 13 51 160 161 347 364 365 631 945 2183 2191 2312 3201 3202 - 364 512 3 363 945 2191 - 365 2048 9 51 147 161 348 363 631 2183 2193 3202 - 366 2048 11 162 368 510 639 640 1112 1114 2128 2432 2433 3347 - 367 9216 13 162 501 502 640 946 1112 1113 2190 2192 2428 2433 3159 3637 - 368 16384 16 53 154 156 162 163 366 369 510 639 1114 2128 2432 2433 3170 3171 3347 - 369 6144 6 157 368 2156 2157 3170 3171 - 370 9216 17 56 58 59 60 371 641 1999 2130 2131 2330 2331 3018 3033 3160 3284 3596 3607 - 371 3072 8 370 641 642 643 2130 2331 3033 3160 - 372 2048 7 57 134 165 166 2171 2178 2194 - 373 9216 11 110 111 171 260 505 644 645 2133 2195 2332 3204 - 374 1024 9 65 168 169 171 644 645 2195 2197 3204 - 375 16384 2 646 949 - 376 24576 18 382 647 649 952 964 2198 2526 2527 2852 2937 3208 3472 3542 3543 3579 3580 3708 3727 - 377 512 3 649 2198 3208 - 378 6144 10 651 652 653 957 1009 1010 1575 2333 3298 3300 - 379 9216 12 653 654 657 1012 1278 2028 2202 2333 2844 3054 3302 3304 - 380 2048 7 173 657 658 2029 2030 2063 2202 - 381 512 6 661 1013 2019 2020 2716 3048 - 382 4096 11 376 662 663 665 964 2526 2527 3472 3473 3708 3709 - 383 512 6 664 666 1284 3285 3297 3299 - 384 4096 7 386 667 2334 2335 2359 2360 3285 - 385 4608 8 178 667 966 2335 2360 2361 3301 3303 - 386 1024 6 178 384 667 2335 2360 2361 - 387 4608 9 388 668 967 1559 1776 2206 2336 2546 3405 - 388 16384 13 180 387 668 699 967 1285 1306 1559 2206 2207 2336 2546 3405 - 389 6144 10 182 183 390 671 970 2362 2363 2528 3482 3484 - 390 2048 9 182 183 389 671 971 3482 3483 3484 3485 - 391 2048 5 182 185 669 672 2364 - 392 2048 7 21 76 186 2337 2987 3038 3591 - 393 3072 8 186 187 422 2012 2337 3038 3039 3608 - 394 9216 13 676 677 974 975 977 2338 2340 2694 3286 3288 3294 3295 3675 - 395 4096 10 190 2339 2340 2341 3286 3287 3288 3294 3295 3675 - 396 2048 7 189 681 682 711 1015 2215 3163 - 397 2048 6 190 191 684 685 2353 3295 - 398 6144 16 78 189 191 192 193 680 686 983 2136 2137 2209 2210 2213 2215 3163 3215 - 399 2048 4 191 194 2137 2211 - 400 12288 6 80 196 197 401 402 2216 - 401 2048 4 197 400 402 2216 - 402 4096 10 80 196 197 400 401 421 424 1624 2216 2377 - 403 4096 11 25 80 82 83 198 199 200 404 687 984 2138 - 404 3072 5 199 403 687 984 2138 - 405 8192 12 701 2342 2343 2344 2347 2348 3289 3290 3291 3413 3414 3676 - 406 1024 4 691 695 994 2542 - 407 512 4 693 695 696 2542 - 408 9216 12 201 688 694 696 1309 2345 2533 2534 2543 2711 3395 3478 - 409 6144 13 201 693 696 697 995 1000 1309 1310 2345 2346 2541 2543 2865 - 410 24576 17 202 412 413 698 1567 1587 2347 2348 2546 2547 2550 2553 2725 3041 3405 3408 3609 - 411 4096 5 700 2031 2218 2548 3055 - 412 32768 22 202 410 413 698 996 997 1314 1567 1889 2347 2348 2547 2550 2709 2711 2943 3035 3041 3406 3477 3582 3609 - 413 1024 6 202 410 412 701 2347 2348 - 414 2048 12 203 1566 2032 2080 2349 2350 2352 2942 3292 3293 3627 3628 - 415 4096 13 704 2011 2013 2351 2352 2991 3037 3042 3122 3124 3293 3592 3628 - 416 512 4 705 708 1004 1007 - 417 16384 13 418 1619 2077 2087 2353 2355 2886 2960 3064 3071 3128 3295 3629 - 418 18432 12 205 417 713 1359 1617 1808 1911 2087 2355 2357 2569 3127 - 419 4096 7 420 712 713 2356 2357 2569 3417 - 420 512 5 419 712 713 2569 3417 - 421 18432 21 80 196 402 424 1624 1626 1812 2216 2217 2367 2369 2377 2743 2887 2888 2889 3065 3066 3067 3217 3315 - 422 13824 12 22 187 393 1632 1815 1816 2012 2096 2726 2989 3040 3610 - 423 6144 10 761 1346 1606 2371 2376 2602 2877 2885 3325 3564 - 424 12288 15 80 206 402 421 687 1626 1812 2377 2888 2889 2890 3066 3067 3068 3219 - 425 6144 8 1898 1952 2360 2361 3003 3301 3303 3550 - 426 1024 9 429 720 721 1034 2557 2591 2749 3434 3494 - 427 2048 2 2559 3326 - 428 24576 12 207 1597 2378 2379 2566 2752 2952 3326 3416 3496 3497 3711 - 429 6144 10 426 720 723 724 1340 2557 2591 2749 3434 3494 - 430 2048 7 1043 1052 2380 2744 3057 3058 3422 - 431 12288 16 727 728 1046 1378 1599 1600 1601 1602 1650 1795 1822 1823 2381 2567 2898 3328 - 432 6144 12 447 730 731 744 1350 1610 2387 2389 2562 2563 3061 3062 - 433 18432 13 1349 2383 2385 2401 2736 2893 2895 3332 3335 3337 3490 3566 3677 - 434 3072 7 435 1042 2386 2388 2736 2737 3490 - 435 12288 15 208 434 725 1042 1392 1657 2033 2386 2388 2404 2564 2737 2967 3063 3339 - 436 4096 11 89 208 216 2387 2388 2389 2563 2564 3062 3063 3164 - 437 3072 9 86 438 2221 2390 3218 3329 3330 3331 3332 - 438 2048 9 86 210 437 439 732 1049 2384 2390 3331 - 439 2048 6 86 210 438 732 1049 2384 - 440 8192 7 735 736 1361 2391 2394 2571 2572 - 441 8192 11 445 741 1056 2139 2392 2575 2576 2578 3422 3423 3427 - 442 9216 7 1051 1361 2393 2394 2579 3333 3425 - 443 1024 5 87 212 741 742 2139 - 444 6144 13 87 212 214 445 446 738 741 743 2139 2224 2395 2577 2582 - 445 4096 12 87 212 441 444 738 741 2139 2395 2576 2577 2578 2582 - 446 3072 11 213 214 444 448 738 743 744 745 1058 2224 2395 - 447 9216 15 213 216 432 448 449 744 2224 2389 2396 2583 3061 3062 3076 3077 3164 - 448 6144 10 213 216 446 447 744 745 2141 2396 2583 3164 - 449 6144 8 88 213 447 450 2101 2141 2224 3164 - 450 2048 7 88 215 449 2101 2141 2224 3164 - 451 6144 10 218 219 220 1675 1832 2081 2094 2225 2397 3135 - 452 2048 7 92 221 222 223 824 2227 2803 - 453 12288 10 747 748 2586 2589 2590 2593 2970 3431 3436 3588 - 454 6144 10 750 751 752 756 1666 1829 2594 2595 2971 2992 - 455 16384 13 456 457 754 755 757 759 1076 1384 2398 2597 2598 2600 3437 - 456 12288 11 455 457 458 753 757 759 1076 1671 2398 2601 2907 - 457 18432 20 224 455 456 458 465 754 757 758 763 1076 1390 1671 1831 1917 2398 2400 2597 2600 2768 3338 - 458 4096 8 224 456 457 757 759 1076 1671 2768 - 459 1024 5 762 1078 1388 2407 3340 - 460 8192 18 462 463 464 1079 1391 2146 2399 2400 2402 2405 2406 2770 3334 3336 3338 3345 3508 3678 - 461 8192 19 226 227 466 1083 1388 1389 1391 1393 1657 2401 2402 2403 2404 2405 3223 3335 3336 3339 3654 - 462 8192 18 93 225 227 460 463 466 1078 1079 1391 2146 2229 2399 2402 2405 3221 3223 3336 3654 - 463 4096 11 93 225 460 462 1102 1672 2056 2146 2399 2770 3345 - 464 4096 10 460 465 1080 1101 1411 2146 2400 2406 2770 3508 - 465 12288 11 224 457 464 763 1080 1390 1411 2400 2406 2768 3508 - 466 4096 9 93 226 227 461 462 1081 1391 2146 2405 - 467 12288 8 228 2228 2407 2408 3221 3222 3340 3654 - 468 4096 13 95 230 469 470 471 1084 2409 2410 2411 3341 3342 3343 3679 - 469 1024 4 230 468 1084 2409 - 470 4096 7 95 468 471 766 2410 2411 3343 - 471 9216 11 95 98 230 232 234 468 470 2230 2410 2411 3343 - 472 4096 9 31 94 97 98 99 230 234 235 236 - 473 6144 9 100 785 786 1105 1260 1413 3390 3462 3689 - 474 512 3 101 238 3231 - 475 4096 9 102 348 476 504 790 2193 3032 3607 3652 - 476 512 4 102 475 504 790 - 477 8192 8 768 2232 2412 2413 3224 3225 3344 3655 - 478 8192 7 480 767 2233 2414 3224 3226 3655 - 479 6144 7 240 771 772 774 2147 2148 2235 - 480 32768 12 242 478 767 769 770 771 772 1086 1087 2233 2236 3224 - 481 6144 4 104 241 774 2148 - 482 8192 11 1090 1116 1398 2052 2053 2415 2764 2772 2908 3099 3103 - 483 6144 8 243 777 806 1098 1117 2416 2616 2617 - 484 3072 7 488 1097 1409 2417 2422 2604 2912 - 485 18432 12 243 486 1098 1117 1408 1670 2256 2416 2418 2773 2910 2974 - 486 6144 11 243 485 777 1098 1410 1670 2418 2419 2424 2605 2616 - 487 4096 11 489 778 1099 1101 2239 2420 2421 2423 2770 3227 3345 - 488 12288 9 244 484 490 2237 2419 2422 2424 2604 2605 - 489 12288 10 244 487 778 1100 2237 2239 2422 2423 3230 3656 - 490 12288 8 244 488 2149 2150 2237 2238 2424 2616 - 491 9216 20 106 246 247 251 492 779 780 781 1102 1412 2055 2151 2239 2240 2244 2425 3106 3107 3227 3623 - 492 4096 8 246 251 491 780 781 1412 2055 3106 - 493 3072 7 246 247 781 1103 2239 3229 3656 - 494 4096 9 249 250 272 782 783 1104 2242 2438 3228 - 495 1024 4 249 783 1104 2241 - 496 6144 7 929 2245 2427 2606 2608 2682 3383 - 497 3072 10 100 150 238 254 786 2517 2842 3231 3390 3535 - 498 4096 10 255 256 356 499 787 1268 2247 2329 2430 3614 - 499 1024 8 109 256 257 356 498 787 2521 3279 - 500 2048 7 258 362 788 2188 2323 3346 3347 - 501 4096 11 258 367 502 789 946 1112 2190 2192 2428 2433 3347 - 502 6144 12 159 367 501 503 789 1112 1113 2192 2193 2428 3202 3637 - 503 1536 8 159 502 790 2192 2193 3158 3202 3637 - 504 6144 9 33 102 159 259 475 476 790 2193 3652 - 505 1024 8 111 260 261 373 791 2195 2332 3204 - 506 12288 8 262 346 795 2311 2429 2441 2442 2611 - 507 12288 18 153 264 359 360 361 508 509 2154 2189 2250 2251 2328 2329 2430 3052 3168 3283 3614 - 508 8192 14 109 256 257 264 356 507 2027 2430 2431 3052 3053 3279 3346 3614 - 509 2048 7 264 507 798 2154 2431 3168 3169 - 510 6144 12 162 366 368 639 1114 1415 2128 2432 2433 3170 3171 3347 - 511 6144 12 162 265 799 800 1112 1114 1115 2128 2129 3157 3171 3172 - 512 4096 9 36 37 63 513 802 2132 2133 2252 3161 - 513 12288 16 18 63 67 68 70 71 265 266 267 512 800 801 1115 2132 2159 2252 - 514 2048 10 115 268 269 270 807 1118 1416 2254 2612 2772 - 515 12288 11 803 1418 1674 2434 2435 2913 3031 3045 3348 3597 3598 - 516 12288 8 273 804 2436 2437 2613 3349 3599 3600 - 517 6144 9 105 116 250 271 272 2255 2438 2439 3350 - 518 6144 10 121 122 273 809 2110 2160 3141 3351 3599 3600 - 519 3072 7 274 1117 2256 2257 2614 2615 2773 - 520 6144 4 810 1120 2021 3049 - 521 24576 10 112 121 809 811 1119 2152 2160 2258 2443 2776 - 522 16384 11 5 2058 2066 2444 2774 3029 3030 3113 3509 3605 3606 - 523 6144 11 281 2016 2023 2445 2446 3023 3024 3050 3351 3600 3601 - 524 8192 12 294 530 817 819 833 1137 1834 2069 2264 2447 2995 3235 - 525 18432 14 288 289 533 534 813 821 1125 1139 1432 1692 2265 2624 2625 2784 - 526 1024 8 824 825 831 1141 2037 2626 2627 3079 - 527 2048 9 285 286 822 823 826 1140 2039 2262 3082 - 528 4096 10 533 1432 2260 2448 2450 2624 3252 3253 3665 3666 - 529 18432 14 815 827 1131 1133 1502 1503 2620 2629 2633 2643 2790 2806 3439 3442 - 530 12288 20 294 524 540 542 543 817 833 838 881 1148 1506 1507 1508 1702 2264 2447 2449 2459 3235 3358 - 531 1024 6 830 834 1171 2460 2631 3528 - 532 16384 19 126 288 533 534 821 885 886 1151 1153 1161 2161 2450 2623 2797 2800 3251 3252 3253 3457 - 533 12288 17 289 525 528 532 534 821 1139 1223 1432 2260 2265 2450 2624 3252 3253 3665 3666 - 534 2048 8 288 289 525 532 533 821 2265 2450 - 535 12288 12 290 822 835 2260 2261 2262 2265 2625 3254 3255 3667 3668 - 536 512 4 291 537 835 3255 - 537 1024 7 125 286 291 292 536 835 2262 - 538 6144 3 836 1132 1427 - 539 4608 3 293 812 2916 - 540 3072 9 530 541 542 543 816 838 2447 2449 2451 - 541 2048 9 540 542 837 1213 1504 1506 1507 2449 2451 - 542 4096 12 530 540 541 543 881 1213 1504 1506 1507 1508 2449 2451 - 543 1024 6 294 530 540 542 838 2449 - 544 8192 9 295 546 548 840 1453 2041 2452 2454 2636 - 545 2048 4 841 1157 3083 3084 - 546 4096 6 295 544 841 2040 2041 2636 - 547 12288 12 296 297 830 1150 1216 1217 1443 2453 2821 2822 2823 3528 - 548 2048 6 544 843 845 2266 2452 2454 - 549 3072 1 1162 - 550 9216 4 298 551 844 1160 - 551 2048 4 298 550 844 1454 - 552 2048 4 297 1161 2266 2800 - 553 4096 12 307 862 1185 1214 2455 2458 2459 2811 3354 3355 3358 3682 - 554 8192 11 851 1170 2269 2460 3119 3243 3250 3452 3456 3528 3663 - 555 6144 14 853 854 1177 1179 1180 1225 1513 2461 2647 2648 2649 2810 3443 3669 - 556 3072 5 300 1176 2649 3360 3361 - 557 12288 14 301 560 857 1523 1754 1877 2462 2465 3361 3362 3365 3379 3683 3685 - 558 512 3 560 2465 3685 - 559 2048 1 855 - 560 2048 6 301 557 558 2465 3365 3685 - 561 3072 10 862 863 864 1187 1732 2059 2060 2472 3109 3110 - 562 18432 18 128 138 308 309 330 574 603 2042 2043 2467 2469 2470 2828 3085 3366 3367 3369 3686 - 563 9216 14 302 564 865 866 869 915 1250 1480 1481 1486 2471 2473 2497 3377 - 564 16384 15 302 563 566 866 869 1190 2043 2044 2471 2472 2473 2657 3085 3086 3118 - 565 24576 24 303 568 608 609 610 867 868 919 920 1192 1253 2276 2282 2475 2476 2502 2658 2660 2829 3187 3189 3256 3259 3449 - 566 512 4 564 869 2059 2472 - 567 1536 7 578 870 871 889 1195 2289 2481 - 568 3072 12 303 565 608 873 919 920 1253 2276 2475 2476 2502 2663 - 569 12288 6 299 1941 2268 2274 2477 3248 - 570 2048 7 572 877 1206 1207 1209 2478 2479 - 571 4608 8 572 877 879 1206 1207 2281 2479 2820 - 572 24576 15 305 306 570 571 877 1207 2172 2277 2281 2479 2488 3149 3153 3633 3636 - 573 9216 8 832 837 880 1504 1505 2632 3356 3357 - 574 6144 11 128 308 309 562 882 1215 2286 2469 2470 2480 3369 - 575 4096 6 308 326 331 2468 2469 2480 - 576 8192 9 310 312 884 1218 2287 2288 2289 2481 2667 - 577 4096 7 310 884 885 2287 2667 2668 3457 - 578 9216 12 311 567 870 871 889 1219 1220 1221 2288 2289 2481 2482 - 579 512 4 311 887 888 2288 - 580 4096 7 129 311 312 313 2288 2289 2482 - 581 1024 6 1224 1512 2271 2272 3526 3527 - 582 512 6 1202 1512 2291 2818 2819 3527 - 583 2048 6 318 319 1202 2280 2291 2292 - 584 2048 10 891 892 1226 1755 2162 2483 2824 3173 3270 3670 - 585 12288 12 320 1259 2306 2483 2484 2491 2675 3268 3370 3374 3459 3531 - 586 24576 20 893 894 905 906 1228 1229 1239 1241 1515 1517 1519 1750 1752 1758 1761 2485 2677 2839 2983 3534 - 587 1536 6 321 2294 3178 3179 3647 3649 - 588 9216 14 136 2117 2172 2173 2174 2179 2487 2488 3148 3149 3181 3182 3372 3633 - 589 1024 5 30 900 2108 2489 2674 - 590 2048 8 9 30 322 594 900 2105 2486 3371 - 591 4608 8 323 592 2164 2295 2490 3180 3182 3651 - 592 2048 7 323 591 642 2164 2331 3180 3284 - 593 6144 10 322 324 594 901 1234 2174 2295 2486 2487 2490 - 594 9216 10 9 322 324 590 593 901 1234 2295 2486 2490 - 595 9216 15 332 349 902 1259 2316 2491 2493 2494 2675 2676 2825 2836 3374 3459 3532 - 596 12288 13 893 904 1227 1237 1239 1240 1518 1751 2494 2677 2825 3532 3533 - 597 6144 17 333 598 606 916 1250 2495 2496 2497 2501 3183 3184 3375 3376 3377 3638 3639 3687 - 598 1536 9 597 906 1239 1529 2495 2496 3184 3375 3639 - 599 12288 13 326 604 1236 1246 1526 1527 2300 2301 2499 2500 2676 3265 3379 - 600 512 6 328 907 910 911 1243 1244 - 601 2048 10 137 614 615 909 910 923 1255 2299 2678 3265 - 602 1024 1 911 - 603 2048 7 330 562 913 1246 2467 2469 3366 - 604 12288 15 139 329 332 599 912 1236 1246 1526 1527 2300 2301 2492 2493 2500 2676 - 605 512 3 915 916 1250 - 606 2048 10 333 597 916 1250 2497 2501 3183 3184 3460 3461 - 607 4608 6 917 2302 2679 2681 3266 3461 - 608 8192 11 565 568 873 920 1253 2303 2475 2502 2503 3266 3380 - 609 9216 11 303 565 610 868 919 2175 2282 2829 3189 3191 3259 - 610 4096 9 140 303 335 565 609 919 2175 2282 3259 - 611 9216 11 13 48 49 142 337 338 612 921 2119 2180 3150 - 612 3072 7 144 338 611 921 2177 2180 3197 - 613 16384 21 340 342 615 618 619 620 632 923 924 940 1258 1266 1539 2306 2307 2504 2505 2836 3270 3271 3381 - 614 512 6 601 615 909 923 1255 2299 - 615 18432 18 327 340 601 613 614 616 632 909 923 924 940 941 1266 1267 2299 2504 2505 3381 - 616 512 3 340 615 924 - 617 512 4 618 619 926 927 - 618 18432 15 339 341 342 613 617 619 620 925 926 927 2305 2307 2504 2507 3271 - 619 3072 9 341 613 617 618 620 924 926 927 2504 - 620 6144 8 340 341 342 613 618 619 924 940 - 621 6144 10 343 622 633 928 943 1257 2308 2506 2507 3382 - 622 13824 13 343 344 621 928 929 1256 1257 2308 2506 2509 2682 2833 3383 - 623 6144 10 1108 2182 2309 2508 2509 2608 2609 2771 3278 3383 - 624 2048 4 345 792 2610 3272 - 625 9216 9 932 2510 2512 2515 2522 2684 3281 3385 3388 - 626 6144 14 934 935 936 1263 2513 2516 2687 2688 3276 3277 3388 3463 3672 3673 - 627 4096 16 629 2191 2313 2327 2514 2515 2516 3201 3273 3277 3282 3386 3387 3388 3673 3688 - 628 512 5 932 935 1262 2840 3388 - 629 6144 12 351 627 936 2191 2313 2327 2515 2516 3273 3277 3388 3673 - 630 6144 17 167 348 631 937 938 948 1264 1265 1537 2184 2185 2330 2689 3199 3200 3284 3607 - 631 4608 12 348 363 365 630 939 1265 2183 2193 2312 3200 3202 3275 - 632 512 7 340 613 615 940 1266 1267 2505 - 633 4096 10 343 621 942 943 2186 2308 2506 2518 2691 3389 - 634 8192 12 150 1765 2186 2517 2518 2519 2842 3389 3390 3391 3535 3689 - 635 24576 11 150 355 796 797 1111 2322 2328 2520 3232 3233 3283 - 636 6144 10 356 1268 2324 2521 2522 2843 3279 3281 3392 3674 - 637 512 5 149 347 945 2183 2191 - 638 512 3 946 1270 2190 - 639 3072 10 154 362 366 368 510 640 946 2432 2433 3347 - 640 2048 9 162 366 367 639 946 1112 1114 2433 3347 - 641 9216 11 370 371 643 948 1541 1766 2330 2331 3033 3284 3607 - 642 1536 6 323 371 592 2295 2331 3160 - 643 2048 4 371 641 2130 3033 - 644 1024 8 168 373 374 645 2195 2197 2332 3204 - 645 2048 10 168 171 373 374 644 2133 2195 2197 2332 3204 - 646 4096 4 375 949 950 1271 - 647 6144 9 376 952 1273 2535 3207 3208 3396 3580 3727 - 648 6144 13 953 954 955 1274 1275 1543 2199 2200 2523 2692 2693 3206 3207 - 649 512 4 376 377 2198 3208 - 650 2048 8 651 955 956 1003 1009 1573 2525 2713 - 651 12288 14 378 650 653 957 959 1009 1010 1277 1545 1573 1575 2525 2844 3537 - 652 512 3 378 957 2333 - 653 12288 17 378 379 651 654 707 957 959 1010 1012 1277 1278 1280 1545 1546 1575 2333 2844 - 654 6144 9 379 653 657 960 1278 2028 2333 2844 3054 - 655 16384 8 656 1281 1768 2064 2065 2204 3112 3209 - 656 8192 13 655 660 961 963 1011 1281 1768 2030 2065 2204 2715 2984 3548 - 657 18432 12 173 379 380 654 658 960 1278 2028 2030 2063 2202 3054 - 658 512 5 380 657 2029 2030 2063 - 659 4608 6 174 962 1282 1288 2203 2848 - 660 3072 6 656 963 2030 2065 2715 2984 - 661 2048 8 177 381 1013 1781 2019 2716 3048 3480 - 662 6144 7 382 663 1769 2526 2852 3708 3709 - 663 1024 4 382 662 964 2526 - 664 9216 11 172 383 666 965 1284 2198 2527 3296 3297 3298 3299 - 665 6144 9 382 666 965 2527 3297 3472 3473 3708 3709 - 666 2048 6 383 664 665 965 2527 3297 - 667 4096 9 178 384 385 386 2335 2360 2361 3301 3303 - 668 2048 6 387 388 967 1285 2206 2336 - 669 9216 12 182 391 670 672 968 969 1287 2363 2364 2528 3307 3309 - 670 512 6 669 969 2363 2364 3307 3309 - 671 2048 6 182 183 389 390 970 971 - 672 512 4 182 185 391 669 - 673 12288 12 679 972 973 974 1289 1548 2529 2530 2531 2694 3210 3211 - 674 18432 16 177 681 981 1014 1015 2019 2020 2208 2531 2716 2718 3048 3210 3216 3480 3653 - 675 3072 5 975 976 1290 2529 2694 - 676 2048 8 394 677 974 975 976 977 2338 2694 - 677 18432 17 394 676 684 974 975 977 978 979 982 1291 1550 2338 2694 3212 3213 3286 3675 - 678 2048 5 979 980 2212 2339 3286 - 679 512 6 673 972 973 2531 3210 3211 - 680 512 6 189 398 2209 2215 3163 3215 - 681 6144 10 396 674 682 981 1014 1015 2215 2531 2718 3216 - 682 512 4 396 681 981 2215 - 683 2048 7 189 684 982 2209 2210 3211 3212 - 684 12288 15 189 190 191 397 677 683 685 974 982 2210 2211 2340 3212 3213 3286 - 685 2048 7 190 397 684 2340 2353 3286 3295 - 686 512 3 193 398 983 - 687 4096 9 198 199 403 404 424 984 2138 2222 3219 - 688 6144 15 408 2343 2348 2532 2533 2534 2711 3291 3393 3394 3395 3477 3478 3690 3710 - 689 9216 7 2536 2537 2538 3398 3399 3400 3692 - 690 512 6 691 991 993 994 2539 3403 - 691 8192 11 406 690 695 991 994 1304 2539 2540 2542 3401 3402 - 692 1024 6 695 994 2544 2545 3403 3404 - 693 9216 10 407 409 695 696 2082 2346 2541 2542 3126 3402 - 694 9216 10 408 695 696 987 2534 2543 2545 2701 3395 3404 - 695 18432 17 406 407 691 692 693 694 696 994 2539 2541 2542 2543 2544 2545 3402 3403 3404 - 696 9216 14 201 407 408 409 693 694 695 2345 2541 2542 2543 2545 3402 3404 - 697 2048 8 409 995 1000 1310 2345 2346 2865 3478 - 698 18432 23 410 412 996 1306 1308 1559 1561 1562 1563 1567 1889 2347 2348 2546 2547 2550 2709 3041 3405 3406 3477 3582 3609 - 699 1536 4 388 2336 2546 3405 - 700 8192 12 411 997 998 1309 1311 2218 2548 2710 2711 2943 3055 3478 - 701 9216 10 405 413 2342 2343 2347 2348 2553 3289 3413 3414 - 702 3072 9 1001 1566 2032 2350 2942 2943 3055 3292 3582 - 703 8192 18 1002 1568 1631 1814 2013 2351 2549 2551 2962 2987 2988 3038 3040 3042 3293 3407 3591 3610 - 704 2048 7 415 1315 2011 2013 2351 3037 3042 - 705 2048 11 416 708 1004 1005 1006 1007 1009 1022 1317 2713 3298 - 706 1024 3 1279 1320 2847 - 707 512 5 653 1010 2333 3300 3302 - 708 2048 10 416 705 1004 1005 1007 1009 1022 2713 3298 3300 - 709 6144 8 173 1011 1012 2030 2202 2715 3304 3306 - 710 1024 2 975 2338 - 711 6144 9 396 1015 1016 2215 2878 3163 3312 3314 3557 - 712 4096 5 419 420 713 2356 2357 - 713 2048 8 205 418 419 420 712 2357 2569 3417 - 714 2048 6 1017 1018 1901 2558 2719 3004 - 715 4096 8 1020 1021 1956 2732 2985 3319 3320 3489 - 716 512 5 1024 2359 3299 3409 3721 - 717 8192 9 1025 1896 1951 1979 3003 3300 3301 3302 3303 - 718 6144 16 1026 1332 1337 1787 1788 1895 2552 2553 2556 2725 2948 3408 3411 3414 3583 3695 - 719 512 7 720 724 1030 1060 2378 3434 3494 - 720 9216 15 426 429 719 721 724 1029 1030 1034 2557 2591 2749 2966 3434 3494 3587 - 721 2048 7 426 720 1034 2749 2966 3494 3587 - 722 9216 9 1804 2074 2379 2558 2559 2950 2951 3326 3415 - 723 512 4 429 724 1340 2557 - 724 9216 14 429 719 720 723 1028 1030 1038 1060 1340 2378 2557 3434 3494 3497 - 725 4096 10 208 435 761 1041 1042 1657 2033 2564 2967 3339 - 726 6144 8 1044 1353 1598 2565 2875 2954 3491 3556 - 727 6144 11 431 1597 1600 1822 2566 2567 2752 2754 2898 3416 3496 - 728 512 4 431 1045 1046 2567 - 729 4608 5 1049 2384 2390 3329 3331 - 730 6144 14 432 731 1048 1354 1356 1609 1610 1909 2561 2562 2568 2956 2959 3586 - 731 8192 11 432 730 744 1609 1610 2561 2562 2568 2574 3060 3061 - 732 512 4 210 438 439 1049 - 733 1024 3 2341 3288 3294 - 734 12288 16 735 1050 1359 1360 1361 1621 2084 2087 2391 2569 2570 2571 3127 3130 3333 3417 - 735 12288 10 440 734 1050 1360 1361 2391 2394 2570 2571 3333 - 736 9216 3 440 2571 2572 - 737 512 7 1052 1054 1055 2392 2746 3426 3427 - 738 6144 19 214 444 445 446 741 743 744 1058 2224 2395 2573 2574 2577 2582 2583 3418 3421 3424 3698 - 739 8192 4 2139 2578 2581 3427 - 740 1024 5 742 1056 1057 2578 3427 - 741 18432 18 87 212 441 443 444 445 738 742 1056 2139 2395 2574 2576 2577 2578 2582 3423 3424 - 742 4096 6 443 740 741 1056 2139 2578 - 743 2048 9 214 444 446 738 1058 2224 2395 2573 2582 - 744 12288 20 213 432 446 447 448 731 738 745 1058 2224 2395 2396 2573 2574 2583 3060 3061 3076 3077 3418 - 745 512 6 213 446 448 744 1058 2583 - 746 18432 17 1064 1085 1373 1394 2234 2414 2584 2585 2587 2747 3225 3226 3428 3429 3432 3655 3699 - 747 9216 16 453 748 1395 2586 2588 2589 2590 2899 3093 3100 3430 3431 3433 3588 3618 3700 - 748 6144 10 453 747 2586 2589 2590 2592 2593 3431 3435 3436 - 749 1024 7 752 1070 2595 2756 3498 3500 3712 - 750 8192 11 454 751 1068 1377 1829 1963 2593 2594 2595 2992 3436 - 751 6144 10 454 750 756 1068 1666 2594 2595 2599 2971 2992 - 752 1536 8 454 749 756 2595 2756 3498 3500 3712 - 753 16384 18 456 757 1072 1073 1074 1378 1380 1653 2398 2596 2597 2600 2601 2755 2757 3437 3438 3499 - 754 12288 19 455 457 755 758 1075 1383 1385 1390 1652 1655 2400 2597 2598 3334 3337 3338 3437 3677 3678 - 755 2048 8 455 754 1384 1654 2398 2597 2598 3437 - 756 18432 17 454 751 752 1073 1666 1829 2595 2599 2601 2755 2756 2971 2973 2992 3438 3498 3568 - 757 12288 17 455 456 457 458 753 1076 1668 1671 1831 1916 1917 2398 2597 2600 2601 2907 3438 - 758 4608 10 457 754 1075 1385 2400 2597 2600 3334 3338 3678 - 759 1024 5 455 456 458 1076 2398 - 760 8192 12 761 1042 1077 1346 1386 2403 2602 2736 2877 3335 3336 3339 - 761 24576 15 423 725 760 762 1041 1042 1346 1348 1606 2403 2602 2736 2967 3339 3340 - 762 2048 5 459 761 1388 2403 3340 - 763 512 4 224 457 465 1390 - 764 2048 8 1082 1393 1657 2408 2967 3340 3341 3679 - 765 1024 7 94 229 230 1084 2228 2230 3222 - 766 4096 4 27 470 2411 3343 - 767 12288 12 478 480 769 1085 1394 2233 2412 2414 3224 3226 3344 3655 - 768 1024 4 477 2232 2412 3224 - 769 4608 8 242 480 767 770 771 1086 2236 3224 - 770 3072 11 242 480 769 771 1086 1659 1662 2235 2236 3616 3617 - 771 9216 10 240 242 479 480 769 770 772 2147 2235 2236 - 772 12288 8 242 479 480 771 773 774 1087 2147 - 773 1536 4 772 774 1087 2147 - 774 13824 6 479 481 772 773 2147 2148 - 775 6144 13 1094 1406 1410 1669 1830 2418 2762 2763 2910 2912 2974 3504 3569 - 776 16384 10 1096 2437 2603 2613 2765 2767 2909 3349 3506 3569 - 777 9216 12 243 483 486 1098 1410 1670 2416 2419 2424 2605 2616 2617 - 778 4096 14 487 489 1099 1100 1101 1411 2420 2421 2422 2423 2769 2770 3345 3508 - 779 2048 9 247 491 781 1102 1103 2239 2240 2425 3227 - 780 4096 6 251 491 492 1412 2055 3106 - 781 6144 11 246 247 491 492 493 779 1103 1412 2239 3229 3656 - 782 4096 9 105 250 272 494 2150 2242 2438 3228 3350 - 783 1024 4 249 494 495 1104 - 784 1536 8 150 254 785 786 1105 2186 2517 3389 - 785 4096 9 473 784 786 1105 1413 2517 3389 3390 3689 - 786 6144 12 100 150 254 473 497 784 785 2186 2517 3389 3390 3689 - 787 2048 8 255 356 498 499 1268 2247 2521 2843 - 788 512 4 258 500 3346 3347 - 789 4096 8 258 501 502 1106 1112 2428 2433 3347 - 790 1024 7 159 259 475 476 503 504 2193 - 791 2048 5 260 505 2097 2332 3204 - 792 9216 5 345 624 2607 2609 2610 - 793 12288 6 795 2310 2440 2441 2610 3272 - 794 4608 18 354 797 1107 1108 1109 1111 1414 1673 2187 2248 2320 2321 2322 2429 2520 2611 2771 3278 - 795 18432 12 346 506 793 2310 2311 2429 2440 2441 2442 2610 2611 3272 - 796 512 4 635 1111 2520 3232 - 797 4096 9 355 635 794 1109 1111 2248 2322 2520 3233 - 798 512 4 509 2154 2431 3169 - 799 512 7 162 511 1112 1113 1114 3157 3637 - 800 4096 6 265 511 513 1115 2159 3172 - 801 1024 5 265 513 1115 2132 3161 - 802 2048 5 36 111 261 512 2133 - 803 9216 11 515 1116 1674 2434 2612 2772 2913 3031 3045 3597 3612 - 804 9216 8 273 274 516 2437 2613 2614 3600 3601 - 805 9216 13 275 276 277 806 1117 2255 2256 2257 2439 2615 3350 3602 3603 - 806 18432 12 243 245 275 483 805 1117 2255 2256 2439 2615 2617 3350 - 807 2048 13 115 270 514 1118 1416 1674 2444 2612 3509 3605 3606 3611 3612 - 808 2048 6 1416 1674 2441 2442 3509 3510 - 809 3072 9 121 122 518 521 1119 2160 2258 3598 3599 - 810 512 5 520 1120 1419 2021 3049 - 811 512 4 521 2258 2443 2776 - 812 16384 14 539 836 1123 1124 1132 2618 2780 2781 2782 2916 3514 3570 3573 3724 - 813 13824 13 525 1423 1682 1683 1844 1845 2619 2624 2625 2783 2784 2920 2923 - 814 6144 7 1129 1130 1424 2788 2922 2924 3577 - 815 512 6 529 827 1131 1133 2620 3439 - 816 24576 13 540 832 1134 1920 1969 2447 2449 2451 2621 2632 2925 3005 3012 - 817 6144 15 524 530 819 833 1134 1135 1137 1429 1834 2069 2264 2447 2925 2995 3235 - 818 8192 14 820 834 1136 1146 1430 1836 1852 1930 1974 2622 2631 2997 2998 3593 - 819 4096 8 287 524 817 1137 2069 2263 2264 3235 - 820 12288 16 818 830 834 1441 1677 1703 1836 1852 1853 1930 1974 2622 2631 2791 2976 2998 - 821 12288 13 288 525 532 533 534 1125 1139 1422 1679 2161 2450 2623 2784 - 822 24576 14 285 527 535 826 835 1140 1424 1433 1682 1845 2261 2262 2625 2923 - 823 18432 16 286 527 826 1129 1140 1424 2037 2038 2039 2262 2627 2793 2922 2923 3082 3576 - 824 24576 15 92 221 222 452 526 831 1128 1129 1141 2227 2626 2627 2786 2803 3079 - 825 1024 4 526 1129 1141 2627 - 826 2048 5 285 527 822 823 1140 - 827 32768 16 529 815 1131 1133 1142 1428 1689 2629 2643 2789 2790 3439 3441 3442 3518 3680 - 828 512 6 833 1144 1440 2796 3355 3682 - 829 8192 9 1145 1146 1463 1717 1867 2263 2630 3114 3235 - 830 8192 14 531 547 820 1171 1442 1443 1703 1853 2453 2460 2631 2791 3250 3528 - 831 1024 6 526 824 2626 2627 2803 3079 - 832 16384 14 573 816 837 880 1504 2449 2451 2620 2621 2632 2633 3356 3357 3439 - 833 12288 15 524 530 817 828 1148 1440 1508 2264 2447 2459 2796 3235 3355 3358 3682 - 834 4096 11 531 818 820 1146 1149 1171 1441 1464 2460 2622 2631 - 835 4096 11 291 535 536 537 822 2261 2262 3254 3255 3667 3668 - 836 6144 5 538 812 1132 1427 2618 - 837 2048 6 541 573 832 1504 2449 2451 - 838 1024 5 530 540 543 2447 2449 - 839 16384 8 840 1154 1155 1447 1448 2041 2634 3084 - 840 12288 11 544 839 842 1154 2041 2452 2454 2634 2635 2636 3084 - 841 12288 9 295 545 546 1157 2040 2041 2636 3083 3084 - 842 1024 6 840 1159 2266 2452 2454 2635 - 843 2048 9 548 845 1158 1453 2266 2452 2636 2799 2800 - 844 24576 8 550 551 1126 1160 1454 1709 2785 2919 - 845 512 6 548 843 2266 2452 2799 2800 - 846 3072 7 1143 1461 1462 2637 2644 2982 3519 - 847 9216 15 1164 1740 2267 2638 2639 2801 2802 2813 2932 3241 3242 3440 3520 3522 3662 - 848 1024 6 1164 1166 1740 2640 2802 2804 - 849 12288 13 1167 1211 1474 1502 2456 2642 2643 2806 2931 3352 3356 3442 3680 - 850 6144 14 1169 1462 1473 1717 1728 1939 2455 2644 2645 2656 2982 3354 3355 3682 - 851 12288 13 554 1170 1718 1719 2460 2646 3119 3236 3243 3452 3657 3663 3702 - 852 2048 13 1174 1175 1176 1178 1467 1723 1724 2461 2648 2649 2808 2810 3443 - 853 6144 12 91 555 1177 1180 1225 1513 1748 2142 2461 2647 2648 3443 - 854 4096 9 555 1179 1180 2461 2462 2649 2810 3264 3669 - 855 32768 8 559 1469 1470 1726 2464 2465 3360 3361 - 856 1024 7 1167 1460 1468 2463 2641 2642 3359 - 857 1024 5 301 557 2462 3378 3379 - 858 2048 7 1480 2471 3115 3117 3118 3624 3626 - 859 4096 14 882 1183 1184 1215 1474 1476 1746 2650 2652 3368 3369 3444 3446 3701 - 860 4096 12 2286 2470 2651 2652 2653 2655 2811 3444 3445 3446 3447 3701 - 861 4096 11 863 864 1185 1187 2472 2654 2655 2811 3085 3086 3447 - 862 12288 16 553 561 863 1172 1185 1186 1187 1465 1477 1721 1729 1732 2455 2656 3109 3110 - 863 6144 20 561 861 862 864 1185 1186 1187 1477 1478 1729 1732 2059 2060 2472 2654 2656 3085 3086 3109 3110 - 864 2048 8 561 861 863 1187 2472 2654 3085 3086 - 865 6144 19 563 866 915 1188 1189 1250 1480 1481 1482 1483 1484 1486 1730 1759 2471 2473 2497 2657 3377 - 866 12288 19 302 563 564 865 914 1188 1190 1248 1250 1480 1481 1759 2043 2471 2472 2497 2657 3085 3377 - 867 9216 17 565 876 1196 1197 1205 2276 2282 2476 2658 2660 2662 3256 3259 3449 3451 3455 3705 - 868 1024 6 565 609 1500 2829 3189 3259 - 869 2048 8 563 564 566 2059 2471 2472 2473 3118 - 870 2048 9 567 578 871 1194 1195 1219 1489 1511 2481 - 871 32768 22 567 578 870 889 1194 1195 1196 2270 2271 2287 2289 2481 2661 2662 2817 3244 3245 3454 3455 3523 3526 3716 - 872 1024 5 1196 1197 2276 2278 3256 - 873 6144 11 568 608 1198 1490 2474 2475 2476 2502 2503 2663 3380 - 874 1024 4 2267 2477 2813 3241 - 875 2048 9 304 1202 1203 2277 2280 2816 2819 3258 3525 - 876 512 4 867 1205 2658 3256 - 877 12288 13 570 571 572 1200 1203 1207 1208 2277 2281 2479 2820 3258 3261 - 878 12288 6 2172 2664 3181 3195 3261 3650 - 879 3072 7 571 1206 1207 1495 2478 2479 2820 - 880 9216 9 573 832 1211 1503 2632 2633 3356 3357 3439 - 881 512 6 530 542 1506 1507 1508 2449 - 882 8192 10 309 574 859 1215 2286 2470 2480 2652 3369 3446 - 883 6144 14 887 1216 1217 1218 1219 1220 1511 2665 2666 2821 2822 2823 3456 3528 - 884 4096 10 310 576 577 1217 1218 2287 2667 2668 2823 3457 - 885 12288 15 532 577 886 1151 1161 1222 2270 2271 2287 2450 2667 2797 3251 3252 3457 - 886 512 6 532 885 1151 1161 2668 3457 - 887 6144 7 311 579 883 888 1218 1220 2288 - 888 4096 6 311 579 887 1220 1221 2288 - 889 1024 6 567 578 871 2289 2481 2482 - 890 512 4 314 1223 2290 3253 - 891 16384 13 584 892 1226 2162 2231 2669 2670 2831 2934 3173 3270 3458 3670 - 892 1536 8 584 891 1226 2162 2296 2670 2824 3173 - 893 12288 15 586 596 1227 1237 1239 1515 1517 1519 1750 2485 2677 2839 2933 2983 3533 - 894 6144 13 586 906 1228 1229 1241 1520 1758 2485 2495 3174 3376 3638 3639 - 895 4096 5 2671 3642 3643 3644 3645 - 896 3072 8 1229 1263 1521 2672 3174 3175 3463 3534 - 897 3072 10 899 1232 1233 2294 2673 2689 3177 3199 3274 3645 - 898 2048 6 1230 1231 2672 2673 2688 3672 - 899 2048 8 897 1232 1233 1522 2294 2673 2689 3274 - 900 6144 13 9 30 322 589 590 2105 2108 2478 2486 2489 2674 3140 3371 - 901 2048 6 324 593 594 1234 2295 2490 - 902 8192 21 327 332 595 1235 1259 1266 1524 1755 1764 1881 2299 2300 2316 2491 2505 2675 2676 2824 2836 3265 3459 - 903 9216 14 1188 1238 1482 1531 1532 1731 1759 2466 2467 2657 2826 3377 3529 3687 - 904 1536 6 596 1237 1239 1240 2677 3533 - 905 6144 10 586 906 1229 1239 1241 2677 2839 2841 3174 3534 - 906 3072 12 586 598 894 905 1229 1241 1529 1758 2485 2495 3174 3639 - 907 2048 12 328 600 910 911 1242 1243 1244 1530 2498 2499 2678 3265 - 908 1024 6 326 1244 2468 2500 3365 3379 - 909 13824 18 133 601 614 615 910 923 1235 1245 1255 1534 1756 2163 2299 2505 2678 2827 3265 3381 - 910 8192 17 137 328 600 601 907 909 911 1242 1244 1245 1530 2299 2498 2499 2678 2827 3265 - 911 8192 10 137 328 600 602 907 910 1242 1244 1530 2678 - 912 2048 6 604 913 1246 1247 2301 2492 - 913 4096 10 326 330 603 912 1246 2468 2469 2500 3365 3366 - 914 512 7 302 866 1248 1250 1759 2043 2657 - 915 4096 10 563 605 865 916 1250 1486 2473 2497 3183 3460 - 916 2048 11 597 605 606 915 1250 2497 2501 3183 3184 3460 3461 - 917 9216 10 607 2165 2166 2302 2679 2681 3184 3186 3266 3461 - 918 512 3 1198 1251 2503 - 919 1536 8 303 335 565 568 609 610 1253 2829 - 920 512 6 565 568 608 1253 2475 2502 - 921 3072 6 611 612 2180 3146 3150 3197 - 922 9216 5 1254 1533 2426 3267 3530 - 923 3072 12 601 613 614 615 909 924 1255 1534 2299 2504 2505 3381 - 924 2048 10 340 613 615 616 619 620 923 2504 2505 3381 - 925 16384 8 618 926 927 1254 2305 2504 2832 3271 - 926 4096 6 617 618 619 925 927 2504 - 927 2048 5 617 618 619 925 926 - 928 512 4 621 622 1257 2506 - 929 9216 12 344 496 622 1256 1257 2245 2308 2427 2506 2509 2682 3383 - 930 12288 10 931 1258 1259 1760 2683 2835 2836 2837 3531 3532 - 931 16384 12 930 943 1260 1760 2319 2683 2686 2690 2837 3391 3462 3689 - 932 8192 12 625 628 935 1261 1262 2510 2512 2684 2687 2840 3385 3388 - 933 13824 13 148 353 1269 1882 2319 2511 2519 2685 2686 2837 2838 3384 3462 - 934 6144 11 626 2513 2516 2687 2688 3387 3388 3463 3672 3673 3688 - 935 6144 13 626 628 932 1262 1263 2513 2684 2687 2840 2841 3388 3463 3534 - 936 2048 6 351 626 629 2516 3277 3673 - 937 12288 17 321 630 938 948 1537 1763 1766 2184 2185 2294 2330 2689 3178 3179 3199 3200 3284 - 938 3072 12 348 630 937 948 1264 1537 1541 1763 1766 2330 3284 3607 - 939 2048 6 348 631 1265 1538 2193 3202 - 940 4608 11 340 342 613 615 620 632 1258 1266 1539 2505 2836 - 941 1024 4 327 615 1267 2299 - 942 18432 12 253 633 1107 2186 2245 2308 2321 2509 2608 2691 2771 3278 - 943 24576 15 343 621 633 931 2308 2506 2507 2518 2683 2690 2691 3382 3389 3391 3689 - 944 2048 9 1540 2511 2512 2522 2843 3384 3385 3392 3535 - 945 2048 8 149 160 347 363 364 637 2183 2191 - 946 12288 16 162 258 362 367 501 638 639 640 1112 1270 2188 2190 2192 2428 2433 3347 - 947 512 5 152 158 1270 2188 2190 - 948 6144 9 630 641 937 938 1541 1766 2330 3284 3607 - 949 12288 3 375 646 1271 - 950 512 2 646 1271 - 951 9216 7 1272 1542 2047 2048 2849 3088 3691 - 952 2048 4 376 647 1273 3208 - 953 6144 8 648 954 1274 2045 2047 2692 3206 3207 - 954 2048 9 648 953 1274 1275 1276 1543 1767 2523 2692 - 955 12288 12 648 650 956 1003 1572 1573 2199 2200 2524 2525 2693 2712 - 956 512 3 650 955 2525 - 957 2048 6 378 651 652 653 1277 2333 - 958 13824 13 959 1008 1279 1318 1545 1573 2524 2525 2845 2846 2847 3536 3537 - 959 1536 7 651 653 958 1545 1573 1575 2525 - 960 6144 5 654 657 1278 2844 3054 - 961 2048 6 656 1281 2028 2030 2061 2065 - 962 6144 4 659 1282 1547 2848 - 963 6144 8 656 660 1283 1781 2064 2065 2204 2984 - 964 2048 4 376 382 663 2527 - 965 512 4 664 665 666 2527 - 966 2048 6 385 1284 2335 3285 3299 3301 - 967 2048 5 387 388 668 1285 2336 - 968 16384 11 669 969 1286 1287 2362 2363 2528 3304 3305 3306 3307 - 969 2048 10 669 670 968 1286 1287 2363 2364 2528 3307 3309 - 970 4096 5 182 389 671 971 2528 - 971 1024 5 182 183 390 671 970 - 972 3072 10 673 679 973 1288 1289 1548 2529 2530 2531 3210 - 973 4096 10 673 679 972 1288 1549 2529 2530 2531 3210 3211 - 974 12288 11 394 673 676 677 684 976 982 2529 2694 3211 3212 - 975 13824 9 394 675 676 677 710 976 977 2338 2694 - 976 1024 5 675 676 974 975 2694 - 977 4608 9 394 676 677 975 1291 1550 2338 2694 3675 - 978 6144 6 677 979 980 1291 3287 3675 - 979 13824 11 677 678 978 980 1291 2212 2339 3213 3286 3287 3675 - 980 2048 7 678 978 979 2339 3286 3287 3675 - 981 1024 5 674 681 682 2215 3216 - 982 2048 6 677 683 684 974 3211 3212 - 983 8192 7 193 398 686 2209 2210 2213 3215 - 984 512 5 199 403 404 687 2138 - 985 9216 14 1303 1556 2544 2695 2696 2698 2702 2941 3403 3464 3466 3468 3470 3707 - 986 8192 15 1297 1554 1773 1888 2532 2547 2699 2700 2707 3002 3289 3394 3405 3469 3676 - 987 6144 11 694 1298 1556 2534 2545 2701 2702 2861 3291 3394 3470 - 988 6144 14 1023 2344 2703 2704 2706 3290 3291 3412 3471 3473 3475 3676 3693 3709 - 989 2048 9 1301 2358 2703 2707 3290 3471 3676 3693 3694 - 990 12288 9 1294 1302 1305 1558 2708 2851 2858 2864 3467 - 991 2048 8 690 691 993 994 1304 2539 2863 3403 - 992 1024 6 1303 1305 2697 2698 3467 3468 - 993 2048 7 690 991 994 1303 2539 2863 3403 - 994 8192 12 406 690 691 692 695 991 993 2539 2542 3402 3403 3404 - 995 2048 6 409 697 2082 2345 2346 2541 - 996 512 7 412 698 1308 1889 2709 3406 3582 - 997 8192 14 412 700 998 1314 2348 2709 2710 2711 2943 3476 3477 3478 3582 3710 - 998 512 7 700 997 1309 2548 2710 2711 3478 - 999 1536 4 1000 1309 1310 2865 - 1000 2048 8 409 697 999 1309 1310 2345 2346 2865 - 1001 1024 5 702 1311 2943 3055 3582 - 1002 4096 10 703 1312 1313 2549 2551 2987 3038 3407 3591 3608 - 1003 9216 12 650 955 1004 1007 1569 1570 1571 1573 1574 2200 2712 2713 - 1004 9216 15 416 705 708 1003 1005 1006 1007 1009 1316 1317 1569 1571 1574 2713 2714 - 1005 6144 12 172 705 708 1004 1007 1009 1022 1317 2201 2713 2714 3298 - 1006 512 3 705 1004 1317 - 1007 6144 10 416 705 708 1003 1004 1005 1009 1319 1574 2713 - 1008 512 5 958 1318 1320 2524 2847 - 1009 18432 20 378 650 651 705 708 1004 1005 1007 1010 1022 1025 1319 1321 1573 1574 1575 2525 2713 3298 3300 - 1010 4096 10 378 651 653 707 1009 1321 1575 2333 3300 3302 - 1011 4096 5 656 709 2030 2715 2984 - 1012 3072 7 379 653 709 2030 2202 3302 3304 - 1013 12288 12 176 177 381 661 1577 1781 2715 2716 2984 3306 3308 3480 - 1014 12288 14 674 681 1015 1326 1577 1903 2531 2716 2718 2868 3216 3310 3480 3557 - 1015 18432 16 396 674 681 711 1014 1016 1326 1903 2215 2531 2718 2868 3216 3310 3312 3557 - 1016 1536 7 711 1015 1326 2878 3312 3314 3557 - 1017 6144 9 714 1018 1035 1901 2558 2719 2720 3004 3481 - 1018 6144 8 714 1017 1328 1901 2558 2719 3004 3415 - 1019 18432 13 20 1020 1798 1955 2722 2724 2873 3317 3318 3485 3487 3488 3554 - 1020 12288 11 715 1019 1021 1906 1955 1956 2873 3318 3319 3488 3489 - 1021 4096 4 715 1020 3319 3320 - 1022 1024 7 705 708 1005 1009 1317 2714 3298 - 1023 12288 12 988 1024 1330 1586 2358 2703 2705 2706 3297 3472 3473 3693 - 1024 4096 10 716 1023 1330 1586 2358 2359 3297 3299 3409 3693 - 1025 2048 6 717 1009 1331 3003 3300 3301 - 1026 16384 17 718 1032 1332 1335 1337 1592 1788 2552 2553 2559 2725 2728 2948 3326 3408 3415 3486 - 1027 6144 11 1333 1367 1591 1633 1634 1635 2013 2726 3040 3042 3610 - 1028 6144 16 724 1029 1030 1031 1333 1335 1340 1590 1591 2378 2557 2727 2728 3326 3486 3587 - 1029 2048 9 720 1028 1030 1031 1333 1591 2557 2727 3587 - 1030 2048 9 719 720 724 1028 1029 1340 2378 2557 2727 - 1031 13824 15 1028 1029 1034 1333 1335 1590 2557 2728 2730 2966 3035 3036 3041 3042 3587 - 1032 4096 10 1026 1033 1334 1335 1590 1592 2725 2728 2729 2730 - 1033 512 3 1032 1335 2730 - 1034 2048 7 426 720 721 1031 2557 2966 3587 - 1035 3072 10 1017 1338 1593 2558 2719 2720 2949 3004 3481 3552 - 1036 12288 6 1037 1336 1339 2871 2872 3551 - 1037 1024 2 1036 1339 - 1038 1536 4 724 1340 2378 3326 - 1039 2048 5 1343 1601 2381 2731 3328 - 1040 9216 13 1908 2732 2735 2985 3327 3328 3329 3330 3331 3332 3489 3565 3566 - 1041 3072 10 725 761 1042 1346 1348 2564 2737 2885 2967 3339 - 1042 9216 17 434 435 725 760 761 1041 1346 1657 2386 2388 2564 2736 2737 2885 2967 3339 3490 - 1043 6144 12 430 1801 2380 2738 2887 2888 2957 2986 3056 3057 3072 3073 - 1044 3072 7 726 2565 2739 2874 2875 3555 3556 - 1045 12288 15 728 1046 1351 1352 1599 1612 1613 1804 2073 2074 2567 2951 2952 2953 3416 - 1046 4096 12 431 728 1045 1352 1599 1600 1601 1795 2567 2953 3327 3328 - 1047 6144 8 1344 2734 2735 2740 2741 3327 3329 3491 - 1048 1024 8 730 1355 1356 1609 2560 2561 2568 2959 - 1049 2048 8 210 438 439 729 732 2384 2390 3331 - 1050 6144 8 734 735 1360 1361 2084 2570 2571 3130 - 1051 6144 12 442 1053 1361 1363 1623 2075 2393 2394 2579 2742 3333 3425 - 1052 18432 18 430 737 1054 1055 1363 1366 2380 2392 2575 2744 2745 2746 3056 3057 3422 3426 3427 3493 - 1053 1024 4 1051 1363 2742 3425 - 1054 2048 7 737 1052 1363 1366 2745 2746 3426 - 1055 9216 8 737 1052 1056 1057 2392 2746 3426 3427 - 1056 12288 9 441 740 741 742 1055 1057 2392 2578 3427 - 1057 2048 5 740 1055 1056 2578 3427 - 1058 2048 7 446 738 743 744 745 2573 2583 - 1059 8192 10 1064 1368 1636 1817 2413 3344 3429 3430 3699 3700 - 1060 12288 13 719 724 1061 1062 1369 1638 2378 2751 3434 3494 3495 3497 3711 - 1061 4096 9 1060 1062 1369 2751 3434 3435 3495 3497 3711 - 1062 1024 6 1060 1061 2748 3434 3435 3494 - 1063 1024 4 1371 1372 2078 2585 - 1064 12288 16 746 1059 1373 1636 1641 1820 2413 2585 2587 2747 3225 3344 3429 3432 3655 3699 - 1065 13824 15 1374 1643 2589 2591 2592 2748 2749 2897 2965 3431 3433 3434 3435 3494 3700 - 1066 6144 17 1067 1070 1375 1379 1645 1646 1822 1912 2750 2751 2752 2754 2898 3495 3496 3497 3711 - 1067 6144 16 1066 1068 1070 1375 1376 1377 1379 1645 1646 1647 1824 1912 2594 2595 2599 2751 - 1068 6144 11 750 751 1067 1375 1376 1377 1645 1647 2594 2595 2599 - 1069 12288 8 1071 2591 2592 2594 2753 3434 3435 3436 - 1070 8192 16 749 1066 1067 1071 1375 1379 1644 2594 2595 2751 2753 2754 2898 3436 3498 3712 - 1071 3072 7 1069 1070 2594 2595 2753 2754 3436 - 1072 1024 5 753 1380 2597 2600 3438 - 1073 4096 10 753 756 2601 2755 2756 2757 3498 3499 3500 3712 - 1074 512 4 753 1653 2398 2596 - 1075 2048 9 754 758 1383 1385 1655 2400 3334 3338 3678 - 1076 2048 8 224 455 456 457 458 757 759 2398 - 1077 6144 9 760 1349 1386 2602 2736 2758 2877 3335 3677 - 1078 4096 8 459 462 1388 2405 2407 3221 3340 3654 - 1079 2048 8 460 462 1388 1389 2399 2402 2405 3336 - 1080 3072 6 464 465 1390 2400 2406 3338 - 1081 1024 3 226 466 1391 - 1082 2048 7 208 764 1657 2033 2140 2967 3679 - 1083 1536 9 227 231 461 1388 1393 2403 2405 3223 3654 - 1084 4096 9 230 468 469 765 2230 2409 2410 3222 3341 - 1085 9216 8 746 767 1373 1394 2414 2584 3226 3655 - 1086 3072 10 480 769 770 1659 2232 2236 2968 3224 3616 3617 - 1087 8192 5 242 480 772 773 2147 - 1088 1024 6 2049 2050 3091 3095 3501 3713 - 1089 18432 13 104 1090 1398 2050 2051 2054 2148 2254 2415 2772 3092 3099 3103 - 1090 3072 7 482 1089 1116 1398 2415 2764 2772 - 1091 4096 12 1407 2759 2760 2761 2904 2908 3501 3502 3503 3507 3713 3714 - 1092 12288 10 1402 1403 1406 1669 2603 2762 2767 2905 3504 3506 - 1093 12288 8 1404 1405 1409 2763 2906 2911 2912 3504 - 1094 8192 10 775 1410 2418 2762 2763 2910 2912 2974 3504 3569 - 1095 12288 9 1407 2434 2764 2766 2908 3348 3505 3507 3714 - 1096 4096 11 776 2603 2765 2766 2767 3348 3349 3505 3506 3507 3714 - 1097 16384 11 484 1100 1409 1671 2417 2422 2604 2768 2769 2911 2912 - 1098 1024 8 243 483 485 486 777 1670 2416 2418 - 1099 6144 13 487 778 1100 1101 1411 2420 2421 2422 2423 2769 2770 3345 3508 - 1100 9216 13 489 778 1097 1099 1101 1411 2417 2422 2423 2768 2769 2770 3508 - 1101 3072 13 464 487 778 1099 1100 1411 2146 2420 2421 2769 2770 3345 3508 - 1102 6144 14 93 96 225 463 491 779 1672 2146 2229 2240 2420 2425 3227 3345 - 1103 3072 5 493 779 781 2239 3656 - 1104 4096 6 249 494 495 783 2241 3228 - 1105 4096 10 473 784 785 1260 1413 2690 2691 3389 3462 3689 - 1106 512 4 258 789 2433 3347 - 1107 8192 9 794 942 1110 1111 1673 2186 2321 2520 2771 - 1108 13824 14 146 354 623 794 1414 1673 2182 2320 2321 2608 2609 2611 2771 3278 - 1109 1024 7 794 797 1111 1414 1673 2248 2429 - 1110 1024 3 1107 2186 2520 - 1111 4096 11 355 635 794 796 797 1107 1109 2322 2520 3232 3233 - 1112 6144 16 162 366 367 501 502 511 640 789 799 946 1113 1114 1415 2433 3157 3637 - 1113 2048 8 162 265 367 502 799 1112 3157 3637 - 1114 3072 15 162 366 368 510 511 640 799 1112 1415 2128 2129 2433 3157 3171 3172 - 1115 4096 5 265 511 513 800 801 - 1116 12288 7 482 803 1090 2434 2612 2764 2772 - 1117 24576 13 243 275 483 485 519 805 806 2256 2416 2614 2615 2617 2773 - 1118 1024 8 115 270 514 807 1416 2441 2444 3509 - 1119 1024 9 121 122 521 809 1418 2160 2258 3598 3599 - 1120 2048 5 520 810 1419 2021 3049 - 1121 6144 12 279 2015 2022 2036 2258 2775 2776 3020 3021 3510 3597 3598 - 1122 8192 15 1420 1685 1965 1984 1990 2088 2777 2778 2779 3132 3511 3512 3513 3518 3715 - 1123 8192 17 812 1124 1848 1918 1965 2618 2779 2780 2781 2782 2790 3512 3513 3514 3570 3715 3724 - 1124 16384 11 812 1123 2618 2780 2781 2782 2916 3514 3570 3573 3724 - 1125 12288 8 525 821 1422 1423 2784 2785 2919 3516 - 1126 1024 4 844 2785 2921 3516 - 1127 512 3 1426 1681 2978 - 1128 12288 7 222 824 1129 2786 2787 2788 3517 - 1129 32768 18 814 823 824 825 1128 1141 1842 1843 1928 1973 2626 2627 2786 2787 2788 2922 3517 3577 - 1130 24576 5 814 1426 2788 2924 3577 - 1131 12288 16 529 815 827 1133 1428 1689 1833 1918 1984 2629 2789 2790 3439 3518 3570 3571 - 1132 9216 6 538 812 836 1427 1688 2618 - 1133 18432 12 529 815 827 1131 1428 1676 1833 1918 2620 3439 3570 3571 - 1134 4608 7 816 817 1920 2447 2925 2995 3005 - 1135 512 4 817 1429 2069 3114 - 1136 1024 5 818 1430 2622 2997 3593 - 1137 2048 6 524 817 819 1834 1921 2069 - 1138 12288 14 297 1153 1161 1431 1678 1838 1924 2266 2452 2623 2792 2799 2800 3001 - 1139 8192 13 525 533 821 1422 1432 1679 1692 1840 1854 2450 2623 2624 2784 - 1140 12288 16 527 822 823 826 1424 1433 1694 2039 2261 2262 2625 2793 2922 2923 3082 3576 - 1141 2048 7 526 824 825 1129 2626 2627 2786 - 1142 16384 14 827 1436 1458 1689 1698 1699 1856 2629 2789 2794 2929 2930 3441 3518 - 1143 12288 9 846 1437 1461 2637 2644 2796 3355 3519 3682 - 1144 1024 5 828 1437 2796 3355 3682 - 1145 12288 12 829 1717 2067 2068 2263 2630 2795 2796 2982 3114 3235 3519 - 1146 24576 22 818 829 834 1147 1149 1170 1430 1438 1441 1463 1464 1690 1700 1851 1867 2068 2263 2460 2622 2630 2631 3114 - 1147 1536 5 1146 1170 1464 2460 2631 - 1148 1536 9 530 833 1440 1506 1508 1702 2449 2459 3358 - 1149 1024 6 834 1146 1171 1441 1464 1867 - 1150 512 6 297 547 1152 1445 2821 2823 - 1151 4096 14 297 532 885 886 1152 1153 1161 1445 2450 2797 2823 3251 3252 3457 - 1152 2048 10 297 1150 1151 1161 1445 2797 2823 3250 3251 3457 - 1153 2048 9 297 532 1138 1151 1161 1445 2266 2623 2800 - 1154 24576 16 839 840 1446 1447 1448 1677 1704 1705 1835 2634 2635 2791 2976 2977 2996 3589 - 1155 1536 5 839 1447 1448 1449 2634 - 1156 2048 2 2634 3084 - 1157 12288 6 545 841 2636 2798 3083 3084 - 1158 9216 15 843 1450 1453 1678 1707 1838 1861 1923 2452 2636 2798 2799 2927 3001 3007 - 1159 3072 9 842 1452 1708 2266 2452 2453 2635 2792 3001 - 1160 2048 2 550 844 - 1161 16384 19 126 297 532 552 885 886 1138 1151 1152 1153 1217 1445 2161 2266 2623 2668 2800 2823 3457 - 1162 1024 2 549 1454 - 1163 512 3 1458 2929 3441 - 1164 8192 14 847 848 1166 1740 2102 2104 2639 2640 2801 2802 2804 2932 3520 3522 - 1165 1024 6 1459 1715 2638 3240 3440 3661 - 1166 8192 11 28 29 848 1164 1740 2102 2104 2640 2802 2804 2814 - 1167 6144 16 849 856 1460 1468 1870 2463 2641 2642 2643 2805 2806 2930 3359 3441 3442 3521 - 1168 9216 8 1471 2641 2642 2931 3352 3441 3442 3680 - 1169 1024 8 850 1461 1462 2455 2644 3354 3355 3682 - 1170 16384 16 554 851 1146 1147 1463 1464 1718 1720 1867 2460 2631 2646 3236 3243 3657 3663 - 1171 2048 8 531 830 834 1149 1464 2460 2631 3528 - 1172 6144 10 862 1463 1465 1717 1721 1732 2645 2646 2656 3625 - 1173 16384 20 1174 1175 1178 1455 1456 1710 1712 1713 1722 1723 1865 1937 2143 2144 2807 2808 2809 2980 3165 3166 - 1174 9216 23 852 1173 1175 1178 1467 1723 1724 1868 1869 1937 1938 2143 2144 2145 2461 2648 2807 2808 2809 3165 3166 3167 3443 - 1175 2048 7 852 1173 1174 1176 1178 1723 2809 - 1176 2048 10 556 852 1175 1178 1467 2461 2649 2810 3360 3361 - 1177 512 5 555 853 1180 1225 1748 - 1178 18432 19 852 1173 1174 1175 1176 1467 1723 1724 2461 2463 2464 2465 2648 2649 2809 2810 3359 3360 3361 - 1179 3072 9 555 854 1180 2461 2462 2649 2810 3263 3669 - 1180 3072 14 555 853 854 1177 1179 1225 1466 1467 2461 2648 2649 2810 3263 3669 - 1181 12288 12 1471 1472 1475 1727 2463 2464 2650 2931 3683 3684 3685 3686 - 1182 1024 4 2645 2646 2656 3625 - 1183 512 5 859 1476 1746 3368 3369 - 1184 16384 14 859 1474 1475 1476 2456 2457 2650 2652 2931 3352 3353 3444 3446 3701 - 1185 12288 18 307 553 861 862 863 1187 1214 1477 1721 1729 2455 2458 2654 2655 2656 2811 3354 3447 - 1186 3072 13 862 863 1478 1729 1732 2059 2471 2472 2656 3109 3118 3625 3626 - 1187 2048 7 561 861 862 863 864 1185 2654 - 1188 4096 12 865 866 903 1250 1482 1531 1731 1759 2466 2467 2657 3377 - 1189 512 6 865 1483 1484 1486 2497 3376 - 1190 1536 6 564 866 1480 1481 2471 2472 - 1191 2048 8 1486 1487 2473 2474 2680 3183 3185 3460 - 1192 1536 4 565 2475 2658 3449 - 1193 2048 4 3452 3453 3454 3455 - 1194 12288 17 870 871 1195 1219 1489 1511 1733 1734 1747 2269 2270 2481 2665 3243 3244 3454 3455 - 1195 512 4 567 870 871 1194 - 1196 1024 8 867 871 872 1197 2662 2817 3256 3523 - 1197 2048 7 867 872 1196 2276 2476 2662 3256 - 1198 8192 13 873 918 1251 1490 1735 2473 2474 2475 2503 2663 2680 3380 3460 - 1199 6144 9 1204 1205 1737 1738 1873 3450 3451 3523 3716 - 1200 8192 16 877 1203 1207 1208 1493 1496 1739 1743 1744 1874 2812 2813 2816 2820 3522 3525 - 1201 3072 8 1497 2107 2108 2489 2674 2815 3139 3140 - 1202 9216 15 582 583 875 2279 2280 2291 2816 2818 2819 3257 3258 3524 3525 3527 3717 - 1203 6144 12 875 877 1200 1208 1496 1743 1744 2277 2813 2816 3258 3525 - 1204 2048 4 1199 1205 2658 3451 - 1205 4096 9 867 876 1199 1204 2658 2662 3256 3451 3523 - 1206 16384 15 570 571 879 1207 1209 1492 1494 1495 1498 1499 1742 2478 2479 2812 2820 - 1207 12288 11 570 571 572 877 879 1200 1206 2281 2479 2812 2820 - 1208 3072 9 877 1200 1203 1496 1744 2277 2816 2820 3258 - 1209 1024 7 570 1206 1495 1498 1499 2478 2479 - 1210 6144 10 1500 1501 1745 2664 3191 3193 3259 3260 3646 3648 - 1211 2048 7 849 880 1502 1503 2456 2643 3356 - 1212 9216 12 307 1214 1504 1505 1506 2285 2457 2458 2653 2811 3357 3358 - 1213 1024 4 541 542 1504 1507 - 1214 4096 10 307 553 1185 1212 1506 1508 2458 2459 2811 3358 - 1215 3072 8 574 859 882 1509 1746 2480 2652 3369 - 1216 8192 10 296 297 547 883 1217 1218 2666 2821 2822 3528 - 1217 12288 14 296 297 547 883 884 1161 1216 1218 2665 2667 2668 2821 2823 3457 - 1218 18432 16 576 883 884 887 1216 1217 1219 1220 1510 1511 2288 2481 2665 2667 2821 2823 - 1219 4608 14 578 870 883 1194 1218 1220 1221 1489 1510 1511 1734 1747 2481 2665 - 1220 9216 12 311 578 883 887 888 1218 1219 1221 1511 2288 2481 2665 - 1221 1024 7 311 578 888 1219 1220 2288 2481 - 1222 3072 6 885 2271 2272 2287 3252 3253 - 1223 2048 6 289 533 890 2265 2290 3253 - 1224 512 5 315 581 1512 2287 2289 - 1225 9216 11 555 853 1177 1180 1513 1514 1748 2670 3263 3458 3669 - 1226 4096 5 584 891 892 2670 3670 - 1227 4096 12 596 893 1237 1239 1518 1751 2494 2677 2825 2933 3532 3533 - 1228 4096 6 586 894 1229 1520 1753 2485 - 1229 9216 13 586 894 896 905 906 1228 1241 1758 1761 2839 3174 3534 3639 - 1230 2048 6 898 1231 1521 2672 2688 3463 - 1231 512 4 898 1230 2688 3672 - 1232 1024 6 897 899 1233 2673 3274 3672 - 1233 2048 6 897 899 1232 1522 2294 2673 - 1234 2048 6 9 593 594 901 2486 2490 - 1235 8192 17 133 902 909 1524 1755 1756 2162 2163 2299 2505 2675 2676 2824 3173 3265 3381 3459 - 1236 2048 14 599 604 1246 1525 1526 1527 2300 2492 2493 2500 2676 3373 3374 3459 - 1237 12288 18 596 893 904 1227 1239 1240 1516 1749 1751 2494 2496 2825 2826 2933 3375 3377 3529 3687 - 1238 2048 6 903 1528 1531 2466 2467 3529 - 1239 12288 17 586 596 598 893 904 905 1227 1237 1240 1515 1529 1758 2485 2495 2677 2933 3375 - 1240 2048 6 596 904 1237 1239 2496 3375 - 1241 512 6 586 894 905 906 1229 1758 - 1242 512 6 907 910 911 1243 1530 2678 - 1243 2048 9 600 907 1242 1244 1530 2498 2499 3378 3379 - 1244 4096 10 328 600 907 908 910 911 1243 2499 3265 3379 - 1245 9216 10 325 909 910 1756 2163 2498 2499 2678 2827 3265 - 1246 6144 16 599 603 604 912 913 1236 1247 1526 1527 2301 2492 2500 3362 3363 3365 3366 - 1247 1024 5 912 1246 2492 3363 3366 - 1248 2048 8 302 866 914 1250 1759 2043 2657 2828 - 1249 1024 6 1250 1532 1759 2496 2501 3377 - 1250 16384 20 563 597 605 606 865 866 914 915 916 1188 1248 1249 1486 1759 2473 2496 2497 2501 2657 3377 - 1251 2048 7 918 1198 2474 2503 2680 3380 3460 - 1252 9216 8 334 350 2167 2168 2303 2830 3188 3190 - 1253 2048 9 303 565 568 608 919 920 2475 2502 2829 - 1254 9216 9 922 925 1533 2305 2832 3267 3271 3530 3671 - 1255 512 5 601 614 909 923 1534 - 1256 6144 11 622 929 1257 2426 2427 2506 2682 2833 2834 3382 3530 - 1257 2048 12 621 622 928 929 1256 2506 2507 2682 2833 2834 3382 3530 - 1258 6144 11 339 342 613 930 940 1259 2307 2683 2835 2836 3531 - 1259 24576 16 349 585 595 902 930 1258 1760 2316 2491 2494 2675 2835 2836 2837 3531 3532 - 1260 4096 7 473 931 1105 2683 2690 3462 3689 - 1261 24576 12 932 1262 1536 2511 2512 2684 2838 2839 2840 3384 3385 3533 - 1262 8192 10 628 932 935 1261 1263 2839 2840 2841 3388 3534 - 1263 13824 15 626 896 935 1262 2165 2166 2513 2672 2687 2840 2841 3174 3175 3463 3534 - 1264 512 4 348 630 938 1537 - 1265 2048 5 348 630 631 939 1538 - 1266 3072 12 327 340 613 615 632 902 940 1267 1539 1764 2299 2505 - 1267 2048 7 327 615 632 941 1266 2299 2505 - 1268 12288 16 255 356 498 636 787 2246 2247 2250 2329 2430 2521 2842 2843 3231 3283 3535 - 1269 1024 5 353 933 1882 2511 2519 - 1270 2048 7 152 362 638 946 947 2188 2190 - 1271 2048 3 646 949 950 - 1272 1024 5 951 1542 2046 2047 3088 - 1273 2048 4 647 952 3207 3208 - 1274 6144 11 648 953 954 1275 1276 1543 1767 2045 2523 2692 3087 - 1275 4608 10 648 954 1274 1276 1543 1544 1767 1883 2523 2692 - 1276 512 5 954 1274 1275 1543 1767 - 1277 512 5 651 653 957 2333 2844 - 1278 9216 14 379 653 654 657 960 1546 2028 2061 2062 2333 2844 2846 3054 3537 - 1279 9216 6 706 958 1768 2845 2847 3536 - 1280 512 3 653 1545 1546 - 1281 1024 6 655 656 961 1768 2061 2065 - 1282 4096 4 659 962 1547 2203 - 1283 512 4 963 2064 2065 2204 - 1284 4096 9 172 383 664 966 3285 3296 3297 3298 3299 - 1285 512 4 388 668 967 2336 - 1286 1024 4 968 969 3306 3307 - 1287 512 4 669 968 969 2528 - 1288 9216 11 174 175 659 972 973 1548 1549 2205 2529 2530 2848 - 1289 2048 4 673 972 1548 3210 - 1290 512 3 675 1549 2529 - 1291 3072 6 677 977 978 979 1550 3675 - 1292 12288 9 1294 2537 2850 2851 2857 3398 3400 3539 3692 - 1293 12288 19 1552 1553 1771 2695 2852 2853 2856 2861 3464 3466 3474 3475 3540 3543 3546 3707 3708 3709 3720 - 1294 16384 16 990 1292 1300 1302 1305 1774 2537 2697 2851 2857 2858 3400 3465 3467 3547 3706 - 1295 4608 6 2539 2696 2860 2863 3401 3468 - 1296 2048 8 1297 1553 1770 1771 2861 2936 3475 3709 - 1297 16384 18 986 1296 1298 1554 1773 2699 2700 2704 2707 2861 2936 3394 3469 3471 3475 3676 3690 3709 - 1298 12288 13 987 1297 1556 2701 2702 2704 2861 3291 3394 3470 3475 3676 3690 - 1299 6144 13 1555 2705 2855 2856 2862 2938 2939 2940 2941 3465 3466 3474 3581 - 1300 1536 7 1294 1774 2537 2697 2857 2940 3465 - 1301 1536 6 989 1557 2358 2703 2707 3471 - 1302 18432 6 990 1294 1558 2708 2851 2858 - 1303 9216 12 985 992 993 1305 2544 2696 2697 2698 2863 3403 3467 3468 - 1304 2048 6 691 991 2539 2540 2863 3401 - 1305 6144 10 990 992 1294 1303 2708 2858 2863 2864 3467 3468 - 1306 12288 10 180 388 698 1559 1562 1563 1564 2206 2546 3406 - 1307 3072 9 1560 1777 1888 2348 2532 2547 3393 3477 3710 - 1308 512 4 698 996 1562 1563 - 1309 8192 11 408 409 700 998 999 1000 2345 2548 2710 2865 3478 - 1310 4096 7 409 697 999 1000 2345 2346 2865 - 1311 1024 7 700 1001 2548 2710 2943 3055 3582 - 1312 2048 7 1002 1313 1565 2551 3038 3407 3608 - 1313 4096 5 1002 1312 2549 3407 3591 - 1314 512 5 412 997 1889 2709 3582 - 1315 4096 6 704 1568 2013 2351 3042 3293 - 1316 512 6 1004 1317 1570 1571 2713 2714 - 1317 2048 10 705 1004 1005 1006 1022 1316 2713 2714 3296 3298 - 1318 3072 5 958 1008 1320 2524 2847 - 1319 512 4 1007 1009 1573 1574 - 1320 4096 5 706 1008 1318 2524 2847 - 1321 512 3 1009 1010 1575 - 1322 16384 12 1325 1576 1577 1580 1581 1781 1782 2866 2867 2945 2984 3548 - 1323 1024 4 1577 1579 1783 2945 - 1324 1536 4 1577 1580 1581 2945 - 1325 512 4 1322 1576 1580 1581 - 1326 4096 10 1014 1015 1016 1903 1980 2868 3014 3310 3312 3557 - 1327 512 6 2360 2870 2947 3549 3550 3721 - 1328 2048 8 1018 1582 1593 2558 2719 2869 2948 3415 - 1329 6144 13 1338 1584 1585 1792 1953 2720 2721 2870 2947 3481 3482 3483 3722 - 1330 512 3 1023 1024 1586 - 1331 2048 3 1025 3298 3300 - 1332 3072 12 718 1026 1587 1588 1785 1788 2552 2553 2725 2948 3408 3415 - 1333 2048 10 1027 1028 1029 1031 1335 1590 1591 2557 2728 3587 - 1334 512 3 1032 1592 2729 - 1335 3072 11 1026 1028 1031 1032 1033 1333 1590 2557 2725 2728 2730 - 1336 12288 11 1036 1339 1594 2870 2871 2872 3549 3550 3551 3555 3721 - 1337 1024 4 718 1026 1788 2559 - 1338 6144 9 1035 1329 1584 2720 2870 2949 3481 3552 3722 - 1339 4096 4 1036 1037 1336 2871 - 1340 6144 10 429 723 724 1028 1030 1038 2378 2557 2728 3326 - 1341 4096 6 1345 1796 3306 3307 3308 3309 - 1342 6144 17 1344 1353 1603 2733 2734 2741 2873 2875 2876 2954 3487 3488 3491 3553 3554 3556 3723 - 1343 1024 6 1039 1601 1602 1795 2381 3328 - 1344 8192 16 1047 1342 1603 2731 2734 2735 2740 2741 2873 2954 2955 3327 3329 3488 3489 3491 - 1345 4608 8 1341 1604 1796 1903 3306 3307 3308 3309 - 1346 6144 17 423 760 761 1041 1042 1348 1606 2371 2376 2602 2736 2877 2885 3325 3335 3339 3564 - 1347 18432 15 1350 1611 1803 2034 2035 2375 2376 2563 2564 2737 2884 2885 2892 3070 3077 - 1348 2048 6 761 1041 1346 1606 2885 2967 - 1349 6144 16 433 1077 1605 1800 2383 2385 2736 2758 2877 2893 2895 3332 3490 3564 3566 3677 - 1350 6144 14 432 1347 1610 1611 1802 1803 2386 2387 2562 2563 2737 2883 2884 2892 - 1351 512 7 1045 1612 1613 1804 1805 2073 2074 - 1352 1024 7 1045 1046 1599 1601 1613 2953 2955 - 1353 12288 11 726 1342 2565 2733 2734 2741 2875 2876 2896 3491 3556 - 1354 6144 10 730 1355 1356 1609 1614 1615 1806 2956 2959 3586 - 1355 4608 11 1048 1354 1356 1615 2560 2561 2568 2958 2959 3585 3586 - 1356 4096 9 730 1048 1354 1355 1609 1615 2956 2959 3586 - 1357 6144 7 1360 1616 1618 1807 1809 2570 3417 - 1358 2048 7 1359 1808 2087 2355 2960 3295 3629 - 1359 4096 14 418 734 1358 1617 1808 2084 2087 2355 2357 2569 3127 3129 3130 3629 - 1360 12288 8 734 735 1050 1357 1618 1809 2570 2571 - 1361 18432 15 440 442 734 735 1050 1051 1621 2075 2084 2391 2393 2394 2742 3127 3333 - 1362 512 4 1363 1623 2745 3493 - 1363 8192 14 1051 1052 1053 1054 1362 1366 1623 1813 2075 2742 2745 2746 3425 3426 - 1364 1024 5 1624 2743 2744 3419 3696 - 1365 1536 5 25 82 1627 1629 2223 - 1366 6144 9 1052 1054 1363 1630 1813 2745 2746 3425 3426 - 1367 512 4 1027 1634 1635 2013 - 1368 2048 8 1059 1636 1637 1817 3429 3430 3699 3700 - 1369 1024 5 1060 1061 1638 3495 3711 - 1370 3072 6 1371 1639 1819 3121 3428 3627 - 1371 8192 9 1063 1370 1372 2078 2585 3121 3122 3428 3627 - 1372 1024 4 1063 1371 2078 3122 - 1373 4096 13 746 1064 1085 1394 1640 1641 1820 2584 2585 2747 2963 3428 3655 - 1374 9216 16 1065 1642 1643 1821 2589 2748 2749 2897 2965 2990 3431 3432 3433 3494 3699 3700 - 1375 4096 14 1066 1067 1068 1070 1377 1644 1645 1647 2594 2750 2751 2753 3436 3495 - 1376 1024 7 1067 1068 1379 1645 1646 1824 2599 - 1377 2048 10 750 1067 1068 1375 1644 1645 1647 2593 2594 3436 - 1378 12288 12 431 753 1379 1648 1650 1823 2381 2596 2597 2898 3437 3499 - 1379 16384 21 1066 1067 1070 1376 1378 1380 1646 1649 1822 1823 1824 1912 2595 2599 2754 2755 2898 3438 3498 3499 3712 - 1380 4096 6 753 1072 1379 2755 3438 3499 - 1381 512 4 1650 2596 2757 3499 - 1382 2048 7 1651 2382 2383 2598 2893 3437 3677 - 1383 6144 8 754 1075 1385 1652 1655 2597 3334 3678 - 1384 1024 7 455 755 1653 1654 2398 2597 3437 - 1385 2048 7 754 758 1075 1383 1655 2597 2600 - 1386 6144 11 760 1077 1605 1656 1826 1913 2370 2371 2602 2758 2877 - 1387 512 3 1389 2403 3336 - 1388 8192 13 459 461 762 1078 1079 1083 1389 1393 2403 2405 2407 3340 3654 - 1389 4096 8 461 1079 1387 1388 2402 2403 2405 3336 - 1390 4096 8 224 457 465 754 763 1080 2400 3338 - 1391 4096 11 226 460 461 462 466 1081 2146 2401 2402 2405 2406 - 1392 512 5 208 435 1657 3343 3679 - 1393 6144 15 461 764 1083 1388 1657 2403 2404 2405 2408 2967 3339 3340 3341 3654 3679 - 1394 6144 8 746 767 1085 1373 1641 2584 3344 3655 - 1395 8192 16 747 1396 1658 1660 1661 1665 1828 2586 2588 2899 2969 3089 3093 3094 3430 3588 - 1396 2048 12 1395 1660 1661 1665 2901 2969 3089 3090 3093 3094 3095 3588 - 1397 2048 8 240 242 1662 1663 2147 2235 3092 3617 - 1398 6144 12 482 1089 1090 2050 2052 2053 2415 2764 2908 3092 3099 3103 - 1399 6144 13 1400 1664 1665 1963 1964 1983 2900 2901 2903 2969 2970 3567 3588 - 1400 12288 12 1399 1664 1665 2761 2901 2903 2969 2972 3502 3503 3567 3713 - 1401 16384 11 1403 1405 1666 1667 1829 2902 2903 2905 2906 3567 3568 - 1402 12288 11 1092 1403 1667 2603 2767 2904 2905 2972 3506 3507 3714 - 1403 12288 9 1092 1401 1402 1405 1667 1669 2762 2905 3504 - 1404 8192 9 1093 1405 1409 1671 1917 2906 2907 2911 3568 - 1405 24576 9 1093 1401 1403 1404 2763 2902 2905 2906 3504 - 1406 3072 8 775 1092 1669 1830 2603 2762 2974 3569 - 1407 12288 10 1091 1095 2759 2760 2764 2904 2908 3501 3507 3714 - 1408 6144 6 485 2613 2773 2909 2910 3569 - 1409 16384 11 484 1093 1097 1404 1671 2417 2604 2768 2907 2911 2912 - 1410 16384 12 486 775 777 1094 1670 2418 2419 2605 2763 2910 2912 2974 - 1411 9216 11 464 465 778 1099 1100 1101 2417 2768 2769 2770 3508 - 1412 2048 7 491 492 780 781 2425 3106 3623 - 1413 1024 3 473 785 1105 - 1414 2048 6 794 1108 1109 1673 2429 2611 - 1415 512 4 510 1112 1114 2433 - 1416 1024 8 115 270 514 807 808 1118 1674 2612 - 1417 1536 7 1674 2913 3031 3509 3510 3597 3606 - 1418 1536 7 515 1119 2435 2436 2913 3597 3598 - 1419 2048 5 268 810 1120 2253 3049 - 1420 6144 14 1122 1685 2081 2088 2089 2091 2093 2777 2914 2979 3131 3134 3135 3518 - 1421 8192 11 1969 2620 2621 2915 2917 2918 3012 3571 3572 3574 3725 - 1422 24576 15 821 1125 1139 1678 1679 1861 1923 1970 2623 2784 2785 2799 2800 2919 3516 - 1423 6144 13 813 1125 1425 1681 1683 1844 2784 2785 2920 2921 2978 3516 3575 - 1424 8192 11 814 822 823 1140 2922 2923 2924 3576 3577 3578 3726 - 1425 1024 4 1423 1681 1683 2921 - 1426 2048 5 1127 1130 2924 2978 3578 - 1427 9216 6 538 836 1132 1688 1849 2618 - 1428 4096 7 827 1131 1133 1689 1833 1918 2789 - 1429 4096 7 817 1135 1834 2069 2925 2995 3114 - 1430 6144 10 818 1136 1146 1690 1850 1988 2622 2631 3114 3593 - 1431 1024 7 1138 1691 1838 1924 1971 2792 3001 - 1432 512 7 525 528 533 1139 2260 2450 2624 - 1433 6144 9 822 1140 1693 1694 2619 2625 2793 2923 3576 - 1434 12288 12 1695 1696 1862 1931 1935 2090 2092 2926 2928 2929 2981 3135 - 1435 6144 9 1695 1696 1711 1714 1846 1847 1862 2794 2929 - 1436 512 5 1142 1699 2629 2930 3441 - 1437 2048 8 1143 1144 1461 2644 2796 3355 3519 3682 - 1438 1024 4 1146 1463 1700 2630 - 1439 8192 13 1459 1701 1858 1933 2037 2038 2627 2639 2793 3079 3080 3440 3520 - 1440 2048 9 828 833 1148 1702 2459 2796 3355 3358 3682 - 1441 2048 7 820 834 1146 1149 2069 2622 3114 - 1442 2048 8 830 1443 1703 2460 2631 2821 3250 3528 - 1443 4096 10 547 830 1442 1444 1703 2453 2791 2792 2821 3528 - 1444 512 6 297 1443 1703 2266 2453 2792 - 1445 2048 6 297 1150 1151 1152 1153 1161 - 1446 9216 9 1154 1447 1448 1704 1705 1706 1859 1860 1934 - 1447 24576 11 839 1154 1155 1446 1448 1449 1704 1837 1859 1860 2634 - 1448 8192 10 839 1154 1155 1446 1447 1449 1704 1706 1860 2634 - 1449 2048 4 1155 1447 1448 1860 - 1450 4608 6 1158 1707 1861 2636 2798 2927 - 1451 512 3 2452 2635 3001 - 1452 512 3 1159 1708 2453 - 1453 2048 8 544 843 1158 1861 2452 2636 2799 2927 - 1454 3072 3 551 844 1162 - 1455 4608 12 1173 1456 1457 1710 1712 1722 1862 1863 2809 2928 2929 2981 - 1456 6144 11 1173 1455 1457 1710 1713 1722 2809 2928 2929 2981 3359 - 1457 16384 12 1455 1456 1460 1722 2463 2641 2809 2928 2929 2930 3359 3441 - 1458 6144 6 1142 1163 1714 2794 2929 3441 - 1459 3072 10 1165 1439 1715 1866 1936 3080 3081 3082 3440 3661 - 1460 9216 16 856 1167 1457 1468 1870 2463 2641 2642 2805 2806 2929 2930 3359 3441 3442 3521 - 1461 13824 11 846 1143 1169 1437 1462 2637 2644 2796 3355 3519 3682 - 1462 1024 6 846 850 1169 1461 2637 2644 - 1463 24576 14 829 1146 1170 1172 1438 1464 1717 1718 1720 1867 2630 2645 2646 2982 - 1464 6144 11 834 1146 1147 1149 1170 1171 1463 1720 1867 2460 2631 - 1465 512 4 862 1172 1721 2656 - 1466 512 6 1180 1467 1724 1869 2461 2648 - 1467 6144 12 852 1174 1176 1178 1180 1466 1723 1724 2461 2648 2649 2810 - 1468 3072 11 856 1167 1460 1469 1725 1726 1870 2463 2641 2642 3359 - 1469 8192 8 855 1468 1725 1726 2463 2464 3359 3360 - 1470 512 2 855 1726 - 1471 18432 8 1168 1181 1727 2463 2641 2642 2931 3352 - 1472 2048 4 1181 1727 2464 3683 - 1473 2048 7 850 1728 1939 2455 2645 2656 3354 - 1474 16384 10 849 859 1184 1475 1476 2456 2642 2650 2931 3352 - 1475 12288 12 1181 1184 1474 1476 2463 2464 2650 2931 3368 3369 3685 3686 - 1476 4096 11 859 1183 1184 1474 1475 2650 2931 3368 3369 3685 3686 - 1477 8192 16 862 863 1185 1721 1728 1729 1871 1872 1939 2455 2645 2654 2656 2811 3354 3447 - 1478 512 5 863 1186 1729 2471 2472 - 1479 1536 6 1485 2466 2467 2657 3364 3367 - 1480 16384 17 563 858 865 866 1190 1481 1483 1484 1486 1730 2071 2471 2473 3115 3117 3118 3626 - 1481 2048 9 563 865 866 1190 1480 1483 1730 2471 2657 - 1482 1024 7 865 903 1188 1731 2826 3377 3687 - 1483 2048 6 865 1189 1480 1481 1484 1730 - 1484 2048 5 865 1189 1480 1483 1486 - 1485 9216 7 1479 2654 2657 3085 3364 3367 3447 - 1486 32768 22 563 865 915 1189 1191 1250 1480 1484 1487 2070 2071 2072 2471 2473 2474 2497 3115 3118 3183 3376 3460 3638 - 1487 1024 6 1191 1486 3183 3185 3638 3640 - 1488 512 6 1732 3109 3119 3120 3625 3626 - 1489 1024 6 870 1194 1219 1511 1733 1734 - 1490 2048 7 873 1198 1735 1736 2474 2475 2663 - 1491 1024 6 1737 1738 3238 3239 3716 3717 - 1492 12288 11 1206 1494 1495 1740 1741 1742 2812 2932 3138 3139 3522 - 1493 2048 11 1200 1496 1739 1744 1874 2812 2813 2816 2820 3522 3525 - 1494 1024 9 1206 1492 1495 1498 1740 1742 2812 2932 3522 - 1495 18432 14 879 1206 1209 1492 1494 1497 1498 1499 1741 1742 2478 3138 3139 3140 - 1496 2048 7 1200 1203 1208 1493 1744 2816 3258 - 1497 12288 15 1201 1495 1498 1499 1741 1742 2106 2107 2108 2478 2674 2815 3138 3139 3140 - 1498 1024 8 1206 1209 1494 1495 1497 1499 1741 1742 - 1499 2048 7 1206 1209 1495 1497 1498 2478 2674 - 1500 6144 9 868 1210 1501 1745 3189 3191 3259 3644 3646 - 1501 4096 7 1210 1500 1745 1875 2664 3646 3648 - 1502 4096 7 529 849 1211 1503 2633 2643 3439 - 1503 4096 8 529 880 1211 1502 2633 2643 3356 3439 - 1504 18432 15 541 542 573 832 837 1212 1213 1505 1506 1507 1702 2449 2632 3357 3358 - 1505 3072 10 573 1212 1504 2285 2457 2458 2653 3357 3358 3446 - 1506 6144 13 530 541 542 881 1148 1212 1214 1504 1507 1508 1702 2449 3358 - 1507 2048 9 530 541 542 881 1213 1504 1506 1508 2449 - 1508 4096 12 530 542 833 881 1148 1214 1506 1507 1702 2449 2459 3358 - 1509 512 3 1215 1746 2480 - 1510 1024 6 1218 1219 1511 1747 2481 2665 - 1511 6144 13 870 883 1194 1218 1219 1220 1489 1510 1734 1747 2665 2666 3456 - 1512 8192 12 316 581 582 1224 2271 2272 2273 2291 2817 2818 3526 3527 - 1513 24576 10 91 555 853 1225 1514 1748 2142 2647 3458 3669 - 1514 2048 5 1225 1513 1748 2670 3458 - 1515 3072 9 586 893 1239 1516 1517 2485 2933 3375 3687 - 1516 4608 9 1237 1515 1749 1876 2485 2826 2933 3375 3687 - 1517 2048 7 586 893 1515 1519 1750 2485 2933 - 1518 1024 5 596 1227 2494 3532 3533 - 1519 4096 7 586 893 1517 1750 1752 2485 2983 - 1520 2048 4 894 1228 1753 2485 - 1521 2048 5 896 1230 2672 2688 3463 - 1522 512 3 899 1233 2294 - 1523 1024 7 557 1526 1754 2500 3362 3365 3379 - 1524 512 7 902 1235 1755 2675 2676 2824 3459 - 1525 1536 8 1236 2484 2492 2493 2676 3373 3374 3459 - 1526 12288 16 599 604 1236 1246 1523 1527 1757 2492 2499 2500 3362 3363 3365 3366 3373 3379 - 1527 2048 9 599 604 1236 1246 1526 2300 2500 2676 3265 - 1528 2048 6 1238 2466 2492 3363 3373 3529 - 1529 1024 6 598 906 1239 1758 2495 3375 - 1530 2048 8 907 910 911 1242 1243 2498 2678 3378 - 1531 3072 8 903 1188 1238 1759 2466 2467 2657 2828 - 1532 512 4 903 1249 1759 3377 - 1533 18432 6 922 1254 2832 2934 3267 3671 - 1534 2048 4 909 923 1255 3381 - 1535 6144 12 1760 1878 1879 1942 1943 2685 2837 2838 3384 3462 3532 3533 - 1536 4608 8 1261 1762 1880 2684 2839 2840 3384 3385 - 1537 2048 6 630 937 938 1264 1763 2689 - 1538 1024 3 348 939 1265 - 1539 512 5 613 940 1266 1764 2505 - 1540 1024 6 944 1882 2511 2843 3384 3535 - 1541 3072 5 641 938 948 1766 3607 - 1542 4096 4 951 1272 2046 3088 - 1543 13824 11 648 954 1274 1275 1276 1767 1883 2045 2523 2692 3087 - 1544 512 2 1275 1883 - 1545 6144 9 651 653 958 959 1280 1546 2525 2844 3537 - 1546 2048 7 653 1278 1280 1545 2844 2846 3537 - 1547 512 2 962 1282 - 1548 1024 6 673 972 1288 1289 2529 2848 - 1549 512 5 973 1288 1290 2529 2530 - 1550 1024 4 677 977 1291 2694 - 1551 2048 5 2853 2935 3464 3546 3707 - 1552 1024 7 1293 1770 1771 2852 2853 2936 3540 - 1553 1024 9 1293 1296 1771 2852 2861 3474 3475 3708 3709 - 1554 3072 14 986 1297 1557 1772 1773 1884 2699 2700 2707 2936 3469 3471 3676 3709 - 1555 4096 14 1299 2705 2862 2937 2938 2939 3296 3472 3474 3579 3580 3581 3708 3727 - 1556 4096 10 985 987 1298 2695 2702 2704 2861 2941 3474 3475 - 1557 2048 7 1301 1554 1772 1775 2699 2707 3471 - 1558 32768 5 990 1302 2708 2851 2858 - 1559 24576 15 180 387 388 698 1306 1561 1562 1563 1776 1777 2206 2336 2546 2547 3405 - 1560 6144 10 1307 1562 1777 1888 2532 2709 3393 3476 3477 3710 - 1561 512 7 698 1559 1562 1776 2546 2547 3405 - 1562 4096 10 698 1306 1308 1559 1560 1561 1563 2546 2547 3405 - 1563 2048 7 698 1306 1308 1559 1562 2546 3406 - 1564 18432 10 72 179 180 1306 1565 2206 2546 2550 3406 3608 - 1565 2048 7 1312 1564 2550 2551 3406 3407 3608 - 1566 12288 14 203 204 414 702 2032 2218 2219 2350 2352 2942 2943 3055 3293 3582 - 1567 512 7 410 412 698 1889 2550 3041 3609 - 1568 1024 8 703 1315 2013 2351 2551 3040 3042 3610 - 1569 18432 16 1003 1004 1570 1571 1892 2199 2200 2535 2712 2713 2939 2944 3206 3207 3397 3580 - 1570 12288 12 1003 1316 1569 1571 2200 2201 2535 2713 2714 3207 3208 3580 - 1571 2048 7 1003 1004 1316 1569 1570 1892 2713 - 1572 512 6 955 1573 2524 2525 2693 2712 - 1573 16384 16 650 651 955 958 959 1003 1009 1319 1572 1574 1575 2524 2525 2693 2712 2713 - 1574 3072 8 1003 1004 1007 1009 1319 1573 2712 2713 - 1575 2048 9 378 651 653 959 1009 1010 1321 1573 2525 - 1576 2048 8 1322 1325 1577 1581 1782 1950 2867 2945 - 1577 24576 19 1013 1014 1322 1323 1324 1576 1579 1581 1781 1782 1783 1784 2716 2717 2718 2866 2945 3479 3480 - 1578 1024 3 2717 2945 3479 - 1579 1024 5 1323 1577 1783 1784 2945 - 1580 6144 5 1322 1324 1325 1581 2945 - 1581 2048 8 1322 1324 1325 1576 1577 1580 1782 2945 - 1582 3072 6 1328 1593 2869 2946 2948 3415 - 1583 1024 8 1584 2869 2870 2946 2949 3481 3549 3583 - 1584 6144 10 1329 1338 1583 2720 2870 2947 2949 3481 3549 3722 - 1585 9216 11 1329 1792 1899 1953 2361 2870 2947 3482 3483 3550 3722 - 1586 2048 5 1023 1024 1330 3297 3299 - 1587 9216 7 410 1332 1785 2553 2725 3408 3609 - 1588 1024 5 1332 1785 2552 2948 3415 - 1589 1536 5 1590 1591 2725 2727 3486 - 1590 13824 18 1028 1031 1032 1333 1335 1589 1591 1894 2557 2725 2727 2728 2730 3041 3042 3486 3609 3610 - 1591 2048 10 1027 1028 1029 1333 1589 1590 2726 2727 2728 3486 - 1592 2048 5 1026 1032 1334 2725 2729 - 1593 6144 13 1035 1328 1582 1595 2558 2719 2869 2946 2948 2949 3415 3481 3583 - 1594 1024 7 1336 1895 2870 2871 2949 3549 3583 - 1595 512 5 1593 1788 2559 2948 3415 - 1596 512 5 1792 3555 3556 3722 3723 - 1597 12288 12 428 727 1600 1822 2566 2567 2752 2952 3416 3496 3497 3711 - 1598 12288 14 726 1613 1805 1901 2874 2875 2950 2951 2953 2954 2955 3004 3552 3553 - 1599 8192 13 431 1045 1046 1352 1600 1601 1793 1794 1795 2567 2951 2952 2953 - 1600 4096 13 431 727 1046 1597 1599 1601 1602 1794 1795 1822 1823 2567 2952 - 1601 18432 14 431 1039 1046 1343 1352 1599 1600 1794 1795 2731 2953 2955 3327 3328 - 1602 2048 8 431 1343 1600 1648 1795 1822 1823 2381 - 1603 2048 7 1342 1344 2734 2735 2873 3488 3489 - 1604 3072 5 1345 1796 1903 2716 3308 - 1605 6144 14 1349 1386 1651 1800 1913 2370 2371 2758 2877 2893 3320 3325 3564 3677 - 1606 512 4 423 761 1346 1348 - 1607 1024 2 3559 3584 - 1608 1024 3 2956 3561 3586 - 1609 9216 18 730 731 1048 1354 1356 1610 1909 1960 2561 2562 2568 2882 2883 2890 2891 2956 2959 3586 - 1610 3072 12 432 730 731 1350 1609 1802 1909 1960 2562 2563 2891 2892 - 1611 2048 10 1347 1350 1803 2386 2387 2737 2884 2892 3490 3563 - 1612 2048 7 1045 1351 1613 1804 1805 2073 2074 - 1613 2048 11 1045 1351 1352 1598 1612 1804 1805 2074 2950 2951 2953 - 1614 1024 3 1354 1615 1806 - 1615 2048 9 1354 1355 1356 1614 1806 2958 2959 3585 3586 - 1616 4096 4 1357 1807 2570 3417 - 1617 2048 8 418 1359 1808 2354 2355 2357 2569 3417 - 1618 512 4 1357 1360 1809 2570 - 1619 12288 18 77 79 194 195 417 1620 1810 2085 2353 2368 2960 2961 3064 3128 3129 3492 3493 3629 - 1620 2048 10 1619 1810 2085 2960 2961 3128 3129 3492 3493 3629 - 1621 6144 10 734 1361 1811 1911 2075 2076 2084 2569 2742 3127 - 1622 1024 5 1623 2075 2086 2745 3493 - 1623 2048 8 1051 1362 1363 1622 2075 2742 2745 3493 - 1624 18432 19 80 81 196 402 421 1364 1626 1628 1812 2216 2217 2369 2743 2744 3065 3066 3217 3419 3696 - 1625 512 5 25 80 82 1627 3219 - 1626 6144 10 421 424 1624 1628 1812 3066 3067 3219 3696 3697 - 1627 4096 7 25 82 1365 1625 1629 2223 3219 - 1628 3072 9 1624 1626 1629 2223 3219 3419 3420 3696 3697 - 1629 512 5 1365 1627 1628 2223 3219 - 1630 512 3 1366 1813 3425 - 1631 18432 15 703 1633 1634 1814 2013 2079 2351 2549 2962 2988 3040 3123 3124 3293 3628 - 1632 4096 8 422 1633 1815 1816 2012 2726 2989 3040 - 1633 12288 10 1027 1631 1632 1634 1635 1814 1816 2013 2726 3040 - 1634 6144 8 1027 1367 1631 1633 1635 2013 2726 3040 - 1635 2048 7 1027 1367 1633 1634 2013 2726 3040 - 1636 2048 8 1059 1064 1368 1637 1817 2747 3429 3699 - 1637 2048 7 1368 1636 1817 2897 2964 3699 3700 - 1638 2048 5 1060 1369 1818 2378 3711 - 1639 2048 4 1370 1819 3121 3428 - 1640 6144 9 1373 2078 2079 2585 2747 2963 3121 3123 3428 - 1641 2048 6 1064 1373 1394 1820 3344 3655 - 1642 6144 12 1374 1821 2078 2585 2747 2897 2964 2990 3432 3433 3699 3700 - 1643 9216 13 1065 1374 1821 2748 2749 2897 2965 2966 2990 2991 3494 3587 3592 - 1644 4096 8 1070 1375 1377 1647 2594 2751 2753 3436 - 1645 4096 11 1066 1067 1068 1375 1376 1377 1646 1647 2750 2751 3495 - 1646 2048 8 1066 1067 1376 1379 1645 1824 1912 2750 - 1647 512 6 1067 1068 1375 1377 1644 1645 - 1648 512 4 1378 1602 1823 2381 - 1649 1024 5 1379 1822 1823 1912 2898 - 1650 6144 9 431 1378 1381 1825 2381 2596 2898 3499 3712 - 1651 1024 6 1382 1605 2383 2758 2893 3677 - 1652 2048 5 754 1383 2598 3677 3678 - 1653 8192 11 753 1074 1384 1654 2220 2381 2382 2398 2596 2597 3437 - 1654 1024 4 755 1384 1653 3437 - 1655 512 5 754 1075 1383 1385 2597 - 1656 3072 7 1386 1826 1913 1961 2371 2602 2877 - 1657 9216 18 208 435 461 725 764 1042 1082 1392 1393 2033 2403 2404 2408 2967 3339 3340 3341 3679 - 1658 8192 11 1395 1660 1827 1828 1914 1962 2586 2899 2969 3430 3588 - 1659 3072 11 242 770 1086 1662 2235 2236 2968 3094 3095 3616 3617 - 1660 2048 10 1395 1396 1658 1661 1665 1828 2899 2901 2969 3588 - 1661 1024 10 1395 1396 1660 2899 2968 3089 3093 3094 3615 3616 - 1662 4096 9 242 770 1397 1659 1663 2147 2235 2236 3617 - 1663 512 4 240 1397 1662 2235 - 1664 8192 10 1399 1400 1665 1963 2900 2901 2969 2970 3567 3588 - 1665 18432 15 1395 1396 1399 1400 1660 1664 2900 2901 2969 2970 3089 3090 3100 3101 3588 - 1666 12288 10 454 751 756 1401 1829 2902 2906 2971 2992 3568 - 1667 12288 9 1401 1402 1403 2902 2903 2904 2905 2972 3567 - 1668 6144 9 757 1916 1917 2600 2601 2907 2973 3438 3568 - 1669 3072 7 775 1092 1403 1406 2762 2905 3504 - 1670 6144 10 243 485 486 777 1098 1410 2418 2419 2605 2974 - 1671 24576 14 224 456 457 458 757 1097 1404 1409 1831 1917 2417 2768 2907 2911 - 1672 512 6 93 225 463 1102 2146 3345 - 1673 2048 6 794 1107 1108 1109 1414 2771 - 1674 4096 14 515 803 807 808 1416 1417 2434 2612 2913 3031 3045 3597 3606 3612 - 1675 6144 7 219 451 1832 2081 2094 2397 3135 - 1676 12288 10 1133 1833 1991 1993 2915 2975 2994 3571 3572 3725 - 1677 4096 15 820 1154 1836 1853 1924 2635 2791 2792 2976 2977 2998 2999 3001 3589 3595 - 1678 9216 11 1138 1158 1422 1838 1923 1970 2266 2452 2623 2799 2800 - 1679 4608 9 821 1139 1422 1692 1840 1854 1925 2623 2784 - 1680 4608 11 1841 1926 2619 2783 2920 2923 3515 3575 3576 3578 3726 - 1681 12288 9 1127 1423 1425 1683 1844 2920 2921 2978 3575 - 1682 512 4 813 822 1845 2625 - 1683 2048 9 813 1423 1425 1681 1844 2920 2921 2978 3575 - 1684 4096 6 1846 1847 2091 2789 2794 3518 - 1685 16384 22 1122 1420 1686 1687 1696 1697 1848 1855 1856 1857 1932 2091 2093 2628 2629 2777 2779 2790 2914 2979 3512 3518 - 1686 13824 5 1685 1687 1848 2628 2979 - 1687 3072 6 1685 1686 1848 2628 2629 2979 - 1688 2048 6 1132 1427 1849 1929 2618 2780 - 1689 2048 5 827 1131 1142 1428 2789 - 1690 2048 7 1146 1430 1700 1850 1851 2068 3114 - 1691 1024 7 1431 1853 1924 1930 1971 2792 3001 - 1692 2048 8 525 1139 1679 1840 1854 2624 2783 2784 - 1693 3072 5 1433 2619 2624 2625 2783 - 1694 2048 5 1140 1433 2619 2793 3576 - 1695 8192 12 1434 1435 1696 1711 1846 1862 1931 2090 2092 2928 2929 3135 - 1696 18432 19 1434 1435 1685 1695 1699 1711 1846 1855 1856 1862 1931 2090 2091 2093 2794 2928 2929 3135 3518 - 1697 18432 10 1685 1716 1855 1856 1857 1932 2093 2628 2928 2979 - 1698 512 4 1142 1856 2629 3518 - 1699 2048 7 1142 1436 1696 2794 2929 2930 3441 - 1700 4096 7 1146 1438 1690 1851 2068 2630 3114 - 1701 4096 11 1439 1858 1933 2037 2626 2627 2639 2793 3079 3440 3520 - 1702 2048 9 530 1148 1440 1504 1506 1508 2449 3358 3682 - 1703 4096 10 820 830 1442 1443 1444 1852 1853 2631 2791 2792 - 1704 16384 13 1154 1446 1447 1448 1705 1835 1837 1859 1860 1934 2996 3000 3589 - 1705 12288 10 1154 1446 1704 1835 1859 1934 1975 2976 2996 3589 - 1706 512 3 1446 1448 1860 - 1707 6144 6 1158 1450 1861 1923 2927 3007 - 1708 2048 5 1159 1452 2453 2791 2792 - 1709 3072 4 844 1861 2919 3007 - 1710 6144 16 1173 1455 1456 1712 1713 1722 1863 1865 2143 2807 2809 2928 2980 2981 3165 3590 - 1711 1024 7 1435 1695 1696 1714 1862 2794 2929 - 1712 2048 6 1173 1455 1710 1722 1863 2143 - 1713 3072 10 1173 1456 1710 1864 1865 2807 2928 2980 2981 3590 - 1714 512 5 1435 1458 1711 2794 2929 - 1715 512 5 1165 1459 1866 3660 3661 - 1716 4096 3 1697 2628 3521 - 1717 16384 16 829 850 1145 1172 1463 1721 2455 2630 2644 2645 2646 2795 2796 2982 3355 3519 - 1718 4096 9 851 1170 1463 1719 2646 3236 3243 3657 3663 - 1719 512 4 851 1718 3236 3657 - 1720 512 4 1170 1463 1464 1867 - 1721 2048 11 862 1172 1185 1465 1477 1717 1728 2455 2645 2656 3355 - 1722 13824 10 1173 1455 1456 1457 1710 1712 1723 1937 2143 2809 - 1723 6144 14 852 1173 1174 1175 1178 1467 1722 1724 1868 1869 1937 2461 2648 2809 - 1724 2048 10 852 1174 1178 1466 1467 1723 1868 1869 2461 2648 - 1725 2048 5 1468 1469 1726 1870 3359 - 1726 3072 5 855 1468 1469 1470 1725 - 1727 2048 5 1181 1471 1472 2463 2464 - 1728 4096 12 850 1473 1477 1721 1729 1871 1872 1939 2455 2645 2654 2656 - 1729 2048 10 862 863 1185 1186 1477 1478 1728 1872 2654 2656 - 1730 1024 4 865 1480 1481 1483 - 1731 2048 8 903 1188 1482 2466 2826 3377 3529 3687 - 1732 6144 13 561 862 863 1172 1186 1488 2645 2646 2656 3109 3110 3625 3626 - 1733 2048 7 1194 1489 1734 2269 3243 3452 3454 - 1734 4096 9 1194 1219 1489 1511 1733 1747 2269 2665 3456 - 1735 2048 7 1198 1490 1736 2072 2473 2474 2659 - 1736 2048 6 1490 1735 2474 2475 2659 2663 - 1737 2048 6 1199 1491 1738 1873 3450 3451 - 1738 3072 8 1199 1491 1737 3238 3450 3451 3523 3716 - 1739 9216 14 1200 1493 1874 1940 2638 2812 2813 2816 3239 3240 3522 3524 3525 3717 - 1740 24576 18 29 847 848 1164 1166 1492 1494 1741 1742 2104 2106 2801 2812 2814 2815 2932 3138 3522 - 1741 8192 13 1492 1495 1497 1498 1740 1742 2106 2107 2814 2815 2932 3138 3139 - 1742 2048 9 1206 1492 1494 1495 1497 1498 1740 1741 2932 - 1743 1024 6 1200 1203 1976 2813 2816 3525 - 1744 1024 7 1200 1203 1208 1493 1496 2816 2820 - 1745 2048 6 1210 1500 1501 1875 3644 3646 - 1746 2048 7 859 1183 1215 1509 2480 3368 3369 - 1747 1024 9 1194 1219 1510 1511 1734 2269 2270 2481 2665 - 1748 2048 6 91 853 1177 1225 1513 1514 - 1749 1024 9 1237 1516 1876 2825 2826 2933 3375 3529 3687 - 1750 512 5 586 893 1517 1519 2485 - 1751 512 6 596 1227 1237 2494 2825 2933 - 1752 1024 2 586 1519 - 1753 512 3 1228 1520 2485 - 1754 2048 7 557 1523 1877 2298 2462 3378 3379 - 1755 13824 11 584 902 1235 1524 1756 2483 2675 2676 2824 3370 3459 - 1756 2048 11 133 909 1235 1245 1755 2162 2163 2299 2824 3173 3265 - 1757 512 5 1526 2492 3362 3363 3373 - 1758 2048 10 586 894 906 1229 1239 1241 1529 2485 2495 3375 - 1759 6144 13 865 866 903 914 1188 1248 1249 1250 1531 1532 2657 2828 3377 - 1760 24576 15 930 931 1259 1535 1878 1879 1942 1943 1944 2685 2837 2838 3462 3532 3533 - 1761 1024 5 586 1229 2839 2983 3534 - 1762 2048 6 1536 1880 1945 2684 2840 3385 - 1763 512 4 937 938 1537 2689 - 1764 2048 7 327 902 1266 1539 1881 2299 2505 - 1765 512 6 634 1882 2517 2519 3390 3535 - 1766 3072 5 641 937 938 948 1541 - 1767 1024 6 954 1274 1275 1276 1543 1883 - 1768 18432 10 655 656 1279 1281 2061 2065 2845 2846 3111 3112 - 1769 8192 8 662 1770 2526 2852 2936 3540 3708 3709 - 1770 2048 7 1296 1552 1769 1771 2852 2936 3540 - 1771 2048 11 1293 1296 1552 1553 1770 2852 2936 3474 3475 3708 3709 - 1772 4096 10 1554 1557 1775 1884 1946 2699 2707 2936 3471 3709 - 1773 2048 7 986 1297 1554 1884 2699 2700 3469 - 1774 4096 9 1294 1300 2537 2697 2857 2862 2940 3398 3465 - 1775 1024 4 1557 1772 2699 3471 - 1776 4096 8 387 1559 1561 1777 1887 2336 2547 3405 - 1777 9216 10 1307 1559 1560 1776 1887 1888 2532 2700 3002 3393 - 1778 512 3 1889 1890 3582 - 1779 3072 4 1780 1891 2536 3399 - 1780 1024 7 1779 1891 1892 2535 2536 3397 3399 - 1781 16384 18 175 177 661 963 1013 1322 1577 1782 2204 2715 2716 2866 2867 2945 2984 3479 3480 3548 - 1782 9216 13 1322 1576 1577 1581 1781 1893 1950 1978 2866 2867 2945 2984 3548 - 1783 4096 9 1323 1577 1579 1784 2717 2718 2945 3479 3480 - 1784 2048 8 1577 1579 1783 2717 2718 2945 3479 3480 - 1785 1024 5 1332 1587 1588 2552 3408 - 1786 1024 2 2726 3610 - 1787 512 6 718 1895 2552 2556 3411 3583 - 1788 4096 10 718 1026 1332 1337 1595 2552 2559 2948 3415 3583 - 1789 1024 8 1790 1896 1897 1979 3302 3303 3304 3305 - 1790 3072 8 1789 1791 1897 1952 3302 3303 3304 3305 - 1791 512 7 1790 1897 1952 2361 2362 3303 3305 - 1792 6144 9 1329 1585 1596 1899 1953 3482 3483 3722 3723 - 1793 1024 5 1599 1901 2951 2952 2953 - 1794 512 4 1599 1600 1601 1795 - 1795 4096 10 431 1046 1343 1599 1600 1601 1602 1794 2381 3328 - 1796 2048 5 1341 1345 1604 3306 3308 - 1797 512 3 1904 1905 3559 - 1798 12288 12 1019 1907 1955 2724 3317 3318 3322 3323 3487 3488 3561 3562 - 1799 1024 7 1955 3318 3319 3323 3324 3562 3563 - 1800 12288 12 1349 1605 2370 2371 2877 2893 2895 2985 3320 3325 3564 3566 - 1801 6144 7 1043 1958 1959 2738 2879 2887 2986 - 1802 512 8 1350 1610 1803 1960 2883 2884 2891 2892 - 1803 1024 7 1347 1350 1611 1802 2883 2884 2892 - 1804 9216 10 722 1045 1351 1612 1613 1805 2074 2379 2950 2951 - 1805 2048 8 1351 1598 1612 1613 1804 2950 2951 2953 - 1806 4096 6 1354 1614 1615 2956 3585 3586 - 1807 4096 4 1357 1616 1809 1910 - 1808 512 6 418 1358 1359 1617 2355 2357 - 1809 4096 5 1357 1360 1618 1807 2570 - 1810 4096 5 1619 1620 2960 2961 3492 - 1811 512 3 1621 1911 2569 - 1812 1536 5 421 424 1624 1626 3219 - 1813 6144 7 1363 1366 1630 2393 2742 2745 3425 - 1814 9216 10 703 1631 1633 1816 2549 2962 2987 2988 3040 3591 - 1815 9216 8 7 22 187 422 1632 2096 2726 2989 - 1816 6144 10 422 1632 1633 1814 2012 2726 2987 2989 3038 3040 - 1817 512 4 1059 1368 1636 1637 - 1818 512 3 1638 2378 3711 - 1819 1024 4 1370 1639 3121 3627 - 1820 2048 4 1064 1373 1641 2747 - 1821 6144 12 1374 1642 1643 2078 2585 2747 2897 2965 2990 2991 3122 3592 - 1822 18432 15 431 727 1066 1379 1597 1600 1602 1649 1823 1912 2566 2750 2752 2898 3496 - 1823 8192 10 431 1378 1379 1600 1602 1648 1649 1822 2381 2898 - 1824 2048 6 1067 1376 1379 1646 1912 2599 - 1825 2048 4 1650 2898 3499 3712 - 1826 512 3 1386 1656 1913 - 1827 4096 8 1658 1828 1914 1962 1982 2586 2969 3588 - 1828 512 7 1395 1658 1660 1827 1914 2969 3588 - 1829 12288 11 454 750 756 1401 1666 1963 1983 2902 2903 2992 3567 - 1830 2048 7 775 1406 1915 2603 2762 2974 3569 - 1831 1024 6 457 757 1671 1917 2600 2768 - 1832 4096 8 218 451 1675 2081 2225 2397 2993 3125 - 1833 3072 8 1131 1133 1428 1676 1918 2994 3570 3571 - 1834 16384 17 524 817 1137 1429 1835 1921 1966 1968 1986 1988 2069 2995 2996 3006 3010 3016 3114 - 1835 8192 14 1154 1704 1705 1834 1921 1934 1968 1975 2976 2996 2998 3006 3589 3595 - 1836 6144 22 818 820 1677 1853 1924 1930 1971 1974 1989 2791 2792 2976 2977 2997 2998 2999 3001 3589 3593 3594 3595 3728 - 1837 4096 4 1447 1704 2634 3000 - 1838 6144 13 1138 1158 1431 1678 1923 1924 1970 2266 2452 2792 2799 2800 3001 - 1839 4608 2 2919 3516 - 1840 2048 8 1139 1679 1692 1854 1925 1972 2783 2784 - 1841 3072 6 1680 2619 2923 3576 3578 3726 - 1842 6144 12 1129 1843 1927 1928 1973 2626 2627 2786 2793 2922 3008 3576 - 1843 2048 5 1129 1842 2626 2627 2786 - 1844 9216 12 813 1423 1681 1683 1845 2619 2920 2921 2923 2978 3575 3578 - 1845 2048 7 813 822 1682 1844 2619 2625 2923 - 1846 6144 10 1435 1684 1695 1696 1847 2090 2091 2092 2794 3134 - 1847 512 5 1435 1684 1846 2091 2794 - 1848 4096 10 1123 1685 1686 1687 2779 2780 2790 2979 3512 3518 - 1849 2048 4 1427 1688 1929 2618 - 1850 1024 6 1430 1690 1988 2068 3114 3593 - 1851 512 5 1146 1690 1700 2068 3114 - 1852 1024 6 818 820 1703 1853 1930 2631 - 1853 4096 14 820 830 1677 1691 1703 1836 1852 1924 1930 1971 2631 2791 2792 3001 - 1854 1024 5 1139 1679 1692 1840 2784 - 1855 1024 9 1685 1696 1697 1856 1931 1932 2091 2093 2979 - 1856 4096 13 1142 1685 1696 1697 1698 1855 1857 1932 2091 2093 2794 2979 3518 - 1857 512 6 1685 1697 1856 2628 2629 2979 - 1858 2048 5 1439 1701 1933 3440 3520 - 1859 3072 6 1446 1447 1704 1705 1860 1934 - 1860 4096 7 1446 1447 1448 1449 1704 1706 1859 - 1861 8192 11 1158 1422 1450 1453 1707 1709 1923 2799 2919 2927 3007 - 1862 9216 11 1434 1435 1455 1695 1696 1711 1863 1931 2928 2929 2981 - 1863 2048 5 1455 1710 1712 1862 2981 - 1864 2048 6 1713 1865 1935 2928 2981 3590 - 1865 3072 8 1173 1710 1713 1864 2807 2980 2981 3590 - 1866 2048 7 1459 1715 1936 3080 3081 3660 3661 - 1867 2048 7 829 1146 1149 1170 1463 1464 1720 - 1868 2048 7 1174 1723 1724 1869 1937 1938 2648 - 1869 1024 7 1174 1466 1723 1724 1868 1938 2648 - 1870 1024 6 1167 1460 1468 1725 2805 3359 - 1871 1024 5 1477 1728 1939 2654 3447 - 1872 512 5 1477 1728 1729 2654 2656 - 1873 1024 4 1199 1737 3450 3451 - 1874 512 7 1200 1493 1739 1940 2812 2813 3522 - 1875 512 3 1501 1745 3646 - 1876 1024 4 1516 1749 2826 3687 - 1877 512 5 557 1754 2298 2462 3263 - 1878 2048 7 1535 1760 1879 1942 1943 3532 3533 - 1879 4096 8 1535 1760 1878 1942 1943 1944 2685 3462 - 1880 2048 5 1536 1762 1945 3384 3385 - 1881 512 5 902 1764 2505 2675 2836 - 1882 4096 11 353 933 1269 1540 1765 2511 2519 2685 3384 3390 3535 - 1883 4096 4 1275 1543 1544 1767 - 1884 2048 6 1554 1772 1773 1946 2699 3469 - 1885 2048 7 1886 1947 2082 2083 2541 3126 3402 - 1886 2048 6 1885 1947 1977 3126 3401 3402 - 1887 6144 7 1776 1777 1888 1948 2700 3002 3469 - 1888 1024 9 986 1307 1560 1777 1887 2532 2700 3002 3393 - 1889 4096 11 412 698 996 1314 1567 1778 1890 2550 2709 3406 3582 - 1890 2048 8 1778 1889 2550 2551 2942 3406 3407 3582 - 1891 1024 7 1779 1780 1892 1949 2944 3397 3399 - 1892 4096 11 1569 1571 1780 1891 2535 2536 2939 2944 3397 3399 3580 - 1893 512 3 1782 1978 2984 - 1894 512 4 1590 2725 3041 3609 - 1895 2048 9 718 1594 1787 2552 2556 2871 3411 3549 3583 - 1896 4096 8 717 1789 1897 1951 1979 3003 3302 3303 - 1897 9216 11 1789 1790 1791 1896 1898 1952 3003 3302 3303 3304 3305 - 1898 1536 6 425 1897 1899 1952 3003 3550 - 1899 6144 11 1585 1792 1898 1900 1952 1953 2361 2870 2947 3482 3550 - 1900 512 4 1899 1953 2870 3550 - 1901 12288 13 714 1017 1018 1598 1793 1902 2379 2558 2719 2950 2951 2953 3004 - 1902 1024 4 1901 2379 2558 2951 - 1903 24576 15 1014 1015 1326 1345 1604 1980 2716 2868 3014 3308 3309 3310 3311 3557 3558 - 1904 2048 5 1797 1905 1954 2365 3559 - 1905 2048 7 1797 1904 2365 3316 3321 3559 3560 - 1906 1024 7 1020 1955 1956 3318 3319 3488 3489 - 1907 512 4 1798 1955 3561 3562 - 1908 1024 7 1040 1956 2732 2735 2985 3489 3565 - 1909 512 4 730 1609 1610 1960 - 1910 1024 1 1807 - 1911 2048 6 205 418 1621 1811 2569 3127 - 1912 4096 9 1066 1067 1379 1646 1649 1822 1824 2750 2898 - 1913 2048 8 1386 1605 1656 1826 1961 2370 2371 2877 - 1914 1024 4 1658 1827 1828 1962 - 1915 512 3 1830 2762 2974 - 1916 2048 5 757 1668 1917 2600 2907 - 1917 4096 10 457 757 1404 1668 1671 1831 1916 2600 2907 2911 - 1918 12288 14 1123 1131 1133 1428 1833 1965 1984 2779 2789 2790 2994 3518 3570 3571 - 1919 1024 3 1968 1975 2996 - 1920 12288 10 816 1134 1969 1985 2447 2925 2995 3005 3010 3012 - 1921 16384 16 1137 1834 1835 1966 1968 1988 2069 2622 2976 2996 2998 3006 3016 3114 3589 3595 - 1922 2048 6 1924 1989 2977 2999 3001 3594 - 1923 3072 11 1158 1422 1678 1707 1838 1861 1970 2799 2919 3007 3013 - 1924 6144 16 1138 1431 1677 1691 1836 1838 1853 1922 1930 1971 1989 2791 2792 2977 2999 3001 - 1925 2048 4 1679 1840 1972 2784 - 1926 1024 4 1680 2619 2783 3515 - 1927 2048 6 1842 2627 2793 2922 3008 3576 - 1928 2048 9 1129 1842 1973 2788 2922 3008 3576 3577 3726 - 1929 512 4 1688 1849 2618 2780 - 1930 2048 9 818 820 1691 1836 1852 1853 1924 1971 1974 - 1931 8192 15 1434 1695 1696 1855 1862 1932 1935 2090 2091 2093 2926 2928 2929 2981 3135 - 1932 1024 7 1685 1697 1855 1856 1931 2093 2979 - 1933 1024 4 1439 1701 1858 2793 - 1934 4096 7 1446 1704 1705 1835 1859 1975 2996 - 1935 1024 7 1434 1864 1931 2926 2928 2981 3590 - 1936 512 4 1459 1866 3080 3081 - 1937 4096 8 1173 1174 1722 1723 1868 1938 2143 2144 - 1938 1024 7 1174 1868 1869 1937 2144 2145 2648 - 1939 4096 7 850 1473 1477 1728 1871 2455 3354 - 1940 2048 6 1739 1874 2638 2813 3240 3522 - 1941 2048 7 569 1976 2274 2477 2813 3241 3248 - 1942 4096 7 1535 1760 1878 1879 1943 3532 3533 - 1943 512 5 1535 1760 1878 1879 1942 - 1944 1024 2 1760 1879 - 1945 512 4 1762 1880 3384 3385 - 1946 512 4 1772 1884 2699 3469 - 1947 2048 6 1885 1886 1977 2083 3126 3401 - 1948 2048 3 1887 3002 3469 - 1949 1024 4 1891 2944 3397 3399 - 1950 1024 4 1576 1782 1978 2867 - 1951 512 3 717 1896 1979 - 1952 9216 12 425 1790 1791 1897 1898 1899 2361 2362 3003 3303 3305 3550 - 1953 2048 11 1329 1585 1792 1899 1900 2870 2947 3482 3483 3550 3722 - 1954 2048 5 1904 2365 3311 3558 3559 - 1955 4096 14 1019 1020 1798 1799 1906 1907 3317 3318 3322 3323 3487 3488 3561 3562 - 1956 3072 9 715 1020 1906 1908 2732 2985 3318 3319 3489 - 1957 2048 7 1959 1981 2878 2879 2986 3557 3558 - 1958 8192 8 1801 1959 2879 2880 2957 3558 3559 3584 - 1959 2048 8 1801 1957 1958 2878 2879 2986 3557 3558 - 1960 2048 8 1609 1610 1802 1909 2883 2891 2892 2956 - 1961 512 3 1656 1913 2371 - 1962 2048 6 1658 1827 1914 1982 2586 3430 - 1963 24576 10 750 1399 1664 1829 1983 2593 2900 2970 2992 3567 - 1964 512 5 1399 1983 2900 2903 3567 - 1965 16384 15 1122 1123 1918 1984 1990 2778 2779 2781 2994 3009 3513 3570 3571 3724 3725 - 1966 16384 10 1834 1921 1968 1986 1996 1997 2995 3006 3010 3016 - 1967 2048 3 1985 3010 3011 - 1968 4096 8 1834 1835 1919 1921 1966 1986 2996 3006 - 1969 16384 8 816 1421 1920 2621 2915 2918 3012 3572 - 1970 4096 7 1422 1678 1838 1923 2919 3007 3013 - 1971 1024 8 1431 1691 1836 1853 1924 1930 1974 1989 - 1972 512 4 1840 1925 2783 2784 - 1973 512 6 1129 1842 1928 2786 2788 3517 - 1974 512 6 818 820 1836 1930 1971 2997 - 1975 4096 5 1705 1835 1919 1934 2996 - 1976 512 4 1743 1941 2813 3525 - 1977 512 3 1886 1947 3401 - 1978 2048 6 1782 1893 1950 2867 2984 3548 - 1979 2048 5 717 1789 1896 1951 3302 - 1980 3072 5 1326 1903 2868 3014 3557 - 1981 2048 4 1957 2878 2986 3557 - 1982 512 4 1827 1962 2586 3430 - 1983 3072 8 1399 1829 1963 1964 2900 2903 2992 3567 - 1984 3072 9 1122 1131 1918 1965 1990 2779 2789 2790 3518 - 1985 16384 10 1920 1967 1987 1991 2995 3005 3010 3011 3012 3015 - 1986 2048 5 1834 1966 1968 2995 3010 - 1987 4096 8 1985 1991 1992 1993 1994 3005 3012 3015 - 1988 16384 12 1430 1834 1850 1921 2069 2622 2998 3016 3114 3593 3595 3728 - 1989 4096 7 1836 1922 1924 1971 2997 2999 3594 - 1990 512 4 1122 1965 1984 2779 - 1991 24576 10 1676 1985 1987 1993 1994 2915 2975 3012 3015 3572 - 1992 1024 4 1987 1993 1994 3005 - 1993 6144 9 1676 1987 1991 1992 1994 2915 2975 3012 3572 - 1994 4096 6 1987 1991 1992 1993 3005 3015 - 1995 3072 5 1996 3006 3016 3595 3728 - 1996 2048 5 1966 1995 1997 3006 3016 - 1997 3072 3 1966 1996 3006 - 1998 12288 7 1 123 284 2002 2018 3017 3028 - 1999 3072 9 56 57 59 60 165 370 2131 2331 3018 - 2000 6144 6 57 164 2194 3018 3019 3596 - 2001 512 5 268 2612 3049 3611 3612 - 2002 16384 10 119 284 1998 2004 2018 2024 3017 3027 3028 3604 - 2003 6144 13 2014 2036 2774 2775 3020 3030 3031 3044 3045 3078 3597 3606 3612 - 2004 4096 6 119 120 2002 3027 3028 3604 - 2005 4096 12 122 279 280 2015 2445 3021 3022 3023 3050 3598 3599 3600 - 2006 16384 14 10 59 61 170 2007 2008 2097 2197 2332 3032 3033 3034 3204 3607 - 2007 6144 8 10 170 2006 2008 2097 2332 3033 3034 - 2008 8192 8 56 60 61 2006 2007 2130 3033 3034 - 2009 2048 8 2010 2011 2966 2991 3036 3037 3587 3592 - 2010 4096 10 2009 2011 2013 2966 2991 3036 3037 3042 3587 3592 - 2011 2048 13 415 704 2009 2010 2013 2351 2991 3036 3037 3042 3122 3124 3592 - 2012 12288 15 22 186 187 393 422 1632 1816 2726 2987 2989 3038 3039 3040 3608 3610 - 2013 12288 25 415 703 704 1027 1315 1367 1568 1631 1633 1634 1635 2010 2011 2351 2551 2726 3036 3037 3040 3042 3122 3124 3587 3592 3610 - 2014 4096 7 2003 3020 3031 3044 3045 3597 3612 - 2015 2048 8 279 280 1121 2005 2022 3020 3021 3022 - 2016 2048 7 281 523 2023 3024 3046 3601 3613 - 2017 6144 9 282 3025 3026 3046 3047 3051 3602 3603 3613 - 2018 1024 6 123 284 1998 2002 2024 3027 - 2019 2048 6 177 381 661 674 2531 3048 - 2020 2048 7 381 674 2716 3048 3216 3308 3310 - 2021 4096 8 520 810 1120 3043 3044 3049 3611 3612 - 2022 2048 6 1121 2015 2036 2775 3020 3021 - 2023 1024 6 523 2016 2445 3023 3024 3050 - 2024 1024 6 282 284 2002 2018 3027 3051 - 2025 3072 8 357 362 2026 2323 2324 3053 3279 3614 - 2026 512 5 356 2025 2324 3279 3614 - 2027 4096 11 154 155 264 508 2189 2431 3052 3053 3169 3346 3614 - 2028 6144 13 379 654 657 961 1278 2030 2061 2063 2065 2202 2846 3054 3112 - 2029 1536 7 380 658 2030 2063 2064 2065 3112 - 2030 13824 22 173 176 380 656 657 658 660 709 961 1011 1012 2028 2029 2061 2063 2064 2065 2202 2715 2984 3054 3112 - 2031 4096 4 411 2032 2548 3055 - 2032 18432 12 203 204 414 702 1566 2031 2218 2219 2350 2352 2943 3055 - 2033 3072 15 89 208 217 435 725 1082 1657 2035 2140 2388 2564 2967 3063 3164 3679 - 2034 4096 6 216 217 1347 2035 3070 3077 - 2035 6144 12 89 216 217 1347 2033 2034 2563 2564 3062 3063 3070 3077 - 2036 1536 6 1121 2003 2022 2775 3020 3078 - 2037 12288 14 526 823 1439 1701 2038 2039 2627 2639 2793 2802 3079 3082 3440 3520 - 2038 4096 10 823 1439 2037 2039 2627 2639 2793 3080 3082 3440 - 2039 24576 14 286 527 823 1140 2037 2038 2262 2627 2639 2793 3082 3242 3440 3662 - 2040 1024 5 546 841 2041 3083 3084 - 2041 18432 11 544 546 839 840 841 2040 2454 2634 2636 3083 3084 - 2042 2048 8 562 2043 2044 2470 2655 3085 3086 3447 - 2043 12288 14 302 562 564 866 914 1248 2042 2044 2467 2470 2657 2828 3085 3367 - 2044 6144 6 564 2042 2043 2472 3085 3086 - 2045 2048 10 953 1274 1543 2046 2047 2692 3087 3088 3206 3207 - 2046 1536 6 1272 1542 2045 2047 3087 3088 - 2047 4096 11 951 953 1272 2045 2046 2048 2692 3087 3088 3206 3207 - 2048 4096 9 951 2047 2535 3088 3206 3207 3396 3397 3691 - 2049 1536 9 1088 2050 2052 2908 3091 3095 3102 3501 3713 - 2050 4096 12 1088 1089 1398 2049 2052 3091 3092 3095 3099 3102 3617 3620 - 2051 2048 9 1089 2054 2147 2148 2415 3092 3098 3099 3103 - 2052 8192 19 482 1398 2049 2050 2053 2415 2760 2908 3091 3095 3099 3102 3103 3105 3501 3503 3620 3622 3713 - 2053 4096 13 482 1398 2052 2415 2760 2908 3099 3102 3103 3105 3503 3620 3622 - 2054 512 6 1089 2051 2148 2415 3099 3103 - 2055 6144 10 251 491 492 780 2057 2244 2425 3106 3107 3623 - 2056 6144 4 463 3106 3108 3623 - 2057 3072 6 228 2055 3106 3107 3108 3623 - 2058 3072 5 5 522 2066 2774 3113 - 2059 6144 13 561 566 863 869 1186 2060 2072 2471 2472 3109 3118 3120 3626 - 2060 1024 6 561 863 2059 2472 3109 3110 - 2061 12288 14 961 1278 1281 1768 2028 2030 2062 2063 2065 2845 2846 3054 3111 3112 - 2062 1024 5 1278 2061 2846 3054 3111 - 2063 6144 11 380 657 658 2028 2029 2030 2061 2064 2065 3054 3112 - 2064 4096 9 655 963 1283 2029 2030 2063 2065 2204 3112 - 2065 6144 17 655 656 660 961 963 1281 1283 1768 2028 2029 2030 2061 2063 2064 2204 3054 3112 - 2066 2048 7 522 2058 2774 3029 3030 3078 3113 - 2067 2048 5 1145 2068 2630 2795 3114 - 2068 9216 10 1145 1146 1690 1700 1850 1851 2067 2630 2795 3114 - 2069 16384 16 287 524 817 819 1135 1137 1429 1441 1834 1921 1988 2263 2264 2622 3114 3235 - 2070 8192 12 1486 2071 2072 3115 3116 3117 3118 3120 3448 3624 3626 3703 - 2071 3072 5 1480 1486 2070 3115 3117 - 2072 12288 15 1486 1735 2059 2070 2473 2474 2659 3109 3115 3118 3120 3448 3453 3626 3703 - 2073 1536 6 1045 1351 1612 2074 2567 3416 - 2074 13824 12 722 1045 1351 1612 1613 1804 2073 2379 2567 2951 2952 3416 - 2075 12288 15 1051 1361 1363 1621 1622 1623 2076 2084 2086 2087 2742 2745 3127 3130 3493 - 2076 12288 14 1621 2075 2077 2085 2086 2087 2742 2745 3127 3128 3129 3130 3493 3629 - 2077 512 6 417 2076 3064 3071 3128 3493 - 2078 9216 20 1063 1371 1372 1640 1642 1821 2079 2585 2747 2964 2990 2991 3121 3122 3123 3124 3428 3592 3627 3628 - 2079 4096 12 1631 1640 2078 2747 2962 2964 2990 3122 3123 3124 3592 3628 - 2080 1024 3 203 414 3627 - 2081 32768 19 218 219 220 451 1420 1675 1832 2089 2091 2093 2094 2225 2397 2914 2993 3125 3133 3134 3135 - 2082 9216 8 693 995 1885 2346 2541 2542 3126 3402 - 2083 1024 5 1885 1947 2540 3126 3401 - 2084 4608 8 734 1050 1359 1361 1621 2075 3127 3130 - 2085 2048 12 1619 1620 2076 2086 2960 2961 3128 3129 3130 3492 3493 3629 - 2086 6144 9 1622 2075 2076 2085 3128 3129 3130 3493 3629 - 2087 9216 13 417 418 734 1358 1359 2075 2076 2355 2569 3127 3129 3130 3629 - 2088 2048 11 1122 1420 2089 2777 2778 2914 3131 3132 3133 3511 3630 - 2089 8192 9 1420 2081 2088 2914 3125 3131 3132 3133 3630 - 2090 2048 10 1434 1695 1696 1846 1931 2091 2092 2093 3134 3135 - 2091 16384 17 1420 1684 1685 1696 1846 1847 1855 1856 1931 2081 2090 2093 2789 2794 3134 3135 3518 - 2092 512 5 1434 1695 1846 2090 3135 - 2093 16384 16 1420 1685 1696 1697 1855 1856 1931 1932 2081 2090 2091 2095 2914 2979 3134 3135 - 2094 8192 7 219 451 1675 2081 2397 2926 3135 - 2095 512 3 2093 2914 2979 - 2096 6144 6 7 22 187 422 1815 2989 - 2097 16384 13 10 110 170 260 791 2006 2007 2332 3032 3033 3034 3204 3607 - 2098 13824 13 23 78 79 194 2137 2217 2368 2369 2743 3217 3314 3315 3492 - 2099 4096 6 20 24 2100 3136 3317 3322 - 2100 4608 7 24 2099 2372 2373 3136 3321 3322 - 2101 24576 9 27 88 90 215 449 450 2140 2141 3164 - 2102 8192 11 28 29 1164 1166 2103 2104 2801 2802 2804 3137 3520 - 2103 8192 7 28 92 223 2102 2803 2804 3137 - 2104 6144 14 28 29 1164 1166 1740 2102 2106 2801 2802 2804 2814 2932 3138 3520 - 2105 12288 10 9 30 590 900 2108 2478 2486 2674 3140 3371 - 2106 12288 10 29 1497 1740 1741 2104 2107 2814 2815 3138 3139 - 2107 12288 11 1201 1497 1741 2106 2108 2489 2674 2815 3138 3139 3140 - 2108 12288 11 30 589 900 1201 1497 2105 2107 2489 2674 3139 3140 - 2109 18432 10 3 18 19 35 40 114 124 266 267 2115 - 2110 16384 9 121 273 518 2111 2160 2446 3141 3142 3351 - 2111 16384 10 273 281 2110 2112 2257 2446 3141 3142 3143 3613 - 2112 16384 9 276 2111 2113 2257 3047 3142 3143 3144 3613 - 2113 16384 10 117 276 2112 2114 2257 2259 3047 3143 3144 3145 - 2114 16384 9 38 39 117 283 2113 2115 2259 3144 3145 - 2115 24576 11 3 6 12 35 39 40 114 124 2109 2114 3145 - 2116 12288 12 42 132 304 305 317 318 319 2280 2284 2292 3155 3156 - 2117 9216 14 136 145 588 2118 2172 2173 2179 2488 3148 3149 3152 3153 3633 3636 - 2118 9216 13 46 145 2117 2121 2122 2179 3148 3149 3152 3153 3156 3633 3636 - 2119 12288 14 45 48 49 142 337 611 2120 2180 3150 3151 3154 3155 3634 3635 - 2120 9216 14 49 2119 2121 2180 2181 3150 3151 3152 3154 3155 3156 3634 3635 3636 - 2121 9216 13 46 145 2118 2120 2122 2181 3151 3152 3153 3155 3156 3635 3636 - 2122 13824 10 42 46 127 305 2118 2121 3152 3153 3156 3636 - 2123 13824 9 47 143 144 164 2178 2179 2180 2181 3198 - 2124 9216 11 50 141 164 2169 2170 2177 2184 2194 3178 3179 3199 - 2125 6144 14 52 55 265 2126 2127 2129 2132 2134 3157 3158 3159 3161 3162 3637 - 2126 6144 8 52 2125 2127 2128 3157 3158 3159 3637 - 2127 8192 12 52 159 2125 2126 2196 3157 3158 3159 3161 3162 3203 3637 - 2128 12288 15 53 54 162 163 366 368 510 511 1114 2126 2129 2433 3157 3171 3172 - 2129 9216 11 54 55 162 265 511 1114 2125 2128 3157 3171 3172 - 2130 16384 12 56 59 60 370 371 643 2008 2131 2331 3033 3034 3160 - 2131 16384 12 56 135 165 323 324 370 1999 2130 2164 2295 2331 3160 - 2132 12288 17 52 55 63 66 67 68 69 265 512 513 801 2125 2133 2134 2252 3161 3162 - 2133 24576 15 36 37 63 66 111 171 373 512 645 802 2132 2134 2195 3161 3162 - 2134 12288 13 16 52 63 64 66 67 69 2125 2132 2133 2135 3161 3162 - 2135 16384 7 16 64 65 168 2134 2196 3162 - 2136 18432 13 78 192 193 398 2137 2213 2215 3163 3215 3312 3313 3314 3315 - 2137 16384 15 78 189 191 193 194 398 399 2098 2136 2210 2211 2353 2368 3163 3314 - 2138 12288 12 82 83 84 198 199 200 403 404 687 984 2222 3219 - 2139 24576 11 87 212 441 443 444 445 739 741 742 2395 2578 - 2140 18432 14 27 89 90 208 1082 2033 2101 2141 2411 3063 3164 3342 3343 3679 - 2141 12288 12 27 88 89 90 213 216 448 449 450 2101 2140 3164 - 2142 4608 8 91 853 1513 2145 2647 2648 3167 3443 - 2143 4096 12 1173 1174 1710 1712 1722 1937 2144 2807 2808 2980 3165 3166 - 2144 3072 13 1173 1174 1937 1938 2143 2145 2648 2807 2808 3165 3166 3167 3443 - 2145 3072 10 91 1174 1938 2142 2144 2648 2808 3166 3167 3443 - 2146 18432 19 93 225 227 460 462 463 464 466 1101 1102 1391 1672 2402 2405 2406 2421 2770 3227 3345 - 2147 18432 16 240 242 479 771 772 773 774 1087 1397 1662 2051 2148 2235 3092 3098 3617 - 2148 18432 12 104 240 479 481 774 1089 2051 2054 2147 2415 3092 3098 - 2149 12288 9 244 490 2150 2237 2238 2242 3228 3230 3656 - 2150 12288 8 105 250 490 782 2149 2238 2242 3228 - 2151 8192 13 94 106 108 229 235 236 247 251 252 491 2240 2244 2425 - 2152 16384 6 112 262 263 521 2249 2443 - 2153 24576 7 112 113 263 2154 2160 3141 3168 - 2154 16384 10 113 264 507 509 798 2153 2155 2189 3168 3169 - 2155 32768 8 113 157 2154 2156 3141 3142 3169 3170 - 2156 32768 9 157 369 2155 2157 3142 3143 3169 3170 3171 - 2157 32768 9 53 369 2156 2158 3143 3144 3170 3171 3172 - 2158 32768 8 53 114 2157 2159 3144 3145 3171 3172 - 2159 16384 11 14 55 67 70 114 265 267 513 800 2158 3172 - 2160 24576 10 112 121 518 521 809 1119 2110 2153 2258 3141 - 2161 4096 7 126 288 532 821 1161 2623 2800 - 2162 12288 14 133 584 891 892 1235 1756 2163 2669 2824 2831 3173 3270 3381 3670 - 2163 12288 13 133 325 909 1235 1245 1756 2162 2296 2297 2824 2827 3173 3262 - 2164 13824 19 43 134 135 165 323 591 592 2131 2171 2173 2174 2295 2331 2490 3160 3180 3182 3196 3651 - 2165 12288 14 333 917 1263 2166 2679 2681 2841 3174 3175 3184 3186 3461 3639 3641 - 2166 12288 19 917 1263 2165 2167 2302 2317 2679 2681 3174 3175 3176 3184 3186 3188 3266 3461 3639 3641 3643 - 2167 12288 21 334 350 1252 2166 2168 2302 2303 2314 2317 2830 3175 3176 3177 3186 3188 3190 3266 3276 3641 3643 3645 - 2168 12288 17 350 1252 2167 2169 2314 2830 3176 3177 3178 3188 3190 3192 3199 3276 3643 3645 3647 - 2169 12288 19 141 2124 2168 2170 2176 2177 2184 2194 3177 3178 3179 3190 3192 3194 3197 3199 3645 3647 3649 - 2170 9216 18 2124 2169 2171 2177 2178 2184 2194 3178 3179 3180 3192 3194 3196 3197 3198 3647 3649 3651 - 2171 9216 18 134 165 372 2164 2170 2173 2177 2178 2194 3179 3180 3182 3194 3196 3197 3198 3649 3651 - 2172 12288 20 572 588 878 2117 2173 2281 2479 2488 3147 3148 3149 3181 3182 3195 3196 3261 3632 3633 3650 3651 - 2173 12288 20 43 134 136 588 2117 2164 2171 2172 2174 2179 3147 3148 3180 3181 3182 3195 3196 3198 3650 3651 - 2174 12288 13 43 134 135 136 324 588 593 2164 2173 2295 2487 2490 3182 - 2175 12288 11 140 609 610 2282 2283 3189 3191 3259 3260 3631 3634 - 2176 9216 6 141 336 2169 2177 3192 3197 - 2177 12288 15 50 141 144 164 612 2124 2169 2170 2171 2176 2178 2180 2194 3197 3198 - 2178 12288 15 47 134 143 144 164 372 2123 2170 2171 2177 2179 2180 2194 3197 3198 - 2179 24576 15 47 134 136 143 145 588 2117 2118 2123 2173 2178 2181 3148 3152 3198 - 2180 16384 20 13 48 49 144 338 611 612 921 2119 2120 2123 2177 2178 2181 3146 3147 3150 3151 3197 3198 - 2181 24576 13 47 49 145 2120 2121 2123 2179 2180 3147 3148 3151 3152 3198 - 2182 3072 12 146 345 623 1108 2309 2320 2508 2608 2609 2611 2771 3278 - 2183 12288 18 147 149 160 161 347 348 363 365 631 637 945 2185 2193 2312 2315 3200 3202 3275 - 2184 12288 16 321 630 937 2124 2169 2170 2185 2194 2294 2330 2689 3178 3179 3199 3200 3284 - 2185 12288 13 147 167 348 630 937 2183 2184 2330 2689 3199 3200 3284 3607 - 2186 32768 16 150 254 633 634 784 786 942 1107 1110 2321 2517 2518 2520 2691 2771 3389 - 2187 4096 8 151 354 355 794 2248 2311 2322 2429 - 2188 13824 13 152 258 357 362 500 946 947 1270 2190 2323 2326 3346 3347 - 2189 4096 11 153 155 264 359 507 2027 2154 2431 3052 3168 3169 - 2190 16384 17 152 158 258 358 367 501 638 946 947 1270 2188 2191 2192 2326 2428 3201 3202 - 2191 32768 21 149 158 347 351 358 363 364 627 629 637 945 2190 2192 2312 2313 2326 2327 3201 3202 3273 3282 - 2192 16384 15 158 159 367 501 502 503 946 2190 2191 2193 2428 3159 3201 3202 3637 - 2193 24576 20 51 102 147 159 259 348 365 475 502 503 504 631 790 939 2183 2192 3032 3202 3205 3652 - 2194 24576 22 50 57 164 165 166 372 2000 2124 2169 2170 2171 2177 2178 2184 2331 3018 3019 3178 3179 3180 3284 3596 - 2195 8192 18 111 168 171 373 374 505 644 645 2133 2196 2197 2332 3161 3162 3203 3204 3205 3652 - 2196 12288 11 159 168 2127 2135 2195 2197 3162 3203 3204 3205 3652 - 2197 16384 12 168 374 644 645 2006 2195 2196 3032 3203 3204 3205 3652 - 2198 12288 12 172 376 377 649 664 2201 2527 2714 2937 3208 3296 3472 - 2199 12288 10 648 955 1569 2200 2523 2693 2712 2944 3206 3207 - 2200 12288 14 648 955 1003 1569 1570 2199 2201 2693 2712 2713 2944 3206 3207 3208 - 2201 12288 11 172 1005 1570 2198 2200 2713 2714 3207 3208 3296 3298 - 2202 9216 11 73 173 379 380 657 709 1012 2028 2030 3302 3304 - 2203 9216 7 174 175 659 1282 2204 2205 3209 - 2204 16384 17 175 177 655 656 963 1283 1781 2064 2065 2203 2205 2866 2984 3209 3479 3480 3548 - 2205 18432 9 174 175 1288 2203 2204 2530 2866 3209 3479 - 2206 24576 12 72 179 180 181 387 388 668 1306 1559 1564 2207 2546 - 2207 18432 5 179 180 181 388 2206 - 2208 16384 8 674 2209 2215 3210 3211 3215 3216 3653 - 2209 16384 15 189 398 680 683 983 2208 2210 2215 3163 3210 3211 3212 3215 3216 3653 - 2210 12288 13 189 191 398 683 684 983 2137 2209 2211 3163 3211 3212 3213 - 2211 12288 10 188 190 191 399 684 2137 2210 2212 3212 3213 - 2212 18432 9 188 190 191 678 979 2211 2339 3213 3286 - 2213 18432 12 192 193 398 983 2136 2214 2215 3163 3214 3215 3216 3653 - 2214 24576 13 192 2213 2215 3214 3215 3216 3308 3309 3310 3311 3312 3313 3653 - 2215 24576 23 189 192 193 396 398 680 681 682 711 981 1015 2136 2208 2209 2213 2214 3163 3214 3215 3216 3310 3312 3653 - 2216 12288 10 80 196 400 401 402 421 1624 2217 2367 3217 - 2217 9216 10 23 81 196 421 1624 2098 2216 2369 2743 3217 - 2218 4096 8 411 700 1566 2032 2219 2548 2943 3055 - 2219 4096 8 203 204 1566 2032 2218 2352 2943 3055 - 2220 3072 9 209 1653 2221 2381 2382 2383 2598 3218 3437 - 2221 3072 9 86 209 437 2220 2382 2383 3218 3330 3332 - 2222 24576 18 8 26 82 83 198 206 211 687 2138 2223 2573 2583 3068 3069 3219 3418 3421 3698 - 2223 16384 14 25 26 82 83 211 1365 1627 1628 1629 2222 2573 3219 3420 3421 - 2224 24576 16 87 88 212 213 214 215 444 446 447 449 450 738 743 744 2395 2574 - 2225 12288 9 218 451 1832 2081 2226 2397 2993 3125 3220 - 2226 13824 5 218 2225 2993 3125 3220 - 2227 4608 7 221 222 452 824 2626 2803 3079 - 2228 9216 13 228 229 467 765 2229 2230 2244 2425 3107 3221 3222 3223 3654 - 2229 12288 18 93 96 225 229 233 234 235 462 1102 2228 2230 2240 2425 3221 3222 3223 3227 3654 - 2230 8192 15 94 229 230 234 471 765 1084 2228 2229 2410 3221 3222 3223 3341 3654 - 2231 4096 4 237 891 2669 2934 - 2232 8192 20 239 477 768 1086 2233 2234 2236 2412 2413 2899 2968 3096 3097 3224 3225 3226 3344 3615 3616 3655 - 2233 6144 12 239 478 480 767 2232 2234 2236 2414 3224 3225 3226 3655 - 2234 8192 12 239 746 2232 2233 2587 3096 3224 3225 3226 3615 3616 3655 - 2235 9216 13 240 242 479 770 771 1397 1659 1662 1663 2147 2236 3092 3617 - 2236 9216 18 239 242 480 769 770 771 1086 1659 1662 2232 2233 2235 2968 3096 3097 3224 3616 3617 - 2237 18432 11 244 488 489 490 2149 2239 2422 2423 2424 3230 3656 - 2238 16384 8 105 245 490 2149 2150 2424 2616 2617 - 2239 24576 18 244 247 487 489 491 493 779 781 1103 2237 2240 2243 2420 2423 3227 3229 3230 3656 - 2240 18432 16 96 97 106 108 229 235 247 252 491 779 1102 2151 2229 2239 2425 3227 - 2241 18432 10 248 249 495 1104 2242 2243 3228 3229 3230 3656 - 2242 16384 13 248 249 250 494 782 2149 2150 2241 2243 3228 3229 3230 3656 - 2243 12288 9 247 248 2239 2241 2242 3228 3229 3230 3656 - 2244 6144 10 94 106 229 251 491 2055 2151 2228 2425 3107 - 2245 6144 13 253 496 929 942 2308 2427 2509 2606 2608 2682 2691 2771 3383 - 2246 6144 10 150 254 255 1268 2247 2250 2842 3231 3232 3283 - 2247 8192 14 32 101 255 356 498 787 1268 2246 2521 2842 2843 3231 3392 3535 - 2248 32768 11 151 262 355 794 797 1109 2187 2249 2322 2429 3233 - 2249 24576 9 112 151 262 263 360 2152 2248 2251 3233 - 2250 12288 13 255 359 507 1268 2246 2251 2328 2329 2430 2842 3232 3233 3283 - 2251 12288 14 263 359 360 361 507 2249 2250 2328 2329 2430 3168 3232 3233 3283 - 2252 12288 12 4 11 37 63 67 68 71 266 267 512 513 2132 - 2253 9216 7 268 270 1419 2254 3049 3234 3611 - 2254 12288 10 104 268 269 514 1089 2253 2415 2612 2772 3234 - 2255 18432 14 118 271 275 276 277 278 517 805 806 2438 2439 3350 3603 3604 - 2256 8192 14 243 274 275 276 485 519 805 806 1117 2257 2614 2615 2617 2773 - 2257 8192 16 274 275 276 519 805 2111 2112 2113 2256 2614 2615 3047 3601 3602 3603 3613 - 2258 18432 13 121 122 279 521 809 811 1119 1121 2160 2443 2776 3598 3599 - 2259 12288 10 117 276 282 283 284 2113 2114 3047 3603 3604 - 2260 32768 15 528 533 535 1432 2261 2265 2624 2625 3081 3253 3254 3660 3661 3666 3667 - 2261 24576 16 535 822 835 1140 2260 2262 2265 2625 3081 3082 3254 3255 3661 3662 3667 3668 - 2262 24576 20 285 286 291 292 527 535 537 822 823 835 1140 2039 2261 3082 3254 3255 3661 3662 3667 3668 - 2263 9216 9 287 819 829 1145 1146 2069 2264 3114 3235 - 2264 9216 11 287 294 524 530 817 819 833 2069 2263 2447 3235 - 2265 18432 16 289 290 525 533 534 535 1223 2260 2261 2290 2624 2625 3253 3254 3666 3667 - 2266 18432 20 297 548 552 842 843 845 1138 1153 1159 1161 1444 1678 1838 2452 2453 2454 2792 2799 2800 3001 - 2267 6144 11 847 874 2268 2477 2639 3241 3242 3248 3249 3662 3668 - 2268 6144 13 299 569 2267 2274 2275 2477 3241 3242 3248 3249 3255 3662 3668 - 2269 12288 18 554 1194 1733 1734 1747 2270 2460 2665 2821 2823 3243 3244 3250 3251 3456 3528 3663 3664 - 2270 12288 18 871 885 1194 1747 2269 2271 2287 2667 2823 3243 3244 3245 3250 3251 3252 3663 3664 3665 - 2271 12288 20 581 871 885 1222 1512 2270 2272 2287 2667 3244 3245 3246 3251 3252 3253 3526 3664 3665 3666 3716 - 2272 12288 19 314 581 1222 1512 2271 2273 3245 3246 3247 3252 3253 3254 3526 3527 3665 3666 3667 3716 3717 - 2273 12288 18 130 314 1512 2272 2274 2819 3246 3247 3248 3253 3254 3255 3525 3527 3666 3667 3668 3717 - 2274 12288 17 130 299 569 1941 2268 2273 2275 2477 2819 3247 3248 3249 3254 3255 3525 3667 3668 - 2275 12288 10 125 286 292 299 2268 2274 3248 3249 3255 3668 - 2276 9216 11 303 565 568 867 872 1197 2278 2282 2476 3256 3259 - 2277 24576 13 304 305 306 572 875 877 1203 1208 2280 2281 2284 3258 3261 - 2278 16384 11 131 316 872 2276 2279 2282 2283 2817 2818 3256 3257 - 2279 16384 15 131 316 1202 2278 2280 2282 2283 2284 2291 2292 2817 2818 3256 3257 3258 - 2280 16384 18 42 304 305 318 319 583 875 1202 2116 2277 2279 2283 2284 2291 2292 2818 3257 3258 - 2281 16384 18 305 306 571 572 877 1207 2172 2277 2284 2479 2488 2820 3149 3153 3258 3261 3633 3636 - 2282 32768 19 140 303 335 565 609 610 867 2175 2276 2278 2279 2283 3154 3256 3257 3259 3260 3631 3634 - 2283 32768 21 140 317 2175 2278 2279 2280 2282 2284 2292 3154 3155 3256 3257 3258 3259 3260 3261 3631 3632 3634 3635 - 2284 32768 26 42 304 305 317 318 319 2116 2277 2279 2280 2281 2283 2292 3154 3155 3156 3257 3258 3260 3261 3631 3632 3633 3634 3635 3636 - 2285 6144 8 307 1212 1505 2457 2458 2653 2811 3446 - 2286 4096 9 309 574 860 882 2470 2652 2653 3369 3446 - 2287 18432 17 310 312 315 576 577 871 884 885 1222 1224 2270 2271 2289 2667 3251 3252 3526 - 2288 12288 15 129 311 312 576 578 579 580 887 888 1218 1220 1221 2289 2481 2482 - 2289 24576 18 310 311 312 313 315 567 576 578 580 871 889 1224 2287 2288 2481 2482 2817 3526 - 2290 9216 8 289 290 314 890 1223 2265 3253 3254 - 2291 12288 11 131 316 318 582 583 1202 1512 2279 2280 2292 2818 - 2292 12288 10 131 317 318 583 2116 2279 2280 2283 2284 2291 - 2293 3072 6 320 2484 2825 3373 3374 3529 - 2294 13824 14 321 587 897 899 937 1233 1522 2184 2689 3177 3178 3199 3645 3647 - 2295 18432 15 135 323 324 591 593 594 642 901 2131 2164 2174 2331 2490 3160 3182 - 2296 6144 11 325 892 2163 2297 2298 2670 3173 3262 3263 3264 3669 - 2297 6144 11 325 2163 2296 2298 2498 2827 3173 3262 3263 3264 3669 - 2298 8192 14 325 1754 1877 2296 2297 2462 2498 2499 3262 3263 3264 3378 3379 3669 - 2299 16384 20 137 327 601 614 615 902 909 910 923 941 1235 1266 1267 1756 1764 2300 2505 2676 3265 3381 - 2300 16384 13 44 327 329 332 599 604 902 1236 1527 2299 2301 2676 3265 - 2301 3072 9 139 329 332 599 604 912 1246 2300 2500 - 2302 18432 11 334 607 917 2166 2167 2303 2317 2681 3186 3188 3266 - 2303 16384 13 334 608 1252 2167 2302 2502 2503 2829 2830 3187 3188 3266 3380 - 2304 18432 12 339 2305 2307 2507 2683 2834 2835 3267 3269 3271 3382 3671 - 2305 12288 13 339 618 925 1254 2304 2307 2507 2832 3267 3269 3271 3382 3671 - 2306 9216 15 585 613 2307 2483 2505 2675 2824 2836 3268 3269 3270 3271 3531 3670 3671 - 2307 9216 20 339 342 613 618 1258 2304 2305 2306 2505 2683 2835 2836 3267 3268 3269 3270 3271 3531 3670 3671 - 2308 12288 14 253 343 344 621 622 633 929 942 943 2245 2506 2509 2691 3383 - 2309 12288 9 146 345 623 2182 2508 2606 2607 2608 2609 - 2310 4096 8 346 793 795 2311 2440 2441 2610 3272 - 2311 6144 10 346 354 506 795 2187 2310 2320 2429 2611 3272 - 2312 6144 14 347 363 631 2183 2191 2313 2315 3200 3201 3202 3273 3275 3277 3673 - 2313 6144 14 149 347 351 627 629 2191 2312 2315 2327 2516 3273 3275 3277 3673 - 2314 8192 15 350 2167 2168 2315 2318 3176 3177 3199 3200 3274 3275 3276 3277 3672 3673 - 2315 8192 17 149 347 351 2183 2312 2313 2314 2318 3199 3200 3273 3274 3275 3276 3277 3672 3673 - 2316 4608 9 349 595 902 1259 2491 2494 2675 2836 3532 - 2317 4608 8 334 350 2166 2167 2302 3175 3176 3276 - 2318 6144 8 351 352 2314 2315 3199 3200 3276 3277 - 2319 8192 7 148 353 931 933 2519 2686 3391 - 2320 12288 12 146 354 794 1108 2182 2311 2321 2609 2610 2611 3272 3278 - 2321 8192 11 354 794 942 1107 1108 2186 2320 2322 2520 2771 3278 - 2322 8192 12 151 354 355 635 794 797 1111 2187 2248 2321 2429 2520 - 2323 12288 15 152 357 362 500 2025 2188 2324 2325 2326 3053 3279 3280 3281 3346 3674 - 2324 12288 12 356 357 636 2025 2026 2323 2325 2521 3279 3280 3281 3674 - 2325 8192 13 357 358 2323 2324 2326 2327 2515 3279 3280 3281 3282 3386 3674 - 2326 12288 13 152 158 357 358 2188 2190 2191 2323 2325 2327 3201 3280 3282 - 2327 13824 12 351 358 627 629 2191 2313 2325 2326 2515 3201 3273 3282 - 2328 12288 15 151 355 359 360 361 507 635 2250 2251 2329 2430 3168 3232 3233 3283 - 2329 12288 14 255 256 356 359 498 507 1268 2250 2251 2328 2430 3052 3283 3614 - 2330 12288 17 58 59 167 370 630 641 937 938 948 2184 2185 2331 3018 3033 3284 3596 3607 - 2331 18432 20 56 165 323 370 371 592 641 642 1999 2130 2131 2164 2194 2295 2330 3018 3160 3180 3284 3596 - 2332 18432 15 10 62 110 170 260 373 505 644 645 791 2006 2007 2097 2195 3204 - 2333 13824 13 378 379 652 653 654 707 957 1010 1277 1278 2844 3300 3302 - 2334 8192 6 384 2335 2358 2359 2360 3285 - 2335 8192 11 384 385 386 667 966 2334 2359 2360 3285 3299 3301 - 2336 24576 10 387 388 668 699 967 1285 1559 1776 2546 3405 - 2337 3072 5 186 392 393 3038 3608 - 2338 13824 10 394 676 677 710 975 977 2694 3288 3294 3675 - 2339 6144 12 190 395 678 979 980 2212 2340 2341 3286 3287 3288 3675 - 2340 6144 13 190 394 395 684 685 2339 2341 3286 3287 3288 3294 3295 3675 - 2341 8192 10 395 733 2339 2340 3286 3287 3288 3294 3295 3675 - 2342 8192 14 405 701 2343 2344 2347 2348 3289 3290 3291 3413 3414 3676 3694 3695 - 2343 12288 15 405 688 701 2342 2344 2347 2348 2532 2534 2547 3289 3290 3291 3394 3676 - 2344 12288 11 405 988 2342 2343 2704 3289 3290 3291 3412 3413 3676 - 2345 13824 16 201 408 409 696 697 995 1000 1309 1310 2346 2533 2541 2543 2865 3395 3478 - 2346 9216 10 409 693 697 995 1000 1310 2082 2345 2541 2865 - 2347 24576 19 405 410 412 413 698 701 2342 2343 2348 2546 2547 2553 3289 3405 3408 3413 3414 3694 3695 - 2348 32768 18 405 410 412 413 688 698 701 997 1307 2342 2343 2347 2532 2547 2709 2711 3289 3477 - 2349 3072 9 414 2350 2549 2942 2962 3292 3293 3407 3628 - 2350 3072 10 203 414 702 1566 2032 2349 2352 2942 3292 3293 - 2351 8192 22 415 703 704 1315 1568 1631 2011 2013 2352 2549 2551 2962 3037 3040 3042 3122 3124 3293 3407 3592 3610 3628 - 2352 8192 15 203 204 414 415 1566 2032 2219 2350 2351 2942 3122 3124 3293 3627 3628 - 2353 32768 19 77 190 191 194 195 397 417 685 1619 2137 2355 2368 2886 2960 3064 3128 3295 3314 3629 - 2354 16384 6 1617 2355 2356 2357 3294 3295 - 2355 16384 14 417 418 1358 1359 1617 1808 2087 2353 2354 2357 2960 3294 3295 3629 - 2356 18432 5 419 712 2354 2357 3417 - 2357 18432 13 205 418 419 712 713 1359 1617 1808 2354 2355 2356 2569 3417 - 2358 24576 14 989 1023 1024 1301 2334 2359 2703 3285 3290 3297 3299 3409 3473 3693 - 2359 24576 14 384 716 1024 2334 2335 2358 2360 3285 3297 3299 3301 3409 3693 3721 - 2360 24576 18 178 384 385 386 425 667 1327 2334 2335 2359 2361 2947 3285 3299 3301 3303 3550 3721 - 2361 24576 17 178 385 386 425 667 1585 1791 1899 1952 2360 2362 2947 3301 3303 3305 3482 3550 - 2362 24576 12 389 968 1791 1952 2361 2363 2528 3303 3305 3307 3482 3484 - 2363 24576 14 182 389 669 670 968 969 2362 2364 2528 2723 3305 3307 3309 3484 - 2364 24576 13 182 185 391 669 670 969 2363 2365 2723 3307 3309 3311 3316 - 2365 24576 13 1904 1905 1954 2364 2366 3309 3311 3313 3316 3321 3558 3559 3560 - 2366 24576 13 2365 2367 2372 2879 2880 2881 3311 3313 3315 3321 3558 3559 3560 - 2367 24576 15 421 2216 2366 2369 2372 2377 2879 2880 2881 2887 2888 2889 3217 3313 3315 - 2368 18432 17 23 78 79 194 195 1619 2098 2137 2353 2369 2886 2887 3064 3065 3314 3315 3492 - 2369 18432 19 23 78 421 1624 2098 2217 2367 2368 2743 2886 2887 2888 3064 3065 3066 3217 3314 3315 3492 - 2370 12288 9 1386 1605 1800 1913 2371 2877 3320 3325 3564 - 2371 12288 16 423 1346 1386 1605 1656 1800 1913 1961 2370 2376 2602 2877 2885 3320 3325 3564 - 2372 12288 16 2100 2366 2367 2373 2377 2880 2881 2882 2888 2889 2890 3321 3322 3559 3560 3561 - 2373 12288 17 24 2100 2372 2374 2377 2881 2882 2883 2889 2890 2891 3321 3322 3323 3560 3561 3562 - 2374 12288 14 2373 2375 2882 2883 2884 2890 2891 2892 3322 3323 3324 3561 3562 3563 - 2375 12288 13 1347 2374 2376 2883 2884 2885 2892 3323 3324 3325 3562 3563 3564 - 2376 12288 12 423 1346 1347 2371 2375 2877 2884 2885 3324 3325 3563 3564 - 2377 24576 16 206 402 421 424 2367 2372 2373 2880 2881 2882 2888 2889 2890 3066 3067 3068 - 2378 32768 17 428 719 724 1028 1030 1038 1060 1340 1638 1818 2379 2727 3326 3434 3494 3497 3711 - 2379 24576 14 428 722 1804 1901 1902 2074 2378 2558 2559 2951 2952 3326 3415 3416 - 2380 3072 9 430 1043 1052 2738 2744 2745 3056 3057 3493 - 2381 24576 18 431 1039 1343 1378 1602 1648 1650 1653 1795 1823 2220 2382 2596 2898 3218 3328 3330 3437 - 2382 18432 15 209 1382 1653 2220 2221 2381 2383 2598 2893 3218 3328 3330 3332 3437 3566 - 2383 18432 19 209 433 1349 1382 1651 2220 2221 2382 2385 2598 2893 2895 3218 3330 3332 3337 3437 3566 3677 - 2384 18432 13 86 438 439 729 1049 2385 2894 2895 3331 3332 3490 3565 3566 - 2385 18432 14 86 433 1349 2383 2384 2736 2893 2894 2895 3331 3332 3490 3565 3566 - 2386 6144 10 434 435 1042 1350 1611 2387 2388 2736 2737 3490 - 2387 12288 13 432 436 1350 1611 2386 2388 2389 2563 2564 2737 3061 3062 3063 - 2388 12288 14 208 434 435 436 1042 2033 2386 2387 2389 2563 2564 2737 3062 3063 - 2389 6144 12 216 432 436 447 2387 2388 2563 2564 3061 3062 3063 3164 - 2390 4608 7 86 437 438 729 1049 3329 3331 - 2391 12288 9 440 734 735 1361 2394 2570 2571 2572 3333 - 2392 16384 13 441 737 1052 1055 1056 2575 2576 2578 2746 3422 3423 3426 3427 - 2393 12288 8 442 1051 1361 1813 2394 2742 3333 3425 - 2394 13824 8 440 442 735 1051 1361 2391 2393 3333 - 2395 9216 16 87 212 214 444 445 446 738 741 743 744 2139 2224 2574 2577 2582 3424 - 2396 13824 11 216 447 448 744 2583 3061 3062 3069 3070 3076 3077 - 2397 9216 9 218 219 451 1675 1832 2081 2094 2225 3135 - 2398 24576 17 455 456 457 753 755 757 759 1074 1076 1384 1653 2596 2597 2600 2601 3437 3438 - 2399 16384 11 460 462 463 1079 2400 2402 2405 3334 3336 3338 3678 - 2400 16384 19 457 460 464 465 754 758 1075 1080 1390 2399 2402 2406 2768 2770 3334 3336 3338 3508 3678 - 2401 8192 14 226 433 461 1391 2402 2403 2404 3335 3336 3337 3338 3339 3677 3678 - 2402 8192 21 226 460 461 462 1079 1389 1391 2146 2399 2400 2401 2403 2405 2406 3334 3335 3336 3337 3338 3677 3678 - 2403 16384 20 461 760 761 762 1083 1387 1388 1389 1393 1657 2401 2402 2404 2405 2967 3335 3336 3339 3340 3654 - 2404 12288 9 226 435 461 1393 1657 2401 2403 3335 3339 - 2405 12288 20 93 227 460 461 462 466 1078 1079 1083 1388 1389 1391 1393 2146 2399 2402 2403 3223 3336 3654 - 2406 6144 9 460 464 465 1080 1391 2146 2400 2402 3338 - 2407 18432 9 228 459 467 1078 1388 2408 3221 3340 3654 - 2408 16384 11 467 764 1393 1657 2407 2967 3222 3340 3341 3654 3679 - 2409 6144 9 468 469 1084 2410 2411 3341 3342 3343 3679 - 2410 8192 15 230 468 470 471 1084 2230 2409 2411 3222 3223 3341 3342 3343 3654 3679 - 2411 6144 14 27 90 95 468 470 471 766 2140 2409 2410 3341 3342 3343 3679 - 2412 16384 9 477 767 768 2232 2413 3224 3225 3344 3655 - 2413 16384 10 477 1059 1064 2232 2412 3224 3225 3344 3429 3655 - 2414 16384 9 478 746 767 1085 2233 2584 3224 3226 3655 - 2415 16384 15 104 269 482 1089 1090 1398 2051 2052 2053 2054 2148 2254 2772 3099 3103 - 2416 9216 7 243 483 485 777 1098 1117 2773 - 2417 4096 8 484 1097 1100 1409 1411 1671 2422 2768 - 2418 18432 13 243 485 486 775 1094 1098 1410 1670 2419 2763 2910 2912 2974 - 2419 9216 11 486 488 777 1410 1670 2418 2424 2604 2605 2616 2912 - 2420 6144 11 487 778 1099 1101 1102 2239 2421 2423 2770 3227 3345 - 2421 6144 10 93 487 778 1099 1101 2146 2420 2770 3227 3345 - 2422 24576 13 244 484 488 489 778 1097 1099 1100 2237 2417 2423 2604 2769 - 2423 18432 11 487 489 778 1099 1100 2237 2239 2420 2422 2769 3656 - 2424 18432 11 244 486 488 490 777 2237 2238 2419 2604 2605 2616 - 2425 13824 18 96 229 235 491 779 1102 1412 2055 2151 2228 2229 2240 2244 3106 3107 3221 3227 3623 - 2426 6144 7 922 1256 2427 2833 2834 3267 3530 - 2427 6144 9 496 929 1256 2245 2426 2682 2833 2834 3530 - 2428 8192 10 258 367 501 502 789 946 2190 2192 3201 3202 - 2429 16384 12 262 354 506 794 795 1109 1414 2187 2248 2311 2322 2611 - 2430 16384 19 109 255 256 257 264 356 359 498 507 508 1268 2250 2251 2328 2329 3052 3279 3283 3614 - 2431 12288 17 154 155 156 264 508 509 798 2027 2189 2432 3052 3053 3169 3170 3346 3347 3614 - 2432 12288 13 154 156 366 368 510 639 2431 2433 3169 3170 3171 3346 3347 - 2433 12288 17 162 366 367 368 501 510 639 640 789 946 1106 1112 1114 1415 2128 2432 3347 - 2434 24576 10 515 803 1095 1116 1674 2435 2764 2766 3348 3505 - 2435 12288 9 515 1418 2434 2436 2913 3348 3349 3597 3598 - 2436 12288 8 516 1418 2435 2437 3348 3349 3598 3599 - 2437 24576 8 273 516 776 804 2436 2613 2909 3349 - 2438 9216 11 105 116 250 271 272 494 517 782 2255 2439 3350 - 2439 12288 12 105 245 250 271 275 517 805 806 2255 2438 2617 3350 - 2440 32768 6 115 793 795 2310 2441 2444 - 2441 32768 12 115 346 506 793 795 808 1118 2310 2440 2442 2444 3509 - 2442 32768 9 262 346 506 795 808 2441 2443 3509 3510 - 2443 32768 8 262 521 811 2152 2258 2442 2776 3510 - 2444 32768 11 5 115 522 807 1118 2440 2441 2774 3509 3605 3606 - 2445 9216 11 122 523 2005 2023 2446 3022 3023 3050 3351 3599 3600 - 2446 9216 9 273 281 523 2110 2111 2445 3351 3600 3601 - 2447 16384 14 294 524 530 540 816 817 833 838 1134 1920 2264 2449 2995 3235 - 2448 8192 7 528 2450 2797 3251 3252 3664 3665 - 2449 16384 22 530 540 541 542 543 816 832 837 838 881 1148 1504 1506 1507 1508 1702 2447 2451 2621 2632 3357 3358 - 2450 24576 19 528 532 533 534 821 885 1139 1151 1432 2448 2623 2797 3251 3252 3253 3457 3664 3665 3666 - 2451 6144 8 540 541 542 816 832 837 2449 2621 - 2452 16384 21 544 548 840 842 843 845 1138 1158 1159 1451 1453 1678 1838 2266 2454 2635 2636 2792 2799 2800 3001 - 2453 18432 11 297 547 830 1159 1443 1444 1452 1708 2266 2791 2792 - 2454 3072 8 544 548 840 842 2041 2266 2452 2635 - 2455 8192 22 553 850 862 1169 1185 1473 1477 1717 1721 1728 1939 2458 2459 2644 2645 2656 2811 2982 3354 3355 3358 3682 - 2456 8192 14 849 1184 1211 1474 2457 2643 3352 3353 3356 3357 3446 3680 3681 3701 - 2457 8192 19 1184 1212 1505 2285 2456 2458 2653 3352 3353 3354 3356 3357 3358 3445 3446 3680 3681 3682 3701 - 2458 8192 20 307 553 1185 1212 1214 1505 2285 2455 2457 2459 2653 2811 3353 3354 3355 3357 3358 3445 3681 3682 - 2459 8192 13 530 553 833 1148 1214 1440 1508 2455 2458 3354 3355 3358 3682 - 2460 16384 18 531 554 830 834 851 1146 1147 1170 1171 1442 1464 2269 2631 3243 3250 3456 3528 3663 - 2461 12288 19 555 852 853 854 1174 1176 1178 1179 1180 1466 1467 1723 1724 2647 2648 2649 2808 2810 3443 - 2462 24576 18 300 301 557 854 857 1179 1754 1877 2298 2465 2649 2810 3263 3264 3361 3378 3379 3669 - 2463 16384 18 856 1167 1178 1181 1457 1460 1468 1469 1471 1475 1727 2464 2641 2642 2809 2931 3359 3360 - 2464 12288 16 855 1178 1181 1469 1472 1475 1727 2463 2465 2809 2931 3359 3360 3361 3683 3685 - 2465 12288 13 557 558 560 855 1178 2462 2464 3360 3361 3362 3365 3683 3685 - 2466 24576 19 903 1188 1238 1479 1528 1531 1731 2467 2492 2657 2826 3363 3364 3366 3367 3373 3529 3684 3686 - 2467 24576 23 330 562 603 903 1188 1238 1479 1531 2043 2466 2469 2470 2492 2657 2828 3085 3363 3364 3366 3367 3369 3684 3686 - 2468 18432 16 326 330 331 575 908 913 2469 2480 2500 3365 3366 3368 3369 3379 3685 3686 - 2469 18432 24 128 138 308 309 326 330 331 562 574 575 603 913 2467 2468 2470 2480 2500 3365 3366 3367 3368 3369 3685 3686 - 2470 24576 21 128 309 562 574 860 882 2042 2043 2286 2467 2469 2651 2652 2655 3085 3366 3367 3369 3444 3447 3686 - 2471 12288 18 563 564 858 865 866 869 1186 1190 1478 1480 1481 1486 2059 2472 2473 3109 3118 3626 - 2472 24576 23 561 564 566 861 863 864 866 869 1186 1190 1478 2044 2059 2060 2471 2473 2654 2657 3085 3086 3109 3118 3626 - 2473 24576 19 563 564 865 869 915 1191 1198 1250 1480 1486 1735 2072 2471 2472 2474 2497 3118 3183 3460 - 2474 24576 20 873 1191 1198 1251 1486 1490 1735 1736 2072 2473 2475 2503 2659 2663 2680 3183 3185 3380 3448 3460 - 2475 24576 23 565 568 608 873 920 1192 1198 1253 1490 1736 2474 2476 2502 2503 2659 2660 2663 2829 3185 3187 3380 3448 3449 - 2476 4608 10 303 565 568 867 873 1197 2276 2475 2660 2663 - 2477 16384 10 299 569 874 1941 2267 2268 2274 2813 3241 3248 - 2478 24576 16 570 879 900 1206 1209 1495 1497 1499 2105 2479 2674 3139 3140 3181 3371 3372 - 2479 24576 14 570 571 572 877 879 1206 1207 1209 2172 2281 2478 2488 3181 3372 - 2480 9216 11 308 574 575 882 1215 1509 1746 2468 2469 3368 3369 - 2481 13824 17 311 567 576 578 870 871 889 1194 1218 1219 1220 1221 1510 1747 2288 2289 2482 - 2482 6144 9 311 312 313 578 580 889 2288 2289 2481 - 2483 12288 13 584 585 1755 2306 2484 2675 2824 3268 3270 3370 3459 3531 3670 - 2484 16384 10 320 585 1525 2293 2483 2491 3370 3373 3374 3459 - 2485 24576 18 586 893 894 906 1228 1239 1515 1516 1517 1519 1520 1750 1753 1758 2495 3375 3376 3687 - 2486 9216 12 9 322 590 593 594 900 1234 2105 2487 2490 3371 3372 - 2487 9216 10 588 593 2174 2486 2488 2490 3181 3182 3371 3372 - 2488 13824 12 572 588 2117 2172 2281 2479 2487 3148 3149 3181 3372 3633 - 2489 2048 7 30 589 900 1201 2107 2108 2674 - 2490 9216 12 324 591 593 594 901 1234 2164 2174 2295 2486 2487 3182 - 2491 13824 18 320 349 585 595 902 1259 2316 2484 2493 2494 2675 2676 2825 2836 3374 3459 3531 3532 - 2492 12288 18 604 912 1236 1246 1247 1525 1526 1528 1757 2466 2467 2493 2825 3363 3366 3373 3374 3529 - 2493 12288 15 139 332 595 604 1236 1525 2491 2492 2494 2676 2825 3373 3374 3459 3529 - 2494 24576 16 320 349 595 596 1227 1237 1259 1518 1751 2316 2491 2493 2825 3374 3532 3533 - 2495 9216 18 597 598 894 906 1239 1529 1758 2485 2496 2497 3183 3184 3375 3376 3377 3638 3639 3687 - 2496 8192 14 597 598 1237 1240 1249 1250 2495 2497 2501 2826 3375 3376 3377 3687 - 2497 12288 22 563 597 606 865 866 915 916 1189 1250 1486 2473 2495 2496 2501 3183 3184 3375 3376 3377 3638 3639 3687 - 2498 16384 14 325 907 910 1243 1245 1530 2297 2298 2499 2678 2827 3264 3378 3379 - 2499 16384 17 325 326 328 599 907 910 1243 1244 1245 1526 2298 2498 2500 2676 3265 3378 3379 - 2500 18432 20 326 330 599 604 908 913 1236 1246 1523 1526 1527 2301 2468 2469 2499 3362 3363 3365 3366 3379 - 2501 4096 8 597 606 916 1249 1250 2496 2497 3377 - 2502 12288 15 565 568 608 873 920 1253 2303 2475 2503 2829 2830 3187 3188 3266 3380 - 2503 12288 13 608 873 918 1198 1251 2303 2474 2475 2502 2680 2681 3266 3380 - 2504 16384 14 613 615 618 619 923 924 925 926 2505 2831 2832 3270 3271 3381 - 2505 24576 26 327 340 613 615 632 902 909 923 924 940 1235 1266 1267 1539 1764 1881 2299 2306 2307 2504 2675 2824 2836 3270 3271 3381 - 2506 12288 15 343 621 622 633 928 929 943 1256 1257 2308 2507 2690 2691 2834 3382 - 2507 9216 11 339 618 621 943 1257 2304 2305 2506 2683 3267 3382 - 2508 12288 9 623 2182 2309 2509 2606 2607 2608 2609 3383 - 2509 9216 13 253 344 622 623 929 942 2245 2308 2508 2608 2771 3278 3383 - 2510 18432 13 625 932 2512 2515 2522 2684 3281 3385 3386 3388 3392 3674 3688 - 2511 9216 11 933 944 1261 1269 1540 1882 2512 2685 2838 3384 3385 - 2512 9216 10 625 932 944 1261 2510 2511 2522 2684 3384 3385 - 2513 9216 13 626 934 935 1263 2672 2673 2687 2688 3175 3176 3276 3463 3672 - 2514 6144 11 627 2515 2516 3201 3273 3282 3386 3387 3388 3673 3688 - 2515 8192 16 625 627 629 2325 2327 2510 2514 2516 3280 3281 3282 3386 3387 3388 3674 3688 - 2516 6144 16 626 627 629 934 936 2313 2514 2515 2687 3273 3277 3386 3387 3388 3673 3688 - 2517 12288 18 150 254 497 634 784 785 786 1765 2186 2518 2519 2842 3231 3389 3390 3391 3535 3689 - 2518 8192 13 150 633 634 943 2186 2517 2519 2690 2691 3389 3390 3391 3689 - 2519 12288 17 353 634 933 1269 1765 1882 2319 2517 2518 2685 2686 3389 3390 3391 3462 3535 3689 - 2520 32768 13 150 354 355 635 794 796 797 1107 1110 1111 2186 2321 2322 - 2521 9216 13 356 499 636 787 1268 2247 2324 2522 2843 3279 3281 3392 3674 - 2522 9216 11 625 636 944 2510 2512 2521 2843 3281 3385 3392 3674 - 2523 9216 9 648 954 1274 1275 1543 2199 2692 2693 3206 - 2524 24576 12 955 958 1008 1318 1320 1572 1573 2525 2693 2847 3536 3537 - 2525 24576 16 650 651 955 956 958 959 1009 1545 1572 1573 1575 2524 2693 2844 3536 3537 - 2526 9216 9 376 382 662 663 1769 2852 3543 3708 3709 - 2527 18432 14 376 382 664 665 666 964 965 2198 3296 3297 3472 3473 3708 3709 - 2528 12288 11 182 389 669 968 969 970 1287 2362 2363 3305 3307 - 2529 24576 13 673 675 972 973 974 1288 1290 1548 1549 2530 2531 2694 2848 - 2530 24576 14 174 175 673 972 973 1288 1549 2205 2529 2531 2717 2718 3479 3480 - 2531 24576 20 175 177 673 674 679 681 972 973 1014 1015 2019 2529 2530 2716 2717 2718 3048 3210 3479 3480 - 2532 12288 21 688 986 1307 1560 1777 1888 2343 2348 2533 2534 2547 2700 3289 3291 3393 3394 3395 3477 3676 3690 3710 - 2533 8192 13 408 688 2345 2532 2534 2711 3393 3394 3395 3477 3478 3690 3710 - 2534 9216 14 408 688 694 987 2343 2532 2533 2543 2701 3291 3393 3394 3395 3690 - 2535 12288 20 647 1569 1570 1780 1892 2048 2536 2939 2944 3206 3207 3396 3397 3398 3399 3580 3581 3691 3692 3727 - 2536 12288 17 689 1779 1780 1892 2535 2537 2538 2862 2939 3396 3397 3398 3399 3400 3581 3691 3692 - 2537 13824 13 689 1292 1294 1300 1774 2536 2538 2850 2857 3398 3399 3400 3692 - 2538 12288 7 689 2536 2537 3398 3399 3400 3692 - 2539 16384 18 690 691 695 991 993 994 1295 1304 2540 2542 2696 2860 2863 3401 3402 3403 3404 3468 - 2540 16384 8 691 1304 2083 2539 2542 3126 3401 3402 - 2541 13824 14 409 693 695 696 995 1885 2082 2345 2346 2542 2543 3126 3402 3404 - 2542 12288 14 406 407 691 693 695 696 994 2082 2539 2540 2541 3126 3401 3402 - 2543 13824 14 201 408 409 694 695 696 2345 2534 2541 2545 2701 3395 3402 3404 - 2544 12288 12 692 695 985 1303 2545 2696 2698 2702 3403 3404 3468 3470 - 2545 12288 12 692 694 695 696 987 2543 2544 2701 2702 3403 3404 3470 - 2546 24576 20 180 387 388 410 698 699 1306 1559 1561 1562 1563 1564 2206 2336 2347 2547 2550 3405 3406 3609 - 2547 18432 18 410 412 698 986 1307 1559 1561 1562 1776 2343 2347 2348 2532 2546 2709 3289 3405 3477 - 2548 16384 12 411 700 998 1309 1311 2031 2218 2710 2865 2943 3055 3478 - 2549 16384 17 703 1002 1313 1631 1814 2349 2351 2551 2942 2962 2987 2988 3038 3292 3293 3407 3591 - 2550 16384 17 410 412 698 1564 1565 1567 1889 1890 2546 2551 3041 3042 3406 3407 3608 3609 3610 - 2551 16384 20 703 1002 1312 1565 1568 1890 2013 2351 2549 2550 3038 3040 3041 3042 3293 3406 3407 3608 3609 3610 - 2552 9216 17 718 1026 1332 1588 1785 1787 1788 1895 2553 2556 2725 2948 3408 3411 3414 3583 3695 - 2553 12288 15 202 410 701 718 1026 1332 1587 2347 2552 2556 2725 3408 3411 3414 3695 - 2554 8192 11 2555 2871 3409 3410 3412 3413 3549 3551 3693 3694 3721 - 2555 6144 15 2554 2556 2871 3409 3410 3411 3412 3413 3414 3549 3551 3693 3694 3695 3721 - 2556 6144 16 718 1787 1895 2552 2553 2555 2871 3408 3410 3411 3413 3414 3549 3583 3694 3695 - 2557 13824 17 426 429 720 723 724 1028 1029 1030 1031 1034 1333 1335 1340 1590 2728 2966 3587 - 2558 18432 18 714 722 1017 1018 1035 1328 1593 1901 1902 2379 2559 2719 2869 2950 2951 3004 3326 3415 - 2559 12288 12 427 722 1026 1337 1595 1788 2379 2558 2728 3326 3415 3486 - 2560 8192 15 1048 1355 2561 2568 2888 2889 2890 2957 2958 2959 3058 3059 3073 3074 3075 - 2561 8192 17 730 731 1048 1355 1609 2560 2562 2568 2889 2890 2891 2959 3059 3060 3074 3075 3076 - 2562 8192 17 432 730 731 1350 1609 1610 2561 2563 2568 2890 2891 2892 3060 3061 3075 3076 3077 - 2563 8192 18 432 436 1347 1350 1610 2035 2387 2388 2389 2562 2564 2737 2892 3061 3062 3063 3076 3077 - 2564 8192 17 208 435 436 725 1041 1042 1347 2033 2035 2387 2388 2389 2563 2737 3062 3063 3077 - 2565 9216 7 726 1044 1353 2739 2875 2896 3556 - 2566 9216 13 207 428 727 1597 1822 2567 2752 2754 2898 3416 3496 3497 3711 - 2567 9216 13 431 727 728 1045 1046 1597 1599 1600 2073 2074 2566 2952 3416 - 2568 16384 13 730 731 1048 1355 1609 2560 2561 2562 2574 2959 3059 3060 3424 - 2569 18432 18 205 418 419 420 713 734 1359 1617 1621 1811 1911 2087 2357 2570 3127 3130 3333 3417 - 2570 16384 13 734 735 1050 1357 1360 1616 1618 1809 2391 2569 2571 2572 3417 - 2571 16384 9 440 734 735 736 1050 1360 2391 2570 2572 - 2572 18432 5 440 736 2391 2570 2571 - 2573 9216 16 211 738 743 744 1058 2222 2223 2574 2577 2582 2583 3219 3418 3421 3424 3698 - 2574 9216 18 731 738 741 744 2224 2395 2568 2573 2577 2583 3060 3061 3075 3076 3418 3421 3424 3698 - 2575 8192 11 441 1052 2392 2576 2744 3419 3420 3422 3423 3696 3697 - 2576 6144 15 441 445 741 2392 2575 2577 3419 3420 3421 3422 3423 3424 3696 3697 3698 - 2577 6144 16 444 445 738 741 2395 2573 2574 2576 2582 3418 3420 3421 3423 3424 3697 3698 - 2578 16384 12 441 445 739 740 741 742 1056 1057 2139 2392 2581 3427 - 2579 16384 5 442 1051 2580 3425 3426 - 2580 16384 5 2579 2581 3425 3426 3427 - 2581 16384 5 739 2578 2580 3426 3427 - 2582 3072 9 444 445 738 741 743 2395 2573 2577 3421 - 2583 18432 18 211 447 448 738 744 745 1058 2222 2396 2573 2574 3060 3061 3069 3070 3076 3077 3418 - 2584 24576 9 746 1085 1373 1394 2414 2585 3226 3428 3655 - 2585 24576 16 746 1063 1064 1371 1373 1640 1642 1821 2078 2584 2747 2990 3121 3428 3432 3699 - 2586 12288 17 453 747 748 1395 1658 1827 1962 1982 2588 2589 2590 2899 3430 3431 3433 3588 3700 - 2587 9216 16 746 1064 2234 2588 2899 3225 3226 3429 3430 3432 3433 3615 3618 3655 3699 3700 - 2588 9216 17 747 1395 2586 2587 2589 2899 3093 3100 3429 3430 3431 3432 3433 3615 3618 3699 3700 - 2589 13824 16 453 747 748 1065 1374 2586 2588 2590 2592 2748 2897 3430 3431 3433 3435 3700 - 2590 12288 10 453 747 748 2586 2589 2592 2593 3431 3435 3436 - 2591 12288 12 426 429 720 1065 1069 2592 2748 2749 2753 3434 3435 3494 - 2592 12288 14 748 1065 1069 2589 2590 2591 2748 2749 2753 3431 3434 3435 3436 3494 - 2593 12288 9 453 748 750 1377 1963 2590 2594 2970 3436 - 2594 16384 15 454 750 751 1067 1068 1069 1070 1071 1375 1377 1644 2593 2595 2753 3436 - 2595 12288 15 454 749 750 751 752 756 1067 1068 1070 1071 1379 2594 2599 3498 3712 - 2596 16384 12 753 1074 1378 1381 1650 1653 2381 2398 2597 2757 3437 3499 - 2597 24576 21 455 457 753 754 755 757 758 1072 1378 1383 1384 1385 1653 1655 2398 2596 2598 2600 2601 3437 3438 - 2598 12288 15 209 455 754 755 1382 1652 2220 2382 2383 2597 3337 3338 3437 3677 3678 - 2599 24576 16 751 756 1067 1068 1376 1379 1824 2595 2601 2755 2971 2973 2992 3438 3498 3568 - 2600 18432 16 455 457 753 757 758 1072 1385 1668 1831 1916 1917 2398 2597 2601 2907 3438 - 2601 16384 17 456 753 756 757 1073 1668 2398 2597 2599 2600 2755 2756 2907 2973 3438 3498 3568 - 2602 12288 9 423 760 761 1077 1346 1386 1656 2371 2877 - 2603 32768 12 776 1092 1096 1402 1406 1830 2762 2765 2767 2909 3506 3569 - 2604 9216 10 484 488 1097 1409 2419 2422 2424 2605 2911 2912 - 2605 9216 10 486 488 777 1410 1670 2419 2424 2604 2616 2912 - 2606 12288 8 496 2245 2309 2508 2607 2608 2609 3383 - 2607 12288 8 345 792 2309 2508 2606 2608 2609 2610 - 2608 24576 16 253 496 623 942 1108 2182 2245 2309 2508 2509 2606 2607 2609 2771 3278 3383 - 2609 24576 16 146 345 623 792 1108 2182 2309 2320 2508 2606 2607 2608 2610 2611 2771 3278 - 2610 24576 12 146 345 624 792 793 795 2310 2320 2607 2609 2611 3272 - 2611 24576 14 146 354 506 794 795 1108 1414 2182 2311 2320 2429 2609 2610 3272 - 2612 18432 19 268 269 270 514 803 807 1116 1416 1674 2001 2254 2772 3031 3045 3049 3605 3606 3611 3612 - 2613 18432 10 273 274 516 776 804 1408 2437 2614 2773 2909 - 2614 12288 13 273 274 519 804 1117 2256 2257 2613 2615 2773 3600 3601 3602 - 2615 12288 14 274 275 276 519 805 806 1117 2256 2257 2614 2773 3601 3602 3603 - 2616 18432 10 243 483 486 490 777 2238 2419 2424 2605 2617 - 2617 18432 12 243 245 275 483 777 806 1117 2238 2256 2439 2616 3350 - 2618 32768 13 812 836 1123 1124 1132 1427 1688 1849 1929 2780 2781 2782 3514 - 2619 18432 15 813 1433 1680 1693 1694 1841 1844 1845 1926 2624 2625 2783 2920 2923 3576 - 2620 32768 14 529 815 832 1133 1421 2621 2632 2633 2915 2916 2917 3439 3570 3571 - 2621 32768 14 816 832 1421 1969 2449 2451 2620 2632 2633 2915 2917 3012 3439 3571 - 2622 12288 14 818 820 834 1136 1146 1430 1441 1921 1988 2069 2631 2998 3114 3593 - 2623 24576 13 532 821 1138 1139 1153 1161 1422 1678 1679 2161 2450 2799 2800 - 2624 24576 14 525 528 533 813 1139 1432 1692 1693 2260 2265 2619 2625 2783 2784 - 2625 24576 15 525 535 813 822 1140 1433 1682 1693 1845 2260 2261 2265 2619 2624 2923 - 2626 18432 14 221 526 824 831 1129 1141 1701 1842 1843 2227 2627 2786 2803 3079 - 2627 18432 22 526 823 824 825 831 1129 1141 1439 1701 1842 1843 1927 2037 2038 2039 2626 2786 2793 2922 3079 3082 3576 - 2628 32768 10 1685 1686 1687 1697 1716 1857 2629 2930 2979 3521 - 2629 32768 19 529 827 1131 1142 1436 1685 1687 1698 1857 2628 2643 2789 2790 2806 2930 3441 3442 3518 3521 - 2630 12288 12 829 1145 1146 1438 1463 1700 1717 2067 2068 2795 2982 3114 - 2631 16384 21 531 818 820 830 834 1146 1147 1170 1171 1430 1442 1464 1703 1852 1853 2460 2622 2791 3250 3528 3663 - 2632 24576 14 573 816 832 880 1504 2449 2620 2621 2633 3356 3357 3439 3680 3681 - 2633 16384 11 529 832 880 1502 1503 2620 2621 2632 2643 3356 3439 - 2634 16384 10 839 840 1154 1155 1156 1447 1448 1837 2041 3084 - 2635 18432 15 840 842 1154 1159 1451 1677 2452 2454 2636 2791 2792 2976 2977 3001 3589 - 2636 24576 16 295 544 546 840 841 843 1157 1158 1450 1453 2041 2452 2635 2798 2927 3084 - 2637 4608 6 846 1143 1461 1462 2644 3519 - 2638 12288 15 847 1165 1739 1940 2639 2801 2813 2932 3240 3241 3440 3520 3522 3661 3662 - 2639 18432 18 847 1164 1439 1701 2037 2038 2039 2267 2638 2801 2802 3079 3082 3241 3242 3440 3520 3662 - 2640 1536 5 848 1164 1166 2802 2804 - 2641 12288 18 856 1167 1168 1457 1460 1468 1471 2463 2642 2806 2929 2930 2931 3352 3359 3441 3442 3680 - 2642 12288 19 849 856 1167 1168 1460 1468 1471 1474 2463 2641 2643 2806 2930 2931 3352 3359 3441 3442 3680 - 2643 24576 17 529 827 849 1167 1211 1502 1503 2456 2629 2633 2642 2806 3352 3356 3439 3442 3680 - 2644 12288 17 846 850 1143 1169 1437 1461 1462 1717 2455 2637 2645 2796 2982 3354 3355 3519 3682 - 2645 16384 17 850 1172 1182 1463 1473 1477 1717 1721 1728 1732 2455 2644 2646 2656 2982 3355 3625 - 2646 16384 13 851 1170 1172 1182 1463 1717 1718 1732 2645 2656 2982 3119 3625 - 2647 12288 8 91 555 853 1513 2142 2461 2648 3443 - 2648 12288 23 91 555 852 853 1174 1178 1180 1466 1467 1723 1724 1868 1869 1938 2142 2144 2145 2461 2647 2808 3166 3167 3443 - 2649 8192 15 300 555 556 852 854 1176 1178 1179 1180 1467 2461 2462 2810 3360 3361 - 2650 8192 15 859 1181 1184 1474 1475 1476 2652 2931 3368 3369 3444 3446 3685 3686 3701 - 2651 6144 12 860 2470 2652 2653 2655 2811 3367 3444 3445 3446 3447 3701 - 2652 6144 15 859 860 882 1184 1215 2286 2470 2650 2651 2653 3369 3444 3445 3446 3701 - 2653 8192 18 860 1212 1505 2285 2286 2457 2458 2651 2652 2655 2811 3353 3354 3444 3445 3446 3447 3701 - 2654 6144 17 861 863 864 1185 1187 1477 1485 1728 1729 1871 1872 2472 2655 2811 3085 3086 3447 - 2655 6144 13 860 861 1185 2042 2470 2651 2653 2654 2811 3085 3086 3445 3447 - 2656 18432 21 850 862 863 1172 1182 1185 1186 1465 1473 1477 1721 1728 1729 1732 1872 2455 2645 2646 3109 3625 3626 - 2657 24576 23 302 564 865 866 903 914 1188 1248 1250 1479 1481 1485 1531 1759 2043 2466 2467 2472 2828 3085 3364 3367 3377 - 2658 18432 14 565 867 876 1192 1204 1205 2660 2662 3256 3259 3449 3451 3455 3705 - 2659 12288 14 1735 1736 2072 2474 2475 2660 2663 3120 3448 3449 3453 3455 3703 3705 - 2660 12288 15 565 867 2475 2476 2658 2659 2662 2663 3448 3449 3451 3453 3455 3703 3705 - 2661 9216 14 871 2662 3237 3238 3244 3245 3450 3451 3454 3455 3523 3704 3705 3716 - 2662 9216 18 867 871 1196 1197 1205 2658 2660 2661 3256 3449 3450 3451 3454 3455 3523 3704 3705 3716 - 2663 9216 10 568 873 1198 1490 1736 2474 2475 2476 2659 2660 - 2664 24576 11 878 1210 1501 3191 3193 3195 3260 3261 3646 3648 3650 - 2665 9216 17 883 1194 1217 1218 1219 1220 1510 1511 1734 1747 2269 2666 2821 2823 3250 3456 3528 - 2666 9216 8 883 1216 1511 2665 2821 2822 3456 3528 - 2667 6144 14 576 577 884 885 1217 1218 2270 2271 2287 2668 2823 3251 3252 3457 - 2668 6144 9 297 577 884 886 1161 1217 2667 2823 3457 - 2669 32768 8 891 2162 2231 2670 2831 2934 3173 3458 - 2670 16384 12 891 892 1225 1226 1514 2296 2669 3173 3262 3263 3458 3669 - 2671 6144 5 895 3642 3643 3644 3645 - 2672 6144 14 896 898 1230 1263 1521 2513 2673 2688 3175 3176 3463 3641 3643 3672 - 2673 6144 14 897 898 899 1232 1233 2513 2672 2688 3176 3177 3274 3643 3645 3672 - 2674 8192 14 30 589 900 1201 1497 1499 2105 2107 2108 2478 2489 3139 3140 3371 - 2675 12288 19 585 595 902 1235 1259 1524 1755 1881 2306 2316 2483 2491 2505 2676 2824 2836 3268 3459 3531 - 2676 16384 22 327 332 595 599 604 902 1235 1236 1524 1525 1527 1755 2299 2300 2491 2493 2499 2675 2824 3265 3374 3459 - 2677 8192 9 586 596 893 904 905 1227 1239 2839 3533 - 2678 12288 10 601 907 909 910 911 1242 1245 1530 2498 2827 - 2679 13824 9 333 607 917 2165 2166 2681 3184 3186 3461 - 2680 12288 14 1191 1198 1251 2474 2503 2681 3183 3184 3185 3186 3266 3380 3460 3461 - 2681 12288 16 607 917 2165 2166 2302 2503 2679 2680 3183 3184 3185 3186 3266 3380 3460 3461 - 2682 13824 10 344 496 622 929 1256 1257 2245 2427 2833 3383 - 2683 32768 16 339 342 930 931 943 1258 1260 2304 2307 2507 2690 2835 3269 3382 3391 3689 - 2684 12288 13 625 932 935 1261 1536 1762 2510 2512 2687 2840 3385 3388 3688 - 2685 18432 15 238 933 1535 1760 1879 1882 2511 2519 2686 2837 2838 3384 3390 3462 3535 - 2686 18432 11 148 353 931 933 2319 2519 2685 2837 2838 3391 3462 - 2687 12288 15 626 932 934 935 1263 2513 2516 2684 2688 2840 3387 3388 3463 3534 3688 - 2688 9216 14 626 898 934 1230 1231 1521 2513 2672 2673 2687 3175 3176 3463 3672 - 2689 24576 16 321 630 897 899 937 1537 1763 2184 2185 2294 3177 3178 3199 3200 3274 3275 - 2690 18432 12 931 943 1105 1260 2506 2518 2683 2691 3382 3389 3391 3689 - 2691 18432 14 253 633 942 943 1105 2186 2245 2308 2506 2518 2690 3389 3391 3689 - 2692 12288 13 648 953 954 1274 1275 1543 2045 2047 2523 3087 3088 3206 3207 - 2693 24576 10 648 955 1572 1573 2199 2200 2523 2524 2525 2712 - 2694 24576 12 394 673 675 676 677 974 975 976 977 1550 2338 2529 - 2695 13824 16 985 1293 1556 2696 2698 2702 2856 2861 2941 3464 3466 3468 3470 3474 3475 3707 - 2696 12288 15 985 1295 1303 2539 2544 2695 2698 2860 2863 3403 3464 3466 3468 3470 3707 - 2697 9216 14 992 1294 1300 1303 1774 2698 2857 2940 3465 3466 3467 3468 3706 3707 - 2698 9216 17 985 992 1303 2544 2695 2696 2697 2940 2941 3403 3464 3465 3466 3467 3468 3706 3707 - 2699 12288 16 986 1297 1554 1557 1772 1773 1775 1884 1946 2700 2707 3002 3289 3405 3469 3676 - 2700 16384 14 986 1297 1554 1773 1777 1887 1888 2532 2699 3002 3393 3394 3469 3690 - 2701 9216 13 694 987 1298 2534 2543 2545 2702 2861 3394 3395 3404 3470 3690 - 2702 12288 11 985 987 1298 1556 2544 2545 2695 2701 2861 2941 3470 - 2703 8192 15 988 989 1023 1301 2358 2704 2706 2707 3290 3471 3473 3475 3676 3693 3709 - 2704 9216 16 988 1297 1298 1556 2344 2703 2706 2861 3290 3291 3394 3471 3473 3475 3676 3709 - 2705 12288 11 1023 1299 1555 2706 2938 3472 3473 3474 3475 3708 3709 - 2706 12288 14 988 1023 2703 2704 2705 3412 3471 3472 3473 3474 3475 3693 3708 3709 - 2707 3072 12 986 989 1297 1301 1554 1557 1772 2699 2703 3290 3471 3676 - 2708 24576 9 990 1302 1305 1558 2851 2858 2859 2864 3467 - 2709 12288 17 412 698 996 997 1314 1560 1889 2348 2547 2710 2711 3406 3476 3477 3478 3582 3710 - 2710 16384 16 700 997 998 1309 1311 2548 2709 2711 2865 2943 3055 3476 3477 3478 3582 3710 - 2711 8192 14 408 412 688 700 997 998 2348 2533 2709 2710 3476 3477 3478 3710 - 2712 18432 10 955 1003 1569 1572 1573 1574 2199 2200 2693 2944 - 2713 13824 18 650 705 708 1003 1004 1005 1007 1009 1316 1317 1569 1570 1571 1573 1574 2200 2201 2714 - 2714 9216 13 172 1004 1005 1022 1316 1317 1570 2198 2201 2713 3208 3296 3298 - 2715 18432 12 173 176 656 660 709 1011 1013 1781 2030 2984 3304 3306 - 2716 24576 19 177 381 661 674 1013 1014 1577 1604 1781 1903 2020 2531 2718 2868 3048 3216 3308 3310 3480 - 2717 12288 10 1577 1578 1783 1784 2530 2531 2718 2945 3479 3480 - 2718 12288 14 674 681 1014 1015 1577 1783 1784 2530 2531 2716 2717 2945 3479 3480 - 2719 9216 13 714 1017 1018 1035 1328 1593 1901 2558 2720 2869 3004 3415 3481 - 2720 12288 12 1017 1035 1329 1338 1584 2719 2721 3004 3481 3483 3552 3722 - 2721 18432 10 1329 2720 2722 3004 3483 3485 3552 3553 3722 3723 - 2722 18432 9 1019 2721 2724 2873 3483 3485 3553 3554 3723 - 2723 18432 11 74 75 182 185 2363 2364 2724 3316 3484 3485 3554 - 2724 18432 13 20 74 75 1019 1798 2722 2723 3316 3317 3484 3485 3487 3554 - 2725 32768 21 202 410 718 1026 1032 1332 1335 1587 1589 1590 1592 1894 2552 2553 2728 2729 2730 3041 3408 3486 3609 - 2726 12288 16 422 1027 1591 1632 1633 1634 1635 1786 1815 1816 2012 2013 2989 3040 3042 3610 - 2727 9216 10 1028 1029 1030 1589 1590 1591 2378 2728 3326 3486 - 2728 9216 16 1026 1028 1031 1032 1333 1335 1340 1590 1591 2557 2559 2725 2727 2730 3326 3486 - 2729 13824 8 202 1032 1334 1592 2725 2730 3035 3041 - 2730 13824 12 1031 1032 1033 1335 1590 2725 2728 2729 3035 3036 3041 3042 - 2731 4096 7 1039 1344 1601 2740 2955 3327 3328 - 2732 13824 11 715 1040 1908 1956 2735 2985 3319 3320 3489 3565 3566 - 2733 12288 11 1342 1353 2734 2741 2873 2876 2896 3487 3488 3491 3554 - 2734 9216 14 1047 1342 1344 1353 1603 2733 2735 2740 2741 2873 3487 3488 3489 3491 - 2735 9216 16 1040 1047 1344 1603 1908 2732 2734 2740 2741 3327 3329 3331 3488 3489 3491 3565 - 2736 12288 20 433 434 760 761 1042 1077 1346 1349 2385 2386 2737 2758 2877 2885 2895 3335 3339 3490 3564 3677 - 2737 12288 16 434 435 1041 1042 1347 1350 1611 2386 2387 2388 2563 2564 2736 2884 2885 3490 - 2738 8192 10 1043 1801 2380 2886 2887 2986 3056 3057 3071 3072 - 2739 4608 4 1044 2565 3555 3556 - 2740 12288 11 1047 1344 2731 2734 2735 2741 2954 2955 3327 3329 3491 - 2741 9216 9 1047 1342 1344 1353 2733 2734 2735 2740 3491 - 2742 12288 13 1051 1053 1361 1363 1621 1623 1813 2075 2076 2393 2745 3333 3425 - 2743 24576 16 23 81 421 1364 1624 2098 2217 2369 2744 3065 3066 3217 3419 3492 3493 3696 - 2744 24576 19 430 1052 1364 1624 2380 2575 2743 2745 3056 3057 3065 3066 3072 3073 3419 3422 3492 3493 3696 - 2745 24576 19 1052 1054 1362 1363 1366 1622 1623 1813 2075 2076 2380 2742 2744 2746 3056 3057 3425 3426 3493 - 2746 13824 10 737 1052 1054 1055 1363 1366 2392 2745 3426 3427 - 2747 16384 16 746 1064 1373 1636 1640 1642 1820 1821 2078 2079 2585 2964 2990 3123 3432 3699 - 2748 18432 16 1062 1065 1374 1643 2589 2591 2592 2749 2897 2965 3431 3433 3434 3435 3494 3700 - 2749 18432 17 426 429 720 721 1065 1374 1643 2591 2592 2748 2897 2965 2966 3434 3435 3494 3587 - 2750 9216 12 1066 1375 1645 1646 1822 1912 2751 2752 3495 3496 3497 3711 - 2751 8192 18 1060 1061 1066 1067 1070 1375 1644 1645 2750 2752 2753 2754 3434 3435 3495 3496 3497 3711 - 2752 9216 15 207 428 727 1066 1597 1822 2566 2750 2751 2754 2898 3495 3496 3497 3711 - 2753 18432 14 1069 1070 1071 1375 1644 2591 2592 2594 2751 2754 3434 3435 3436 3497 - 2754 16384 13 207 727 1066 1070 1071 1379 2566 2751 2752 2753 2898 3497 3712 - 2755 6144 14 753 756 1073 1379 1380 2599 2601 2756 2757 3438 3498 3499 3500 3712 - 2756 6144 11 749 752 756 1073 2601 2755 2757 3498 3499 3500 3712 - 2757 6144 10 753 1073 1381 2596 2755 2756 3498 3499 3500 3712 - 2758 9216 9 1077 1349 1386 1605 1651 2736 2877 2893 3677 - 2759 6144 11 1091 1407 2760 2761 2904 2908 3501 3502 3503 3713 3714 - 2760 6144 13 1091 1407 2052 2053 2759 2761 2908 3102 3105 3501 3502 3503 3713 - 2761 6144 11 1091 1400 2759 2760 2901 2904 2972 3501 3502 3503 3713 - 2762 16384 15 775 1092 1094 1403 1406 1669 1830 1915 2603 2763 2905 2910 2974 3504 3569 - 2763 12288 9 775 1093 1094 1405 1410 2418 2762 2912 3504 - 2764 18432 8 482 1090 1095 1116 1398 1407 2434 2908 - 2765 6144 11 776 1096 2603 2766 2767 3348 3349 3505 3506 3507 3714 - 2766 6144 11 1095 1096 2434 2765 2767 3348 3349 3505 3506 3507 3714 - 2767 8192 12 776 1092 1096 1402 2603 2765 2766 2904 3505 3506 3507 3714 - 2768 16384 15 224 457 458 465 1097 1100 1409 1411 1671 1831 2400 2417 2769 2911 3508 - 2769 9216 11 778 1097 1099 1100 1101 1411 2422 2423 2768 2770 3508 - 2770 9216 16 460 463 464 487 778 1099 1100 1101 1411 2146 2400 2420 2421 2769 3345 3508 - 2771 16384 15 253 623 794 942 1107 1108 1673 2182 2186 2245 2321 2509 2608 2609 3278 - 2772 24576 10 269 482 514 803 1089 1090 1116 2254 2415 2612 - 2773 24576 11 273 485 519 1117 1408 2256 2416 2613 2614 2615 2909 - 2774 8192 14 522 2003 2058 2066 2444 2775 3029 3030 3031 3078 3509 3510 3605 3606 - 2775 8192 12 1121 2003 2022 2036 2774 2776 3020 3031 3078 3509 3510 3597 - 2776 12288 10 279 521 811 1121 2258 2443 2775 3510 3597 3598 - 2777 16384 15 1122 1420 1685 2088 2778 2779 2914 2979 3131 3132 3511 3512 3513 3630 3715 - 2778 8192 11 1122 1965 2088 2777 2779 3009 3132 3511 3512 3513 3715 - 2779 12288 21 1122 1123 1685 1848 1918 1965 1984 1990 2777 2778 2780 2781 2790 3511 3512 3513 3514 3518 3570 3715 3724 - 2780 12288 14 812 1123 1124 1688 1848 1929 2618 2779 2781 2782 3512 3513 3514 3715 - 2781 8192 15 812 1123 1124 1965 2618 2779 2780 2782 3009 3512 3513 3514 3570 3715 3724 - 2782 24576 7 812 1123 1124 2618 2780 2781 3514 - 2783 24576 13 813 1680 1692 1693 1840 1926 1972 2619 2624 2784 2920 3515 3516 - 2784 24576 20 525 813 821 1125 1139 1422 1423 1679 1692 1840 1854 1925 1972 2624 2783 2785 2919 2920 3515 3516 - 2785 12288 9 844 1125 1126 1422 1423 2784 2919 2921 3516 - 2786 24576 13 222 824 1128 1129 1141 1842 1843 1973 2626 2627 2787 2788 3517 - 2787 12288 5 1128 1129 2786 2788 3517 - 2788 32768 11 814 1128 1129 1130 1928 1973 2786 2787 2922 3517 3577 - 2789 16384 13 827 1131 1142 1428 1684 1689 1918 1984 2091 2629 2790 2794 3518 - 2790 18432 13 529 827 1123 1131 1685 1848 1918 1984 2629 2779 2789 3518 3570 - 2791 12288 17 820 830 1154 1443 1677 1703 1708 1836 1853 1924 2453 2631 2635 2792 2976 2998 3001 - 2792 12288 20 297 1138 1159 1431 1443 1444 1677 1691 1703 1708 1836 1838 1853 1924 2266 2452 2453 2635 2791 3001 - 2793 24576 18 823 1140 1433 1439 1694 1701 1842 1927 1933 2037 2038 2039 2627 2922 3079 3080 3082 3576 - 2794 32768 17 1142 1435 1458 1684 1696 1699 1711 1714 1846 1847 1856 2091 2789 2929 2930 3441 3518 - 2795 16384 9 1145 1717 2067 2068 2630 2796 2982 3114 3519 - 2796 18432 16 828 833 1143 1144 1145 1437 1440 1461 1717 2644 2795 2982 3235 3355 3519 3682 - 2797 6144 12 532 885 1151 1152 2448 2450 2823 3251 3252 3457 3664 3665 - 2798 18432 6 1157 1158 1450 2636 2927 3084 - 2799 16384 16 843 845 1138 1158 1422 1453 1678 1838 1861 1923 2266 2452 2623 2800 2919 2927 - 2800 16384 16 297 532 552 843 845 1138 1153 1161 1422 1678 1838 2161 2266 2452 2623 2799 - 2801 16384 12 847 1164 1740 2102 2104 2638 2639 2802 2932 3440 3520 3522 - 2802 16384 15 847 848 1164 1166 2037 2102 2104 2639 2640 2801 2803 2804 3079 3137 3520 - 2803 16384 13 92 221 223 452 824 831 2103 2227 2626 2802 2804 3079 3137 - 2804 16384 13 28 29 848 1164 1166 2102 2103 2104 2640 2802 2803 3079 3137 - 2805 12288 7 1167 1460 1870 2806 2930 3359 3521 - 2806 12288 13 529 849 1167 1460 2629 2641 2642 2643 2805 2930 3441 3442 3521 - 2807 24576 11 1173 1174 1710 1713 1865 2143 2144 2808 2980 3165 3166 - 2808 13824 13 852 1173 1174 2143 2144 2145 2461 2648 2807 3165 3166 3167 3443 - 2809 24576 14 1173 1174 1175 1178 1455 1456 1457 1710 1722 1723 2463 2464 3359 3360 - 2810 6144 13 555 852 854 1176 1178 1179 1180 1467 2461 2462 2649 3360 3361 - 2811 18432 18 307 553 860 861 1185 1212 1214 1477 2285 2455 2458 2651 2653 2654 2655 3354 3445 3447 - 2812 12288 13 1200 1206 1207 1492 1493 1494 1739 1740 1874 2813 2820 2932 3522 - 2813 12288 19 847 874 1200 1203 1493 1739 1743 1874 1940 1941 1976 2477 2638 2812 2816 3240 3241 3522 3525 - 2814 3072 8 29 1166 1740 1741 2104 2106 2815 3138 - 2815 3072 9 1201 1497 1740 1741 2106 2107 2814 3138 3139 - 2816 12288 19 875 1200 1202 1203 1208 1493 1496 1739 1743 1744 2813 2818 2819 3257 3258 3524 3525 3527 3717 - 2817 12288 16 316 871 1196 1512 2278 2279 2289 2818 3256 3257 3523 3524 3526 3527 3716 3717 - 2818 12288 21 316 582 1202 1512 2278 2279 2280 2291 2816 2817 2819 3256 3257 3258 3523 3524 3525 3526 3527 3716 3717 - 2819 13824 13 582 875 1202 2273 2274 2816 2818 3247 3248 3524 3525 3527 3717 - 2820 18432 12 571 877 879 1200 1206 1207 1208 1493 1744 2281 2812 3261 - 2821 16384 17 297 547 883 1150 1216 1217 1218 1442 1443 2269 2665 2666 2822 2823 3250 3456 3528 - 2822 12288 7 296 547 883 1216 2666 2821 3528 - 2823 18432 20 297 547 883 884 1150 1151 1152 1161 1217 1218 2269 2270 2665 2667 2668 2797 2821 3250 3251 3457 - 2824 12288 21 133 584 892 902 1235 1524 1755 1756 2162 2163 2306 2483 2505 2675 2676 3173 3268 3270 3381 3459 3670 - 2825 24576 17 320 595 596 1227 1237 1749 1751 2293 2491 2492 2493 2494 2826 2933 3373 3374 3529 - 2826 12288 15 903 1237 1482 1516 1731 1749 1876 2466 2496 2825 2933 3375 3377 3529 3687 - 2827 13824 8 325 909 910 1245 2163 2297 2498 2678 - 2828 3072 7 562 1248 1531 1759 2043 2467 2657 - 2829 12288 13 565 609 868 919 1253 2303 2475 2502 2830 3187 3188 3189 3190 - 2830 12288 11 334 1252 2167 2168 2303 2502 2829 3187 3188 3189 3190 - 2831 9216 11 891 2162 2504 2669 2832 2934 3270 3271 3381 3670 3671 - 2832 9216 13 925 1254 1533 2305 2504 2831 2934 3267 3270 3271 3381 3670 3671 - 2833 9216 8 622 1256 1257 2426 2427 2682 2834 3530 - 2834 9216 10 1256 1257 2304 2426 2427 2506 2833 3267 3382 3530 - 2835 9216 10 339 930 1258 1259 2304 2307 2683 2836 3269 3531 - 2836 12288 16 595 613 902 930 940 1258 1259 1881 2306 2307 2316 2491 2505 2675 2835 3531 - 2837 24576 12 930 931 933 1259 1535 1760 2685 2686 2838 3462 3532 3533 - 2838 24576 13 933 1261 1535 1760 2511 2685 2686 2837 2839 3384 3462 3532 3533 - 2839 32768 15 586 893 905 1229 1261 1262 1536 1761 2677 2838 2840 2841 2983 3533 3534 - 2840 12288 16 628 932 935 1261 1262 1263 1536 1762 2684 2687 2839 2841 3388 3463 3534 3688 - 2841 12288 9 905 935 1262 1263 2165 2839 2840 3174 3534 - 2842 18432 15 150 254 255 497 634 1268 2246 2247 2250 2517 2843 3231 3232 3283 3535 - 2843 12288 16 32 101 636 787 944 1268 1540 2247 2521 2522 2842 3231 3384 3385 3392 3535 - 2844 13824 13 379 651 653 654 960 1277 1278 1545 1546 2333 2525 2846 3537 - 2845 12288 9 958 1279 1768 2061 2846 2847 3111 3536 3537 - 2846 12288 13 958 1278 1546 1768 2028 2061 2062 2844 2845 3054 3111 3536 3537 - 2847 13824 9 706 958 1008 1279 1318 1320 2524 2845 3536 - 2848 13824 6 174 659 962 1288 1548 2529 - 2849 16384 10 951 2850 2854 3396 3398 3538 3539 3541 3691 3692 - 2850 16384 14 1292 2537 2849 2851 2854 2857 3396 3398 3400 3538 3539 3541 3691 3692 - 2851 24576 11 990 1292 1294 1302 1558 2708 2850 2857 2858 3539 3547 - 2852 24576 20 376 662 1293 1552 1553 1769 1770 1771 2526 2853 2856 2936 3474 3475 3540 3543 3546 3708 3709 3720 - 2853 12288 12 1293 1551 1552 2852 2856 2861 3464 3540 3543 3546 3707 3720 - 2854 16384 21 2849 2850 2855 2857 2862 3396 3398 3465 3538 3539 3541 3542 3544 3545 3547 3581 3691 3692 3706 3718 3719 - 2855 12288 21 1299 2854 2856 2857 2862 2938 3465 3466 3541 3542 3543 3544 3545 3546 3547 3581 3706 3707 3718 3719 3720 - 2856 12288 23 1293 1299 2695 2852 2853 2855 2862 2938 3464 3465 3466 3474 3540 3542 3543 3545 3546 3581 3706 3707 3708 3719 3720 - 2857 24576 22 1292 1294 1300 1774 2537 2697 2850 2851 2854 2855 2858 2862 3398 3400 3465 3467 3539 3544 3545 3547 3692 3706 - 2858 16384 13 990 1294 1302 1305 1558 2708 2851 2857 2859 2864 3467 3547 3706 - 2859 4608 7 2708 2858 2860 2863 2864 3467 3468 - 2860 4608 9 1295 2539 2696 2859 2863 2864 3401 3467 3468 - 2861 24576 17 987 1293 1296 1297 1298 1553 1556 2695 2701 2702 2704 2853 2941 3464 3470 3474 3475 - 2862 12288 15 1299 1555 1774 2536 2854 2855 2856 2857 2938 2939 2940 3398 3465 3466 3581 - 2863 12288 15 991 993 1295 1303 1304 1305 2539 2696 2859 2860 2864 3401 3403 3467 3468 - 2864 12288 9 990 1305 2708 2858 2859 2860 2863 3467 3468 - 2865 12288 11 409 697 999 1000 1309 1310 2345 2346 2548 2710 3478 - 2866 16384 14 175 1322 1577 1781 1782 2204 2205 2867 2945 2984 3209 3479 3480 3548 - 2867 24576 9 1322 1576 1781 1782 1950 1978 2866 2984 3548 - 2868 6144 10 1014 1015 1326 1903 1980 2716 3014 3308 3310 3557 - 2869 4096 12 1328 1582 1583 1593 2558 2719 2946 2948 2949 3415 3481 3583 - 2870 24576 21 1327 1329 1336 1338 1583 1584 1585 1594 1899 1900 1953 2871 2872 2947 2949 3549 3550 3551 3555 3721 3722 - 2871 16384 14 1036 1336 1339 1594 1895 2554 2555 2556 2870 2872 3549 3550 3551 3721 - 2872 12288 8 1036 1336 2870 2871 3549 3550 3551 3721 - 2873 9216 17 1019 1020 1342 1344 1603 2722 2733 2734 2875 2876 2954 3487 3488 3553 3554 3556 3723 - 2874 8192 11 1044 1598 2875 2950 3004 3552 3553 3555 3556 3722 3723 - 2875 8192 20 726 1044 1342 1353 1598 2565 2873 2874 2876 2950 2954 3004 3491 3552 3553 3554 3555 3556 3722 3723 - 2876 12288 11 1342 1353 2733 2873 2875 2896 3487 3553 3554 3556 3723 - 2877 12288 23 423 760 1077 1346 1349 1386 1605 1656 1800 1913 2370 2371 2376 2602 2736 2758 2885 3320 3325 3335 3339 3564 3677 - 2878 12288 15 711 1016 1957 1959 1981 2879 2886 2887 2986 3312 3313 3314 3315 3557 3558 - 2879 12288 21 1801 1957 1958 1959 2366 2367 2878 2880 2886 2887 2888 2957 2986 3312 3313 3314 3315 3557 3558 3559 3584 - 2880 12288 20 1958 2366 2367 2372 2377 2879 2881 2887 2888 2889 2957 2958 3313 3315 3321 3558 3559 3560 3584 3585 - 2881 12288 21 2366 2367 2372 2373 2377 2880 2882 2888 2889 2890 2957 2958 2959 3321 3322 3559 3560 3561 3584 3585 3586 - 2882 12288 19 1609 2372 2373 2374 2377 2881 2883 2889 2890 2891 2956 2959 3321 3322 3323 3560 3561 3562 3586 - 2883 12288 20 1350 1609 1802 1803 1960 2373 2374 2375 2882 2884 2890 2891 2892 2956 3322 3323 3324 3561 3562 3563 - 2884 12288 19 1347 1350 1611 1802 1803 2374 2375 2376 2737 2883 2885 2892 3323 3324 3325 3490 3562 3563 3564 - 2885 12288 18 423 1041 1042 1346 1347 1348 2371 2375 2376 2736 2737 2877 2884 3324 3325 3490 3563 3564 - 2886 24576 15 417 2353 2368 2369 2738 2878 2879 2887 2986 3064 3065 3071 3072 3314 3315 - 2887 24576 22 421 1043 1801 2367 2368 2369 2738 2878 2879 2880 2886 2888 2957 2986 3064 3065 3066 3071 3072 3073 3314 3315 - 2888 24576 22 421 424 1043 2367 2369 2372 2377 2560 2879 2880 2881 2887 2889 2957 2958 3065 3066 3067 3072 3073 3074 3315 - 2889 24576 23 206 421 424 2367 2372 2373 2377 2560 2561 2880 2881 2882 2888 2890 2957 2958 2959 3066 3067 3068 3073 3074 3075 - 2890 24576 22 206 424 1609 2372 2373 2374 2377 2560 2561 2562 2881 2882 2883 2889 2891 2959 3067 3068 3069 3074 3075 3076 - 2891 18432 17 206 1609 1610 1802 1960 2373 2374 2561 2562 2882 2883 2890 2892 3068 3069 3075 3076 - 2892 18432 18 1347 1350 1610 1611 1802 1803 1960 2374 2375 2562 2563 2883 2884 2891 3069 3070 3076 3077 - 2893 9216 15 433 1349 1382 1605 1651 1800 2382 2383 2385 2758 2895 3330 3332 3566 3677 - 2894 6144 11 2384 2385 2895 2985 3331 3332 3490 3563 3564 3565 3566 - 2895 6144 17 433 1349 1800 2383 2384 2385 2736 2893 2894 2985 3331 3332 3490 3563 3564 3565 3566 - 2896 18432 5 1353 2565 2733 2876 3556 - 2897 18432 18 1065 1374 1637 1642 1643 1821 2589 2748 2749 2964 2965 2990 3431 3432 3433 3494 3699 3700 - 2898 16384 18 431 727 1066 1070 1378 1379 1649 1650 1822 1823 1825 1912 2381 2566 2752 2754 3499 3712 - 2899 16384 17 747 1395 1658 1660 1661 2232 2586 2587 2588 2968 3093 3094 3225 3429 3430 3615 3616 - 2900 9216 11 1399 1664 1665 1963 1964 1983 2903 2969 2970 3567 3588 - 2901 18432 18 1396 1399 1400 1660 1664 1665 2761 2969 3089 3090 3091 3101 3102 3104 3105 3502 3503 3713 - 2902 32768 12 1401 1405 1666 1667 1829 2903 2905 2906 2971 2992 3567 3568 - 2903 16384 11 1399 1400 1401 1667 1829 1964 1983 2900 2902 2972 3567 - 2904 18432 12 1091 1402 1407 1667 2759 2761 2767 2972 3502 3506 3507 3714 - 2905 24576 10 1092 1401 1402 1403 1405 1667 1669 2762 2902 3504 - 2906 16384 9 1093 1401 1404 1405 1666 2902 2907 2971 3568 - 2907 16384 15 456 757 1404 1409 1668 1671 1916 1917 2600 2601 2906 2911 2973 3438 3568 - 2908 18432 12 482 1091 1095 1398 1407 2049 2052 2053 2759 2760 2764 3501 - 2909 9216 8 776 1408 2437 2603 2613 2773 2910 3569 - 2910 12288 10 485 775 1094 1408 1410 2418 2762 2909 2974 3569 - 2911 24576 10 1093 1097 1404 1409 1671 1917 2604 2768 2907 2912 - 2912 32768 13 484 775 1093 1094 1097 1409 1410 2418 2419 2604 2605 2763 2911 - 2913 2048 10 515 803 1417 1418 1674 2435 3031 3045 3597 3598 - 2914 12288 11 1420 1685 2081 2088 2089 2093 2095 2777 2979 3131 3135 - 2915 16384 15 1421 1676 1969 1991 1993 2620 2621 2917 2918 2975 3012 3571 3572 3574 3725 - 2916 16384 12 293 539 812 1124 2620 2917 3570 3571 3573 3574 3724 3725 - 2917 16384 14 293 1421 2620 2621 2915 2916 2918 3570 3571 3572 3573 3574 3724 3725 - 2918 8192 9 1421 1969 2915 2917 3012 3571 3572 3574 3725 - 2919 24576 14 844 1125 1422 1709 1839 1861 1923 1970 2784 2785 2799 3007 3013 3516 - 2920 12288 16 813 1423 1680 1681 1683 1844 2619 2783 2784 2921 2923 2978 3515 3516 3575 3578 - 2921 9216 11 1126 1423 1425 1681 1683 1844 2785 2920 2978 3516 3575 - 2922 16384 18 814 823 1129 1140 1424 1842 1927 1928 2627 2788 2793 2923 2924 3008 3576 3577 3578 3726 - 2923 16384 19 813 822 823 1140 1424 1433 1680 1841 1844 1845 2619 2625 2920 2922 2924 3576 3577 3578 3726 - 2924 8192 11 814 1130 1424 1426 2922 2923 2978 3576 3577 3578 3726 - 2925 8192 7 816 817 1134 1429 1920 2995 3005 - 2926 24576 8 1434 1931 1935 2094 2928 2981 3135 3590 - 2927 4096 8 1158 1450 1453 1707 1861 2636 2798 2799 - 2928 12288 16 1434 1455 1456 1457 1695 1696 1697 1710 1713 1862 1864 1931 1935 2926 2929 2981 - 2929 32768 21 1142 1163 1434 1435 1455 1456 1457 1458 1460 1695 1696 1699 1711 1714 1862 1931 2641 2794 2928 2930 3441 - 2930 18432 17 1142 1167 1436 1457 1460 1699 2628 2629 2641 2642 2794 2805 2806 2929 3441 3442 3521 - 2931 24576 14 849 1168 1181 1184 1471 1474 1475 1476 2463 2464 2641 2642 2650 3352 - 2932 18432 13 847 1164 1492 1494 1740 1741 1742 2104 2638 2801 2812 3138 3522 - 2933 6144 14 893 1227 1237 1239 1515 1516 1517 1749 1751 2825 2826 3375 3529 3687 - 2934 24576 9 237 891 1533 2231 2669 2831 2832 3670 3671 - 2935 4096 7 1551 3544 3545 3546 3547 3706 3707 - 2936 4096 12 1296 1297 1552 1554 1769 1770 1771 1772 2852 3471 3708 3709 - 2937 6144 13 376 1555 2198 2938 2939 3208 3296 3472 3579 3580 3581 3708 3727 - 2938 6144 17 1299 1555 2705 2855 2856 2862 2937 2939 3472 3474 3542 3543 3579 3580 3581 3708 3727 - 2939 8192 15 1299 1555 1569 1892 2535 2536 2862 2937 2938 3396 3398 3579 3580 3581 3727 - 2940 4096 10 1299 1300 1774 2697 2698 2862 2941 3465 3466 3474 - 2941 4096 11 985 1299 1556 2695 2698 2702 2861 2940 3466 3474 3475 - 2942 24576 14 414 702 1566 1890 2349 2350 2352 2549 2943 3292 3293 3406 3407 3582 - 2943 12288 15 412 700 702 997 1001 1311 1566 2032 2218 2219 2548 2710 2942 3055 3582 - 2944 24576 11 1569 1891 1892 1949 2199 2200 2535 2712 3206 3207 3397 - 2945 24576 18 1322 1323 1324 1576 1577 1578 1579 1580 1581 1781 1782 1783 1784 2717 2718 2866 3479 3480 - 2946 4096 7 1582 1583 1593 2869 2948 2949 3583 - 2947 12288 13 1327 1329 1584 1585 1899 1953 2360 2361 2870 3549 3550 3721 3722 - 2948 9216 15 718 1026 1328 1332 1582 1588 1593 1595 1788 2552 2869 2946 2949 3415 3583 - 2949 12288 13 1035 1338 1583 1584 1593 1594 2869 2870 2946 2948 3481 3549 3583 - 2950 16384 14 722 1598 1613 1804 1805 1901 2558 2874 2875 2951 2953 3004 3552 3553 - 2951 12288 16 722 1045 1598 1599 1613 1793 1804 1805 1901 1902 2074 2379 2558 2950 2952 2953 - 2952 12288 12 428 1045 1597 1599 1600 1793 2074 2379 2567 2951 2953 3416 - 2953 12288 14 1045 1046 1352 1598 1599 1601 1613 1793 1805 1901 2950 2951 2952 2955 - 2954 18432 10 726 1342 1344 1598 2740 2873 2875 2955 3491 3553 - 2955 18432 9 1344 1352 1598 1601 2731 2740 2953 2954 3327 - 2956 12288 13 730 1354 1356 1608 1609 1806 1960 2882 2883 2959 3561 3562 3586 - 2957 12288 12 1043 1958 2560 2879 2880 2881 2887 2888 2889 2958 3584 3585 - 2958 9216 12 1355 1615 2560 2880 2881 2888 2889 2957 2959 3584 3585 3586 - 2959 9216 18 730 1048 1354 1355 1356 1609 1615 2560 2561 2568 2881 2882 2889 2890 2956 2958 3585 3586 - 2960 24576 17 77 190 194 195 417 1358 1619 1620 1810 2085 2353 2355 2961 3128 3129 3295 3629 - 2961 3072 8 1619 1620 1810 2085 2960 3128 3129 3629 - 2962 24576 12 703 1631 1814 2079 2349 2351 2549 2988 3123 3124 3293 3628 - 2963 9216 5 1373 1640 3121 3123 3428 - 2964 9216 9 1637 1642 2078 2079 2747 2897 2990 3699 3700 - 2965 13824 13 1065 1374 1643 1821 2748 2749 2897 2966 2990 2991 3494 3587 3592 - 2966 12288 15 720 721 1031 1034 1643 2009 2010 2557 2749 2965 2991 3036 3494 3587 3592 - 2967 13824 18 208 435 725 761 764 1041 1042 1082 1348 1393 1657 2033 2403 2408 3339 3340 3341 3679 - 2968 4608 11 1086 1659 1661 2232 2236 2899 3093 3094 3225 3615 3616 - 2969 12288 14 1395 1396 1399 1400 1658 1660 1664 1665 1827 1828 2900 2901 2970 3588 - 2970 16384 10 453 1399 1664 1665 1963 2593 2900 2969 3567 3588 - 2971 16384 10 454 751 756 1666 2599 2902 2906 2973 2992 3568 - 2972 18432 8 1400 1402 1667 2761 2903 2904 3502 3567 - 2973 12288 8 756 1668 2599 2601 2907 2971 3438 3568 - 2974 8192 12 485 775 1094 1406 1410 1670 1830 1915 2418 2762 2910 3569 - 2975 12288 8 1676 1991 1993 2915 2994 3571 3572 3725 - 2976 6144 14 820 1154 1677 1705 1835 1836 1921 2635 2791 2977 2998 2999 3589 3595 - 2977 6144 12 1154 1677 1836 1922 1924 2635 2976 2998 2999 3001 3589 3595 - 2978 18432 11 1127 1423 1426 1681 1683 1844 2920 2921 2924 3575 3578 - 2979 32768 16 1420 1685 1686 1687 1697 1848 1855 1856 1857 1932 2093 2095 2628 2777 2914 3512 - 2980 9216 9 1173 1710 1713 1865 2143 2807 2981 3165 3590 - 2981 12288 15 1434 1455 1456 1710 1713 1862 1863 1864 1865 1931 1935 2926 2928 2980 3590 - 2982 24576 14 846 850 1145 1463 1717 2455 2630 2644 2645 2646 2795 2796 3355 3519 - 2983 1536 6 586 893 1519 1761 2839 3533 - 2984 24576 16 656 660 963 1011 1013 1322 1781 1782 1893 1978 2030 2204 2715 2866 2867 3548 - 2985 18432 16 715 1040 1800 1908 1956 2732 2894 2895 3319 3320 3324 3325 3563 3564 3565 3566 - 2986 12288 10 1043 1801 1957 1959 1981 2738 2878 2879 2886 2887 - 2987 18432 16 21 22 186 187 392 703 1002 1814 1816 2012 2549 2988 2989 3038 3040 3591 - 2988 12288 7 703 1631 1814 2549 2962 2987 3591 - 2989 13824 15 7 21 22 186 187 422 1632 1815 1816 2012 2096 2726 2987 3038 3040 - 2990 9216 15 1374 1642 1643 1821 2078 2079 2585 2747 2897 2964 2965 2991 3122 3124 3592 - 2991 9216 13 415 1643 1821 2009 2010 2011 2078 2965 2966 2990 3122 3587 3592 - 2992 18432 12 454 750 751 756 1666 1829 1963 1983 2599 2902 2971 3567 - 2993 8192 7 218 1832 2081 2225 2226 3125 3220 - 2994 4608 10 1676 1833 1918 1965 2975 3009 3570 3571 3724 3725 - 2995 24576 14 524 817 1134 1429 1834 1920 1966 1985 1986 2447 2925 3005 3010 3015 - 2996 16384 14 1154 1704 1705 1834 1835 1919 1921 1934 1968 1975 3000 3006 3589 3595 - 2997 8192 11 818 1136 1836 1974 1989 2998 2999 3593 3594 3595 3728 - 2998 9216 19 818 820 1677 1835 1836 1921 1988 2622 2791 2976 2977 2997 2999 3016 3589 3593 3594 3595 3728 - 2999 12288 15 1677 1836 1922 1924 1989 2976 2977 2997 2998 3001 3589 3593 3594 3595 3728 - 3000 6144 3 1704 1837 2996 - 3001 9216 19 1138 1158 1159 1431 1451 1677 1691 1836 1838 1853 1922 1924 2266 2452 2635 2791 2792 2977 2999 - 3002 1536 8 986 1777 1887 1888 1948 2699 2700 3469 - 3003 18432 11 425 717 1025 1896 1897 1898 1952 3300 3301 3302 3303 - 3004 18432 16 714 1017 1018 1035 1598 1901 2558 2719 2720 2721 2874 2875 2950 3481 3552 3553 - 3005 24576 12 816 1134 1920 1985 1987 1992 1994 2925 2995 3010 3012 3015 - 3006 16384 12 1834 1835 1921 1966 1968 1995 1996 1997 2996 3016 3589 3595 - 3007 4608 8 1158 1707 1709 1861 1923 1970 2919 3013 - 3008 3072 7 1842 1927 1928 2922 3576 3577 3726 - 3009 24576 7 1965 2778 2781 2994 3513 3724 3725 - 3010 24576 9 1834 1920 1966 1967 1985 1986 2995 3005 3015 - 3011 3072 2 1967 1985 - 3012 24576 14 816 1421 1920 1969 1985 1987 1991 1993 2621 2915 2918 3005 3015 3572 - 3013 6144 4 1923 1970 2919 3007 - 3014 4608 5 1326 1903 1980 2868 3557 - 3015 24576 8 1985 1987 1991 1994 2995 3005 3010 3012 - 3016 24576 11 1834 1921 1966 1988 1995 1996 2998 3006 3593 3595 3728 - 3017 24576 10 1 6 38 39 123 283 284 1998 2002 3028 - 3018 9216 13 57 58 59 165 370 1999 2000 2194 2330 2331 3019 3284 3596 - 3019 9216 6 57 164 2000 2194 3018 3596 - 3020 16384 12 1121 2003 2014 2015 2022 2036 2775 3021 3031 3045 3597 3598 - 3021 16384 11 122 279 1121 2005 2015 2022 3020 3022 3597 3598 3599 - 3022 16384 11 122 279 2005 2015 2445 3021 3023 3050 3598 3599 3600 - 3023 16384 11 122 523 2005 2023 2445 3022 3024 3050 3599 3600 3601 - 3024 16384 11 281 523 2016 2023 3023 3025 3046 3600 3601 3602 3613 - 3025 16384 9 2017 3024 3026 3046 3047 3601 3602 3603 3613 - 3026 16384 9 282 2017 3025 3027 3047 3051 3602 3603 3604 - 3027 16384 11 282 284 2002 2004 2018 2024 3026 3028 3051 3603 3604 - 3028 24576 13 38 116 118 119 271 283 284 1998 2002 2004 3017 3027 3604 - 3029 6144 11 522 2066 2774 3030 3043 3044 3113 3605 3606 3611 3612 - 3030 6144 13 522 2003 2066 2774 3029 3031 3043 3044 3078 3605 3606 3611 3612 - 3031 9216 19 515 803 1417 1674 2003 2014 2612 2774 2775 2913 3020 3030 3044 3045 3509 3510 3597 3606 3612 - 3032 16384 16 33 59 102 103 147 348 475 2006 2097 2193 2197 3033 3204 3205 3607 3652 - 3033 24576 19 10 56 58 59 60 61 370 371 641 643 2006 2007 2008 2097 2130 2330 3032 3034 3607 - 3034 9216 7 10 2006 2007 2008 2097 2130 3033 - 3035 8192 9 202 412 1031 2729 2730 3036 3037 3041 3042 - 3036 8192 12 1031 2009 2010 2011 2013 2730 2966 3035 3037 3041 3042 3587 - 3037 4096 11 415 704 2009 2010 2011 2013 2351 3035 3036 3041 3042 - 3038 18432 21 22 186 187 392 393 703 1002 1312 1816 2012 2337 2549 2551 2987 2989 3039 3040 3407 3591 3608 3610 - 3039 12288 6 393 2012 3038 3608 3609 3610 - 3040 12288 21 422 703 1027 1568 1631 1632 1633 1634 1635 1814 1816 2012 2013 2351 2551 2726 2987 2989 3038 3042 3610 - 3041 24576 19 202 410 412 698 1031 1567 1590 1894 2550 2551 2725 2729 2730 3035 3036 3037 3042 3609 3610 - 3042 24576 24 415 703 704 1027 1031 1315 1568 1590 2010 2011 2013 2351 2550 2551 2726 2730 3035 3036 3037 3040 3041 3587 3609 3610 - 3043 8192 9 2021 3029 3030 3044 3049 3605 3606 3611 3612 - 3044 8192 13 2003 2014 2021 3029 3030 3031 3043 3045 3049 3605 3606 3611 3612 - 3045 6144 12 515 803 1674 2003 2014 2612 2913 3020 3031 3044 3597 3612 - 3046 8192 9 281 2016 2017 3024 3025 3047 3601 3602 3613 - 3047 12288 13 276 282 2017 2112 2113 2257 2259 3025 3026 3046 3602 3603 3613 - 3048 3072 10 177 381 661 674 2019 2020 2531 2716 3216 3480 - 3049 6144 13 268 520 810 1120 1419 2001 2021 2253 2612 3043 3044 3611 3612 - 3050 1536 6 523 2005 2023 2445 3022 3023 - 3051 2048 6 282 284 2017 2024 3026 3027 - 3052 6144 13 264 359 507 508 2027 2189 2329 2430 2431 3053 3169 3346 3614 - 3053 8192 13 109 154 264 362 508 2025 2027 2323 2431 3052 3279 3346 3614 - 3054 9216 13 379 654 657 960 1278 2028 2030 2061 2062 2063 2065 2846 3112 - 3055 18432 13 411 700 702 1001 1311 1566 2031 2032 2218 2219 2548 2710 2943 - 3056 4096 10 1043 1052 2380 2738 2744 2745 3057 3071 3072 3493 - 3057 4096 14 430 1043 1052 2380 2738 2744 2745 3056 3058 3072 3073 3422 3493 3696 - 3058 4096 10 430 2560 3057 3059 3073 3074 3422 3423 3696 3697 - 3059 4096 11 2560 2561 2568 3058 3060 3074 3075 3423 3424 3697 3698 - 3060 4096 14 731 744 2561 2562 2568 2574 2583 3059 3061 3075 3076 3418 3424 3698 - 3061 4096 16 432 447 731 744 2387 2389 2396 2562 2563 2574 2583 3060 3062 3076 3077 3418 - 3062 3072 15 216 432 436 447 2035 2387 2388 2389 2396 2563 2564 3061 3063 3077 3164 - 3063 3072 17 89 208 216 217 435 436 2033 2035 2140 2387 2388 2389 2563 2564 3062 3077 3164 - 3064 8192 14 417 1619 2077 2353 2368 2369 2886 2887 3065 3071 3072 3128 3492 3493 - 3065 8192 17 421 1624 2368 2369 2743 2744 2886 2887 2888 3064 3066 3071 3072 3073 3492 3493 3696 - 3066 8192 18 421 424 1624 1626 2369 2377 2743 2744 2887 2888 2889 3065 3067 3072 3073 3074 3696 3697 - 3067 8192 17 206 421 424 1626 2377 2888 2889 2890 3066 3068 3073 3074 3075 3219 3696 3697 3698 - 3068 8192 15 206 424 2222 2377 2889 2890 2891 3067 3069 3074 3075 3076 3219 3418 3698 - 3069 8192 13 206 2222 2396 2583 2890 2891 2892 3068 3070 3075 3076 3077 3418 - 3070 8192 10 216 1347 2034 2035 2396 2583 2892 3069 3076 3077 - 3071 8192 11 417 2077 2738 2886 2887 3056 3064 3065 3072 3128 3493 - 3072 8192 16 1043 2738 2744 2886 2887 2888 3056 3057 3064 3065 3066 3071 3073 3422 3493 3696 - 3073 8192 17 1043 2560 2744 2887 2888 2889 3057 3058 3065 3066 3067 3072 3074 3422 3423 3696 3697 - 3074 8192 18 2560 2561 2888 2889 2890 3058 3059 3066 3067 3068 3073 3075 3422 3423 3424 3696 3697 3698 - 3075 8192 17 2560 2561 2562 2574 2889 2890 2891 3059 3060 3067 3068 3069 3074 3076 3418 3424 3698 - 3076 8192 19 447 744 2396 2561 2562 2563 2574 2583 2890 2891 2892 3060 3061 3068 3069 3070 3075 3077 3418 - 3077 8192 18 216 447 744 1347 2034 2035 2396 2562 2563 2564 2583 2892 3061 3062 3063 3069 3070 3076 - 3078 2048 6 2003 2036 2066 2774 2775 3030 - 3079 24576 18 221 526 824 831 1439 1701 2037 2227 2626 2627 2639 2793 2802 2803 2804 3137 3440 3520 - 3080 8192 9 1439 1459 1866 1936 2038 2793 3081 3082 3440 - 3081 24576 10 1459 1866 1936 2260 2261 3080 3082 3440 3660 3661 - 3082 24576 17 527 823 1140 1459 2037 2038 2039 2261 2262 2627 2639 2793 3080 3081 3440 3661 3662 - 3083 1536 6 545 841 1157 2040 2041 3084 - 3084 18432 12 545 839 840 841 1156 1157 2040 2041 2634 2636 2798 3083 - 3085 16384 19 562 564 861 863 864 866 1485 2042 2043 2044 2467 2470 2472 2654 2655 2657 3086 3367 3447 - 3086 9216 11 564 861 863 864 2042 2044 2472 2654 2655 3085 3447 - 3087 3072 8 1274 1543 2045 2046 2047 2692 3088 3206 - 3088 6144 10 951 1272 1542 2045 2046 2047 2048 2692 3087 3206 - 3089 2048 10 1395 1396 1661 1665 2901 3090 3093 3094 3100 3101 - 3090 1536 10 1396 1665 2901 3089 3091 3094 3095 3101 3102 3713 - 3091 1536 10 1088 2049 2050 2052 2901 3090 3095 3102 3501 3713 - 3092 6144 14 240 1089 1397 1398 2050 2051 2147 2148 2235 3095 3098 3099 3617 3620 - 3093 4096 15 747 1395 1396 1661 2588 2899 2968 3089 3094 3100 3101 3615 3616 3618 3619 - 3094 4096 19 1395 1396 1659 1661 2899 2968 3089 3090 3093 3095 3100 3101 3102 3615 3616 3617 3618 3619 3620 - 3095 4096 17 1088 1396 1659 2049 2050 2052 3090 3091 3092 3094 3099 3101 3102 3616 3617 3619 3620 - 3096 4096 11 239 2232 2234 2236 3097 3225 3615 3616 3618 3619 3621 - 3097 4096 12 239 242 2232 2236 3096 3098 3616 3617 3619 3620 3621 3622 - 3098 4096 11 242 2051 2147 2148 3092 3097 3099 3103 3617 3620 3622 - 3099 12288 18 482 1089 1398 2050 2051 2052 2053 2054 2415 3092 3095 3098 3102 3103 3105 3617 3620 3622 - 3100 8192 11 747 1665 2588 3089 3093 3094 3101 3104 3618 3619 3621 - 3101 8192 16 1665 2901 3089 3090 3093 3094 3095 3100 3102 3104 3105 3618 3619 3620 3621 3622 - 3102 8192 22 2049 2050 2052 2053 2760 2901 3090 3091 3094 3095 3099 3101 3103 3104 3105 3501 3503 3619 3620 3621 3622 3713 - 3103 6144 14 482 1089 1398 2051 2052 2053 2054 2415 3098 3099 3102 3105 3620 3622 - 3104 4096 10 2901 3100 3101 3102 3105 3618 3619 3620 3621 3622 - 3105 4096 14 2052 2053 2760 2901 3099 3101 3102 3103 3104 3503 3619 3620 3621 3622 - 3106 12288 11 491 492 780 1412 2055 2056 2057 2425 3107 3108 3623 - 3107 9216 10 228 491 2055 2057 2228 2244 2425 3106 3221 3623 - 3108 4608 5 228 2056 2057 3106 3623 - 3109 9216 18 561 862 863 1186 1488 1732 2059 2060 2072 2471 2472 2656 3110 3118 3119 3120 3625 3626 - 3110 1536 6 561 862 863 1732 2060 3109 - 3111 1536 5 1768 2061 2062 2845 2846 - 3112 8192 10 655 1768 2028 2029 2030 2061 2063 2064 2065 3054 - 3113 3072 4 522 2058 2066 3029 - 3114 32768 22 829 1135 1145 1146 1429 1430 1441 1690 1700 1834 1850 1851 1921 1988 2067 2068 2069 2263 2622 2630 2795 3235 - 3115 12288 12 858 1480 1486 2070 2071 2072 3116 3117 3118 3120 3624 3626 - 3116 8192 10 2070 3115 3117 3119 3120 3624 3625 3626 3702 3703 - 3117 4608 7 858 1480 2070 2071 3115 3116 3624 - 3118 18432 16 564 858 869 1186 1480 1486 2059 2070 2072 2471 2472 2473 3109 3115 3120 3626 - 3119 12288 14 554 851 1488 2646 3109 3116 3120 3452 3453 3624 3625 3626 3702 3703 - 3120 12288 18 1488 2059 2070 2072 2659 3109 3115 3116 3118 3119 3448 3452 3453 3624 3625 3626 3702 3703 - 3121 12288 13 1370 1371 1639 1640 1819 2078 2585 2963 3122 3123 3428 3627 3628 - 3122 13824 19 415 1371 1372 1821 2011 2013 2078 2079 2351 2352 2990 2991 3121 3123 3124 3293 3592 3627 3628 - 3123 8192 12 1631 1640 2078 2079 2747 2962 2963 3121 3122 3124 3627 3628 - 3124 6144 15 415 1631 2011 2013 2078 2079 2351 2352 2962 2990 3122 3123 3293 3592 3628 - 3125 32768 9 218 1832 2081 2089 2225 2226 2993 3133 3220 - 3126 12288 11 693 1885 1886 1947 2082 2083 2540 2541 2542 3401 3402 - 3127 6144 12 418 734 1359 1361 1621 1911 2075 2076 2084 2087 2569 3130 - 3128 3072 17 417 1619 1620 2076 2077 2085 2086 2353 2960 2961 3064 3071 3129 3130 3492 3493 3629 - 3129 4096 12 1359 1619 1620 2076 2085 2086 2087 2960 2961 3128 3130 3629 - 3130 12288 14 734 1050 1359 2075 2076 2084 2085 2086 2087 2569 3127 3128 3129 3629 - 3131 3072 9 1420 2088 2089 2777 2914 3132 3133 3511 3630 - 3132 4096 9 1122 2088 2089 2777 2778 3131 3133 3511 3630 - 3133 16384 7 2081 2088 2089 3125 3131 3132 3630 - 3134 3072 7 1420 1846 2081 2090 2091 2093 3135 - 3135 32768 19 219 220 451 1420 1434 1675 1695 1696 1931 2081 2090 2091 2092 2093 2094 2397 2914 2926 3134 - 3136 6144 8 20 24 2099 2100 3316 3317 3321 3322 - 3137 16384 10 28 221 223 2102 2103 2802 2803 2804 3079 3520 - 3138 16384 13 29 1492 1495 1497 1740 1741 2104 2106 2107 2814 2815 2932 3139 - 3139 16384 13 1201 1492 1495 1497 1741 2106 2107 2108 2478 2674 2815 3138 3140 - 3140 16384 12 30 900 1201 1495 1497 2105 2107 2108 2478 2674 3139 3371 - 3141 24576 9 113 273 518 2110 2111 2153 2155 2160 3142 - 3142 24576 8 273 2110 2111 2112 2155 2156 3141 3143 - 3143 24576 7 2111 2112 2113 2156 2157 3142 3144 - 3144 24576 7 2112 2113 2114 2157 2158 3143 3145 - 3145 24576 7 39 114 2113 2114 2115 2158 3144 - 3146 12288 18 336 921 2180 3147 3150 3151 3191 3192 3193 3194 3195 3196 3197 3198 3631 3632 3634 3635 - 3147 9216 21 2172 2173 2180 2181 3146 3148 3150 3151 3152 3193 3194 3195 3196 3197 3198 3631 3632 3633 3634 3635 3636 - 3148 9216 22 136 145 588 2117 2118 2172 2173 2179 2181 2488 3147 3149 3151 3152 3153 3195 3196 3198 3632 3633 3635 3636 - 3149 13824 14 305 306 572 588 2117 2118 2172 2281 2488 3148 3152 3153 3633 3636 - 3150 12288 17 337 611 921 2119 2120 2180 3146 3147 3151 3154 3155 3197 3198 3631 3632 3634 3635 - 3151 9216 21 2119 2120 2121 2180 2181 3146 3147 3148 3150 3152 3154 3155 3156 3197 3198 3631 3632 3633 3634 3635 3636 - 3152 9216 21 46 145 2117 2118 2120 2121 2122 2179 2181 3147 3148 3149 3151 3153 3155 3156 3198 3632 3633 3635 3636 - 3153 13824 16 46 127 305 306 572 2117 2118 2121 2122 2281 3148 3149 3152 3156 3633 3636 - 3154 18432 14 45 140 317 337 2119 2120 2282 2283 2284 3150 3151 3155 3634 3635 - 3155 13824 15 317 2116 2119 2120 2121 2283 2284 3150 3151 3152 3154 3156 3634 3635 3636 - 3156 13824 16 42 46 127 305 2116 2118 2120 2121 2122 2284 3151 3152 3153 3155 3635 3636 - 3157 9216 17 52 55 162 265 511 799 1112 1113 1114 2125 2126 2127 2128 2129 3158 3159 3637 - 3158 12288 13 52 159 265 503 2125 2126 2127 3157 3159 3161 3162 3203 3637 - 3159 12288 10 52 159 367 2125 2126 2127 2192 3157 3158 3637 - 3160 32768 12 56 135 323 324 370 371 642 2130 2131 2164 2295 2331 - 3161 24576 16 52 63 66 171 265 512 801 2125 2127 2132 2133 2134 2195 3158 3162 3203 - 3162 24576 19 16 52 63 64 65 66 168 171 2125 2127 2132 2133 2134 2135 2195 2196 3158 3161 3203 - 3163 24576 18 78 189 191 192 193 396 398 680 711 2136 2137 2209 2210 2213 2215 3215 3312 3314 - 3164 24576 19 27 88 89 90 208 213 216 436 447 448 449 450 2033 2101 2140 2141 2389 3062 3063 - 3165 6144 9 1173 1174 1710 2143 2144 2807 2808 2980 3166 - 3166 4608 11 1173 1174 2143 2144 2145 2648 2807 2808 3165 3167 3443 - 3167 4608 9 91 1174 2142 2144 2145 2648 2808 3166 3443 - 3168 32768 14 113 153 263 264 359 360 361 507 509 2153 2154 2189 2251 2328 - 3169 32768 16 154 155 156 157 264 509 798 2027 2154 2155 2156 2189 2431 2432 3052 3170 - 3170 32768 13 154 156 157 368 369 510 2155 2156 2157 2431 2432 3169 3171 - 3171 32768 16 53 54 163 368 369 510 511 1114 2128 2129 2156 2157 2158 2432 3170 3172 - 3172 32768 15 14 53 54 55 114 265 511 800 1114 2128 2129 2157 2158 2159 3171 - 3173 18432 16 133 325 584 891 892 1235 1756 2162 2163 2296 2297 2669 2670 2824 3262 3458 - 3174 18432 16 894 896 905 906 1229 1263 2165 2166 2841 3175 3184 3186 3463 3534 3639 3641 - 3175 18432 18 896 1263 2165 2166 2167 2317 2513 2672 2688 3174 3176 3184 3186 3188 3463 3639 3641 3643 - 3176 18432 21 350 2166 2167 2168 2314 2317 2513 2672 2673 2688 3175 3177 3186 3188 3190 3274 3276 3641 3643 3645 3672 - 3177 18432 21 350 897 2167 2168 2169 2294 2314 2673 2689 3176 3178 3188 3190 3192 3199 3274 3276 3643 3645 3647 3672 - 3178 18432 21 321 587 937 2124 2168 2169 2170 2184 2194 2294 2689 3177 3179 3190 3192 3194 3199 3284 3645 3647 3649 - 3179 13824 18 321 587 937 2124 2169 2170 2171 2184 2194 3178 3180 3192 3194 3196 3284 3647 3649 3651 - 3180 13824 18 134 165 323 591 592 2164 2170 2171 2173 2194 2331 3179 3182 3194 3196 3284 3649 3651 - 3181 18432 14 588 878 2172 2173 2478 2479 2487 2488 3182 3195 3196 3372 3650 3651 - 3182 18432 19 43 134 136 588 591 2164 2171 2172 2173 2174 2295 2487 2490 3180 3181 3195 3196 3650 3651 - 3183 16384 23 597 606 915 916 1191 1486 1487 2473 2474 2495 2497 2680 2681 3184 3185 3186 3376 3460 3461 3638 3639 3640 3641 - 3184 16384 25 333 597 598 606 916 917 2165 2166 2495 2497 2679 2680 2681 3174 3175 3183 3185 3186 3376 3460 3461 3638 3639 3640 3641 - 3185 16384 21 1191 1487 2474 2475 2680 2681 3183 3184 3186 3187 3188 3266 3380 3460 3461 3638 3639 3640 3641 3642 3643 - 3186 16384 26 917 2165 2166 2167 2302 2679 2680 2681 3174 3175 3176 3183 3184 3185 3187 3188 3266 3380 3460 3461 3638 3639 3640 3641 3642 3643 - 3187 16384 19 565 2303 2475 2502 2829 2830 3185 3186 3188 3189 3190 3266 3380 3640 3641 3642 3643 3644 3645 - 3188 16384 26 334 1252 2166 2167 2168 2302 2303 2502 2829 2830 3175 3176 3177 3185 3186 3187 3189 3190 3266 3380 3640 3641 3642 3643 3644 3645 - 3189 16384 19 565 609 868 1500 2175 2829 2830 3187 3188 3190 3191 3192 3259 3642 3643 3644 3645 3646 3647 - 3190 16384 20 1252 2167 2168 2169 2829 2830 3176 3177 3178 3187 3188 3189 3191 3192 3642 3643 3644 3645 3646 3647 - 3191 16384 21 336 609 1210 1500 2175 2664 3146 3189 3190 3192 3193 3194 3259 3260 3631 3644 3645 3646 3647 3648 3649 - 3192 16384 21 336 2168 2169 2170 2176 3146 3177 3178 3179 3189 3190 3191 3193 3194 3197 3644 3645 3646 3647 3648 3649 - 3193 12288 19 1210 2664 3146 3147 3191 3192 3194 3195 3196 3260 3261 3631 3632 3646 3647 3648 3649 3650 3651 - 3194 12288 21 2169 2170 2171 3146 3147 3178 3179 3180 3191 3192 3193 3195 3196 3197 3198 3646 3647 3648 3649 3650 3651 - 3195 12288 21 878 2172 2173 2664 3146 3147 3148 3181 3182 3193 3194 3196 3260 3261 3631 3632 3633 3648 3649 3650 3651 - 3196 12288 22 134 2164 2170 2171 2172 2173 3146 3147 3148 3179 3180 3181 3182 3193 3194 3195 3197 3198 3648 3649 3650 3651 - 3197 24576 20 141 144 336 612 921 2169 2170 2171 2176 2177 2178 2180 3146 3147 3150 3151 3192 3194 3196 3198 - 3198 24576 22 47 134 143 144 2123 2170 2171 2173 2177 2178 2179 2180 2181 3146 3147 3148 3150 3151 3152 3194 3196 3197 - 3199 24576 20 321 352 630 897 937 2124 2168 2169 2184 2185 2294 2314 2315 2318 2689 3177 3178 3200 3274 3275 - 3200 24576 19 147 149 347 348 352 630 631 937 2183 2184 2185 2312 2314 2315 2318 2689 3199 3274 3275 - 3201 32768 15 158 358 363 627 2190 2191 2192 2312 2326 2327 2428 2514 3202 3273 3282 - 3202 32768 18 51 158 159 348 363 365 502 503 631 939 2183 2190 2191 2192 2193 2312 2428 3201 - 3203 12288 13 159 168 259 2127 2195 2196 2197 3158 3161 3162 3204 3205 3652 - 3204 16384 18 33 168 373 374 505 644 645 791 2006 2097 2195 2196 2197 2332 3032 3203 3205 3652 - 3205 24576 10 159 168 2193 2195 2196 2197 3032 3203 3204 3652 - 3206 24576 16 648 953 1569 2045 2047 2048 2199 2200 2523 2535 2692 2944 3087 3088 3207 3397 - 3207 24576 19 647 648 953 1273 1569 1570 2045 2047 2048 2199 2200 2201 2535 2692 2944 3206 3208 3397 3580 - 3208 24576 16 172 376 377 647 649 952 1273 1570 2198 2200 2201 2714 2937 3207 3296 3580 - 3209 24576 8 175 655 2203 2204 2205 2866 3479 3548 - 3210 24576 10 673 674 679 972 973 1289 2208 2209 2531 3211 - 3211 24576 12 189 673 679 683 973 974 982 2208 2209 2210 3210 3212 - 3212 18432 12 189 191 677 683 684 974 982 2209 2210 2211 3211 3213 - 3213 18432 11 188 190 191 677 684 979 2210 2211 2212 3212 3286 - 3214 24576 7 192 2213 2214 2215 3215 3216 3653 - 3215 24576 16 189 192 193 398 680 983 2136 2208 2209 2213 2214 2215 3163 3214 3216 3653 - 3216 32768 20 192 674 681 981 1014 1015 2020 2208 2209 2213 2214 2215 2716 3048 3214 3215 3308 3310 3312 3653 - 3217 18432 12 23 78 196 421 1624 2098 2216 2217 2367 2369 2743 3315 - 3218 4608 10 209 437 2220 2221 2381 2382 2383 3328 3330 3332 - 3219 32768 27 25 26 80 82 83 198 206 211 424 687 1625 1626 1627 1628 1629 1812 2138 2222 2223 2573 3067 3068 3418 3420 3421 3697 3698 - 3220 18432 5 218 2225 2226 2993 3125 - 3221 18432 16 225 228 229 462 467 1078 2228 2229 2230 2407 2425 3107 3222 3223 3623 3654 - 3222 12288 13 229 467 765 1084 2228 2229 2230 2408 2410 3221 3223 3341 3654 - 3223 16384 19 93 96 227 229 231 233 234 461 462 1083 2228 2229 2230 2405 2410 3221 3222 3341 3654 - 3224 12288 19 239 477 478 480 767 768 769 1086 2232 2233 2234 2236 2412 2413 2414 3225 3226 3344 3655 - 3225 16384 20 239 477 746 1064 2232 2233 2234 2412 2413 2587 2899 2968 3096 3224 3226 3344 3429 3615 3616 3655 - 3226 12288 14 239 478 746 767 1085 2232 2233 2234 2414 2584 2587 3224 3225 3655 - 3227 24576 15 93 96 247 487 491 779 1102 2146 2229 2239 2240 2420 2421 2425 3345 - 3228 24576 14 248 249 250 494 782 1104 2149 2150 2241 2242 2243 3229 3230 3656 - 3229 18432 12 246 247 248 493 781 2239 2241 2242 2243 3228 3230 3656 - 3230 16384 13 244 247 248 489 2149 2237 2239 2241 2242 2243 3228 3229 3656 - 3231 12288 16 32 101 150 238 254 255 474 497 1268 2246 2247 2517 2842 2843 3390 3535 - 3232 24576 12 150 254 635 796 1111 2246 2250 2251 2328 2842 3233 3283 - 3233 24576 14 151 263 355 360 635 797 1111 2248 2249 2250 2251 2328 3232 3283 - 3234 18432 6 104 241 268 269 2253 2254 - 3235 13824 14 287 524 530 817 819 829 833 1145 2069 2263 2264 2447 2796 3114 - 3236 12288 15 851 1170 1718 1719 3237 3243 3244 3452 3454 3657 3658 3663 3664 3702 3704 - 3237 12288 15 2661 3236 3238 3243 3244 3245 3450 3454 3657 3658 3659 3663 3664 3665 3704 - 3238 12288 16 1491 1738 2661 3237 3239 3244 3245 3246 3450 3658 3659 3660 3664 3665 3666 3716 - 3239 12288 15 1491 1739 3238 3240 3245 3246 3247 3659 3660 3661 3665 3666 3667 3716 3717 - 3240 12288 20 1165 1739 1940 2638 2813 3239 3241 3246 3247 3248 3440 3522 3525 3660 3661 3662 3666 3667 3668 3717 - 3241 12288 21 847 874 1941 2267 2268 2477 2638 2639 2813 3240 3242 3247 3248 3249 3440 3522 3525 3661 3662 3667 3668 - 3242 12288 11 286 847 2039 2267 2268 2639 3241 3248 3249 3662 3668 - 3243 12288 22 554 851 1170 1194 1718 1733 2269 2270 2460 3236 3237 3244 3250 3251 3452 3454 3657 3658 3663 3664 3702 3704 - 3244 12288 23 871 1194 2269 2270 2271 2661 3236 3237 3238 3243 3245 3250 3251 3252 3450 3454 3657 3658 3659 3663 3664 3665 3704 - 3245 12288 22 871 2270 2271 2272 2661 3237 3238 3239 3244 3246 3251 3252 3253 3450 3526 3658 3659 3660 3664 3665 3666 3716 - 3246 12288 21 2271 2272 2273 3238 3239 3240 3245 3247 3252 3253 3254 3526 3527 3659 3660 3661 3665 3666 3667 3716 3717 - 3247 12288 21 2272 2273 2274 2819 3239 3240 3241 3246 3248 3253 3254 3255 3525 3527 3660 3661 3662 3666 3667 3668 3717 - 3248 12288 22 299 569 1941 2267 2268 2273 2274 2275 2477 2819 3240 3241 3242 3247 3249 3254 3255 3525 3661 3662 3667 3668 - 3249 12288 13 286 292 299 2267 2268 2274 2275 3241 3242 3248 3255 3662 3668 - 3250 24576 18 554 830 1152 1442 2269 2270 2460 2631 2665 2821 2823 3243 3244 3251 3456 3528 3663 3664 - 3251 24576 22 532 885 1151 1152 2269 2270 2271 2287 2448 2450 2667 2797 2823 3243 3244 3245 3250 3252 3457 3663 3664 3665 - 3252 24576 23 528 532 533 885 1151 1222 2270 2271 2272 2287 2448 2450 2667 2797 3244 3245 3246 3251 3253 3457 3664 3665 3666 - 3253 24576 23 289 314 528 532 533 890 1222 1223 2260 2265 2271 2272 2273 2290 2450 3245 3246 3247 3252 3254 3665 3666 3667 - 3254 24576 22 130 289 290 314 535 835 2260 2261 2262 2265 2272 2273 2274 2290 3246 3247 3248 3253 3255 3666 3667 3668 - 3255 24576 21 125 130 286 291 292 299 535 536 835 2261 2262 2268 2273 2274 2275 3247 3248 3249 3254 3667 3668 - 3256 32768 22 565 867 872 876 1196 1197 1205 2276 2278 2279 2282 2283 2658 2662 2817 2818 3257 3259 3260 3451 3523 3524 - 3257 32768 17 1202 2278 2279 2280 2282 2283 2284 2816 2817 2818 3256 3258 3259 3260 3261 3523 3524 - 3258 32768 20 304 305 875 877 1202 1203 1208 1496 2277 2279 2280 2281 2283 2284 2816 2818 3257 3260 3261 3524 - 3259 32768 20 303 565 609 610 867 868 1210 1500 2175 2276 2282 2283 2658 3189 3191 3256 3257 3260 3631 3634 - 3260 32768 18 1210 2175 2282 2283 2284 2664 3191 3193 3195 3256 3257 3258 3259 3261 3631 3632 3634 3635 - 3261 32768 21 305 877 878 2172 2277 2281 2283 2284 2664 2820 3193 3195 3257 3258 3260 3631 3632 3633 3634 3635 3636 - 3262 9216 11 325 2163 2296 2297 2298 2670 3173 3263 3264 3458 3669 - 3263 12288 13 325 1179 1180 1225 1877 2296 2297 2298 2462 2670 3262 3264 3669 - 3264 12288 11 325 854 2296 2297 2298 2462 2498 3262 3263 3378 3669 - 3265 32768 18 137 327 328 599 601 902 907 909 910 1235 1244 1245 1527 1756 2299 2300 2499 2676 - 3266 24576 17 334 607 608 917 2166 2167 2302 2303 2502 2503 2680 2681 3185 3186 3187 3188 3380 - 3267 24576 16 339 922 1254 1533 2304 2305 2307 2426 2507 2832 2834 3269 3271 3382 3530 3671 - 3268 18432 12 585 2306 2307 2483 2675 2824 3269 3270 3271 3531 3670 3671 - 3269 18432 14 339 2304 2305 2306 2307 2683 2835 3267 3268 3270 3271 3531 3670 3671 - 3270 12288 18 584 613 891 2162 2306 2307 2483 2504 2505 2824 2831 2832 3268 3269 3271 3381 3670 3671 - 3271 12288 20 339 613 618 925 1254 2304 2305 2306 2307 2504 2505 2831 2832 3267 3268 3269 3270 3381 3670 3671 - 3272 6144 11 146 345 346 624 793 795 2310 2311 2320 2610 2611 - 3273 9216 16 347 627 629 2191 2312 2313 2315 2327 2514 2516 3201 3275 3277 3282 3387 3673 - 3274 12288 16 897 899 1232 2314 2315 2673 2689 3176 3177 3199 3200 3275 3276 3277 3672 3673 - 3275 12288 16 347 631 2183 2312 2313 2314 2315 2689 3199 3200 3273 3274 3276 3277 3672 3673 - 3276 12288 16 350 626 2167 2168 2314 2315 2317 2318 2513 3176 3177 3274 3275 3277 3672 3673 - 3277 12288 19 149 347 351 626 627 629 936 2312 2313 2314 2315 2318 2516 3273 3274 3275 3276 3672 3673 - 3278 12288 12 354 623 794 942 1108 2182 2320 2321 2509 2608 2609 2771 - 3279 18432 20 109 256 356 357 499 508 636 2025 2026 2323 2324 2325 2430 2521 3053 3280 3281 3346 3614 3674 - 3280 12288 11 357 2323 2324 2325 2326 2515 3279 3281 3282 3386 3674 - 3281 12288 15 357 625 636 2323 2324 2325 2510 2515 2521 2522 3279 3280 3386 3392 3674 - 3282 18432 12 358 627 2191 2325 2326 2327 2514 2515 3201 3273 3280 3386 - 3283 16384 16 150 254 255 359 507 635 1268 2246 2250 2251 2328 2329 2430 2842 3232 3233 - 3284 24576 19 165 321 370 592 630 641 937 938 948 2184 2185 2194 2330 2331 3018 3178 3179 3180 3596 - 3285 16384 12 383 384 966 1284 2334 2335 2358 2359 2360 3297 3299 3301 - 3286 9216 17 190 394 395 677 678 684 685 979 980 2212 2339 2340 2341 3213 3287 3288 3675 - 3287 12288 10 395 978 979 980 2339 2340 2341 3286 3288 3675 - 3288 12288 12 394 395 733 2338 2339 2340 2341 3286 3287 3294 3295 3675 - 3289 12288 16 405 701 986 2342 2343 2344 2347 2348 2532 2547 2699 3290 3291 3394 3405 3676 - 3290 12288 18 405 988 989 2342 2343 2344 2358 2703 2704 2707 3289 3291 3412 3413 3471 3676 3693 3694 - 3291 18432 15 405 688 987 988 1298 2342 2343 2344 2532 2534 2704 3289 3290 3394 3676 - 3292 4608 8 414 702 2349 2350 2549 2942 3293 3407 - 3293 16384 20 414 415 703 1315 1566 1631 2349 2350 2351 2352 2549 2551 2942 2962 3122 3124 3292 3407 3627 3628 - 3294 32768 10 394 395 733 2338 2340 2341 2354 2355 3288 3295 - 3295 32768 16 190 394 395 397 417 685 1358 2340 2341 2353 2354 2355 2960 3288 3294 3629 - 3296 24576 15 172 664 1284 1317 1555 2198 2201 2527 2714 2937 3208 3297 3298 3299 3472 - 3297 24576 17 383 664 665 666 1023 1024 1284 1586 2358 2359 2527 3285 3296 3298 3299 3472 3473 - 3298 24576 18 172 378 664 705 708 1005 1009 1022 1284 1317 1331 2201 2714 3296 3297 3299 3300 3301 - 3299 24576 17 383 664 716 966 1024 1284 1586 2335 2358 2359 2360 3285 3296 3297 3298 3300 3301 - 3300 24576 15 378 707 708 717 1009 1010 1025 1331 2333 3003 3298 3299 3301 3302 3303 - 3301 24576 18 178 385 425 667 717 966 1025 2335 2359 2360 2361 3003 3285 3298 3299 3300 3302 3303 - 3302 24576 18 379 707 717 1010 1012 1789 1790 1896 1897 1979 2202 2333 3003 3300 3301 3303 3304 3305 - 3303 24576 20 178 385 425 667 717 1789 1790 1791 1896 1897 1952 2360 2361 2362 3003 3300 3301 3302 3304 3305 - 3304 24576 16 73 173 379 709 968 1012 1789 1790 1897 2202 2715 3302 3303 3305 3306 3307 - 3305 24576 15 968 1789 1790 1791 1897 1952 2361 2362 2363 2528 3302 3303 3304 3306 3307 - 3306 24576 16 73 173 176 709 968 1013 1286 1341 1345 1796 2715 3304 3305 3307 3308 3309 - 3307 24576 16 669 670 968 969 1286 1341 1345 2362 2363 2364 2528 3304 3305 3306 3308 3309 - 3308 24576 16 1013 1341 1345 1604 1796 1903 2020 2214 2716 2868 3216 3306 3307 3309 3310 3311 - 3309 24576 15 669 670 969 1341 1345 1903 2214 2363 2364 2365 3306 3307 3308 3310 3311 - 3310 24576 18 192 1014 1015 1326 1903 2020 2214 2215 2716 2868 3216 3308 3309 3311 3312 3313 3557 3558 - 3311 24576 15 192 1903 1954 2214 2364 2365 2366 3308 3309 3310 3312 3313 3557 3558 3559 - 3312 24576 19 192 711 1015 1016 1326 2136 2214 2215 2878 2879 3163 3216 3310 3311 3313 3314 3315 3557 3558 - 3313 24576 17 192 2136 2214 2365 2366 2367 2878 2879 2880 3310 3311 3312 3314 3315 3557 3558 3559 - 3314 24576 18 78 194 711 1016 2098 2136 2137 2353 2368 2369 2878 2879 2886 2887 3163 3312 3313 3315 - 3315 24576 18 78 421 2098 2136 2366 2367 2368 2369 2878 2879 2880 2886 2887 2888 3217 3312 3313 3314 - 3316 24576 15 20 185 1905 2364 2365 2723 2724 3136 3317 3321 3322 3487 3559 3560 3561 - 3317 24576 17 20 1019 1798 1955 2099 2724 3136 3316 3318 3321 3322 3323 3487 3488 3560 3561 3562 - 3318 24576 18 1019 1020 1798 1799 1906 1955 1956 3317 3319 3322 3323 3324 3487 3488 3489 3561 3562 3563 - 3319 24576 18 2 715 1020 1021 1799 1906 1956 2732 2985 3318 3320 3323 3324 3325 3489 3562 3563 3564 - 3320 24576 15 2 715 1021 1605 1800 2370 2371 2732 2877 2985 3319 3324 3325 3563 3564 - 3321 24576 16 1905 2100 2365 2366 2372 2373 2880 2881 2882 3136 3316 3317 3322 3559 3560 3561 - 3322 24576 20 24 1798 1955 2099 2100 2372 2373 2374 2881 2882 2883 3136 3316 3317 3318 3321 3323 3560 3561 3562 - 3323 24576 17 1798 1799 1955 2373 2374 2375 2882 2883 2884 3317 3318 3319 3322 3324 3561 3562 3563 - 3324 24576 16 1799 2374 2375 2376 2883 2884 2885 2985 3318 3319 3320 3323 3325 3562 3563 3564 - 3325 24576 17 423 1346 1605 1800 2370 2371 2375 2376 2877 2884 2885 2985 3319 3320 3324 3563 3564 - 3326 32768 15 427 428 722 1026 1028 1038 1340 2378 2379 2558 2559 2727 2728 3415 3486 - 3327 24576 12 1040 1046 1047 1344 1601 2731 2735 2740 2955 3328 3329 3330 - 3328 24576 14 431 1039 1040 1046 1343 1601 1795 2381 2382 2731 3218 3327 3329 3330 - 3329 18432 15 437 729 1040 1047 1344 2390 2735 2740 3327 3328 3330 3331 3332 3565 3566 - 3330 18432 15 437 1040 2221 2381 2382 2383 2893 3218 3327 3328 3329 3331 3332 3565 3566 - 3331 18432 17 86 437 438 729 1040 1049 2384 2385 2390 2735 2894 2895 3329 3330 3332 3565 3566 - 3332 18432 19 86 433 437 1040 1349 2221 2382 2383 2384 2385 2893 2894 2895 3218 3329 3330 3331 3565 3566 - 3333 18432 10 442 734 735 1051 1361 2391 2393 2394 2569 2742 - 3334 32768 11 460 754 758 1075 1383 2399 2400 2402 3336 3338 3678 - 3335 16384 17 433 461 760 1077 1346 2401 2402 2403 2404 2736 2877 3336 3337 3338 3339 3677 3678 - 3336 16384 19 460 461 462 760 1079 1387 1389 2399 2400 2401 2402 2403 2405 3334 3335 3337 3338 3677 3678 - 3337 16384 12 209 433 754 2383 2401 2402 2598 3335 3336 3338 3677 3678 - 3338 16384 19 457 460 754 758 1075 1080 1390 2399 2400 2401 2402 2406 2598 3334 3335 3336 3337 3677 3678 - 3339 24576 18 435 461 725 760 761 1041 1042 1346 1393 1657 2401 2403 2404 2736 2877 2967 3335 3340 - 3340 24576 17 459 467 761 762 764 1078 1388 1393 1657 2403 2407 2408 2967 3339 3341 3654 3679 - 3341 12288 18 468 764 1084 1393 1657 2230 2408 2409 2410 2411 2967 3222 3223 3340 3342 3343 3654 3679 - 3342 9216 10 27 90 468 2140 2409 2410 2411 3341 3343 3679 - 3343 12288 14 27 208 468 470 471 766 1392 2140 2409 2410 2411 3341 3342 3679 - 3344 32768 13 477 767 1059 1064 1394 1641 2232 2412 2413 3224 3225 3429 3655 - 3345 9216 15 93 225 460 463 487 778 1099 1101 1102 1672 2146 2420 2421 2770 3227 - 3346 24576 17 109 154 264 362 500 508 788 2027 2188 2323 2431 2432 3052 3053 3279 3347 3614 - 3347 24576 19 154 258 362 366 368 500 501 510 639 640 788 789 946 1106 2188 2431 2432 2433 3346 - 3348 24576 10 515 1095 1096 2434 2435 2436 2765 2766 3349 3505 - 3349 24576 10 516 776 1096 2435 2436 2437 2765 2766 3348 3505 - 3350 18432 12 105 245 250 271 517 782 805 806 2255 2438 2439 2617 - 3351 13824 10 121 122 273 518 523 2110 2445 2446 3599 3600 - 3352 16384 20 849 1168 1184 1471 1474 2456 2457 2641 2642 2643 2931 3353 3356 3357 3441 3442 3446 3680 3681 3701 - 3353 16384 16 1184 2456 2457 2458 2653 3352 3354 3356 3357 3358 3445 3446 3680 3681 3682 3701 - 3354 16384 21 553 850 1169 1185 1473 1477 1939 2455 2457 2458 2459 2644 2653 2811 3353 3355 3357 3358 3445 3681 3682 - 3355 16384 23 553 828 833 850 1143 1144 1169 1437 1440 1461 1717 1721 2455 2458 2459 2644 2645 2796 2982 3354 3358 3519 3682 - 3356 16384 17 573 832 849 880 1211 1503 2456 2457 2632 2633 2643 3352 3353 3357 3439 3680 3681 - 3357 16384 19 573 832 880 1212 1504 1505 2449 2456 2457 2458 2632 3352 3353 3354 3356 3358 3680 3681 3682 - 3358 16384 23 530 553 833 1148 1212 1214 1440 1504 1505 1506 1508 1702 2449 2455 2457 2458 2459 3353 3354 3355 3357 3681 3682 - 3359 32768 17 856 1167 1178 1456 1457 1460 1468 1469 1725 1870 2463 2464 2641 2642 2805 2809 3360 - 3360 24576 13 556 855 1176 1178 1469 2463 2464 2465 2649 2809 2810 3359 3361 - 3361 24576 12 300 556 557 855 1176 1178 2462 2464 2465 2649 2810 3360 - 3362 24576 15 557 1246 1523 1526 1757 2465 2500 3363 3365 3366 3379 3683 3684 3685 3686 - 3363 24576 20 1246 1247 1526 1528 1757 2466 2467 2492 2500 3362 3364 3365 3366 3367 3373 3529 3683 3684 3685 3686 - 3364 32768 10 1479 1485 2466 2467 2657 3363 3366 3367 3684 3686 - 3365 24576 24 301 326 330 557 560 908 913 1246 1523 1526 2465 2468 2469 2500 3362 3363 3366 3368 3369 3379 3683 3684 3685 3686 - 3366 24576 26 326 330 562 603 913 1246 1247 1526 2466 2467 2468 2469 2470 2492 2500 3362 3363 3364 3365 3367 3368 3369 3683 3684 3685 3686 - 3367 32768 19 562 1479 1485 2043 2466 2467 2469 2470 2651 2657 3085 3363 3364 3366 3369 3444 3447 3684 3686 - 3368 24576 14 859 1183 1475 1476 1746 2468 2469 2480 2650 3365 3366 3369 3685 3686 - 3369 24576 26 128 309 562 574 859 882 1183 1215 1475 1476 1746 2286 2467 2468 2469 2470 2480 2650 2652 3365 3366 3367 3368 3444 3685 3686 - 3370 16384 5 585 1755 2483 2484 3459 - 3371 13824 11 9 322 590 900 2105 2478 2486 2487 2674 3140 3372 - 3372 13824 8 588 2478 2479 2486 2487 2488 3181 3371 - 3373 18432 14 1236 1525 1526 1528 1757 2293 2466 2484 2492 2493 2825 3363 3374 3529 - 3374 18432 16 320 585 595 1236 1525 2293 2484 2491 2492 2493 2494 2676 2825 3373 3459 3529 - 3375 12288 19 597 598 1237 1239 1240 1515 1516 1529 1749 1758 2485 2495 2496 2497 2826 2933 3376 3377 3687 - 3376 18432 15 597 894 1189 1486 2485 2495 2496 2497 3183 3184 3375 3377 3638 3639 3687 - 3377 16384 22 563 597 865 866 903 1188 1237 1249 1250 1482 1532 1731 1759 2495 2496 2497 2501 2657 2826 3375 3376 3687 - 3378 24576 10 857 1243 1530 1754 2298 2462 2498 2499 3264 3379 - 3379 24576 20 301 326 557 599 857 908 1243 1244 1523 1526 1754 2298 2462 2468 2498 2499 2500 3362 3365 3378 - 3380 18432 16 608 873 1198 1251 2303 2474 2475 2502 2503 2680 2681 3185 3186 3187 3188 3266 - 3381 24576 17 133 613 615 909 923 924 1235 1534 2162 2299 2504 2505 2824 2831 2832 3270 3271 - 3382 18432 13 339 621 943 1256 1257 2304 2305 2506 2507 2683 2690 2834 3267 - 3383 18432 12 344 496 622 623 929 2245 2308 2508 2509 2606 2608 2682 - 3384 18432 18 101 238 933 944 1261 1535 1536 1540 1880 1882 1945 2511 2512 2685 2838 2843 3385 3535 - 3385 18432 16 625 932 944 1261 1536 1762 1880 1945 2510 2511 2512 2522 2684 2843 3384 3392 - 3386 12288 13 627 2325 2510 2514 2515 2516 3280 3281 3282 3387 3388 3674 3688 - 3387 9216 11 627 934 2514 2515 2516 2687 3273 3386 3388 3673 3688 - 3388 12288 19 625 626 627 628 629 932 934 935 1262 2510 2514 2515 2516 2684 2687 2840 3386 3387 3688 - 3389 12288 18 150 254 633 634 784 785 786 943 1105 2186 2517 2518 2519 2690 2691 3390 3391 3689 - 3390 18432 19 100 238 473 497 634 785 786 1765 1882 2517 2518 2519 2685 3231 3389 3391 3462 3535 3689 - 3391 12288 15 634 931 943 2319 2517 2518 2519 2683 2686 2690 2691 3389 3390 3462 3689 - 3392 13824 11 32 636 944 2247 2510 2521 2522 2843 3281 3385 3674 - 3393 16384 14 688 1307 1560 1777 1888 2532 2533 2534 2700 3394 3395 3477 3690 3710 - 3394 18432 18 688 986 987 1297 1298 2343 2532 2533 2534 2700 2701 2704 3289 3291 3393 3395 3676 3690 - 3395 12288 12 408 688 694 2345 2532 2533 2534 2543 2701 3393 3394 3690 - 3396 18432 17 647 2048 2535 2536 2849 2850 2854 2939 3397 3398 3399 3541 3580 3581 3691 3692 3727 - 3397 16384 16 1569 1780 1891 1892 1949 2048 2535 2536 2944 3206 3207 3396 3398 3399 3691 3692 - 3398 18432 21 689 1292 1774 2535 2536 2537 2538 2849 2850 2854 2857 2862 2939 3396 3397 3399 3400 3541 3581 3691 3692 - 3399 16384 16 689 1779 1780 1891 1892 1949 2535 2536 2537 2538 3396 3397 3398 3400 3691 3692 - 3400 18432 11 689 1292 1294 2536 2537 2538 2850 2857 3398 3399 3692 - 3401 32768 14 691 1295 1304 1886 1947 1977 2083 2539 2540 2542 2860 2863 3126 3402 - 3402 18432 17 691 693 695 696 994 1885 1886 2082 2539 2540 2541 2542 2543 3126 3401 3403 3404 - 3403 18432 18 690 692 695 985 991 993 994 1303 2539 2544 2545 2696 2698 2863 3402 3404 3468 3470 - 3404 18432 14 692 694 695 696 994 2539 2541 2543 2544 2545 2701 3402 3403 3470 - 3405 24576 16 387 388 410 698 699 986 1559 1561 1562 1776 2336 2347 2546 2547 2699 3289 - 3406 32768 18 412 698 996 1306 1563 1564 1565 1889 1890 2546 2550 2551 2709 2942 3407 3476 3582 3608 - 3407 32768 18 703 1002 1312 1313 1565 1890 2349 2351 2549 2550 2551 2942 3038 3292 3293 3406 3582 3608 - 3408 18432 14 410 718 1026 1332 1587 1785 2347 2552 2553 2556 2725 3411 3414 3695 - 3409 12288 13 716 1024 2358 2359 2554 2555 3410 3412 3413 3549 3693 3694 3721 - 3410 9216 13 2554 2555 2556 3409 3411 3412 3413 3414 3549 3693 3694 3695 3721 - 3411 9216 15 718 1787 1895 2552 2553 2555 2556 3408 3410 3413 3414 3549 3583 3694 3695 - 3412 16384 11 988 2344 2554 2555 2706 3290 3409 3410 3413 3693 3694 - 3413 12288 17 405 701 2342 2344 2347 2554 2555 2556 3290 3409 3410 3411 3412 3414 3693 3694 3695 - 3414 12288 15 405 701 718 2342 2347 2552 2553 2555 2556 3408 3410 3411 3413 3694 3695 - 3415 24576 18 722 1018 1026 1328 1332 1582 1588 1593 1595 1788 2379 2558 2559 2719 2869 2948 3326 3486 - 3416 13824 11 207 428 727 1045 1597 2073 2074 2379 2566 2567 2952 - 3417 24576 11 419 420 713 734 1357 1616 1617 2356 2357 2569 2570 - 3418 13824 17 738 744 2222 2573 2574 2577 2583 3060 3061 3068 3069 3075 3076 3219 3421 3424 3698 - 3419 12288 12 1364 1624 1628 2575 2576 2743 2744 3420 3422 3423 3696 3697 - 3420 9216 14 1628 2223 2575 2576 2577 3219 3419 3421 3422 3423 3424 3696 3697 3698 - 3421 9216 16 211 738 2222 2223 2573 2574 2576 2577 2582 3219 3418 3420 3423 3424 3697 3698 - 3422 12288 17 430 441 1052 2392 2575 2576 2744 3057 3058 3072 3073 3074 3419 3420 3423 3696 3697 - 3423 9216 18 441 741 2392 2575 2576 2577 3058 3059 3073 3074 3419 3420 3421 3422 3424 3696 3697 3698 - 3424 9216 18 738 741 2395 2568 2573 2574 2576 2577 3059 3060 3074 3075 3418 3420 3421 3423 3697 3698 - 3425 32768 13 442 1051 1053 1363 1366 1630 1813 2393 2579 2580 2742 2745 3426 - 3426 32768 14 737 1052 1054 1055 1363 1366 2392 2579 2580 2581 2745 2746 3425 3427 - 3427 32768 14 441 737 739 740 1052 1055 1056 1057 2392 2578 2580 2581 2746 3426 - 3428 32768 11 746 1370 1371 1373 1639 1640 2078 2584 2585 2963 3121 - 3429 12288 17 746 1059 1064 1368 1636 2413 2587 2588 2899 3225 3344 3430 3432 3433 3655 3699 3700 - 3430 12288 18 747 1059 1368 1395 1658 1962 1982 2586 2587 2588 2589 2899 3429 3431 3432 3433 3699 3700 - 3431 18432 16 453 747 748 1065 1374 2586 2588 2589 2590 2592 2748 2897 3430 3433 3435 3700 - 3432 13824 14 746 1064 1374 1642 2585 2587 2588 2747 2897 3429 3430 3433 3699 3700 - 3433 13824 16 747 1065 1374 1642 2586 2587 2588 2589 2748 2897 3429 3430 3431 3432 3699 3700 - 3434 24576 20 426 429 719 720 724 1060 1061 1062 1065 1069 2378 2591 2592 2748 2749 2751 2753 3435 3494 3497 - 3435 24576 17 748 1061 1062 1065 1069 2589 2590 2591 2592 2748 2749 2751 2753 3431 3434 3436 3494 - 3436 24576 15 453 748 750 1069 1070 1071 1375 1377 1644 2590 2592 2593 2594 2753 3435 - 3437 24576 18 209 455 753 754 755 1378 1382 1384 1653 1654 2220 2381 2382 2383 2398 2596 2597 2598 - 3438 24576 17 753 756 757 1072 1379 1380 1668 2398 2597 2599 2600 2601 2755 2907 2973 3498 3568 - 3439 24576 17 529 815 827 832 880 1131 1133 1502 1503 2620 2621 2632 2633 2643 3356 3442 3680 - 3440 24576 21 847 1165 1439 1459 1701 1858 2037 2038 2039 2638 2639 2801 3079 3080 3081 3082 3240 3241 3520 3661 3662 - 3441 24576 20 827 1142 1163 1167 1168 1436 1457 1458 1460 1699 2629 2641 2642 2794 2806 2929 2930 3352 3442 3680 - 3442 24576 16 529 827 849 1167 1168 1460 2629 2641 2642 2643 2806 2930 3352 3439 3441 3680 - 3443 24576 14 91 555 852 853 1174 2142 2144 2145 2461 2647 2648 2808 3166 3167 - 3444 9216 14 859 860 1184 2470 2650 2651 2652 2653 3367 3369 3445 3446 3686 3701 - 3445 12288 14 860 2457 2458 2651 2652 2653 2655 2811 3353 3354 3444 3446 3447 3701 - 3446 12288 18 859 860 882 1184 1505 2285 2286 2456 2457 2650 2651 2652 2653 3352 3353 3444 3445 3701 - 3447 9216 17 860 861 1185 1477 1485 1871 2042 2470 2651 2653 2654 2655 2811 3085 3086 3367 3445 - 3448 24576 12 2070 2072 2474 2475 2659 2660 3120 3449 3453 3455 3703 3705 - 3449 24576 14 565 867 1192 2475 2658 2659 2660 2662 3448 3451 3453 3455 3703 3705 - 3450 18432 17 1199 1737 1738 1873 2661 2662 3237 3238 3244 3245 3451 3454 3455 3523 3704 3705 3716 - 3451 18432 20 867 1199 1204 1205 1737 1738 1873 2658 2660 2661 2662 3256 3449 3450 3454 3455 3523 3704 3705 3716 - 3452 12288 15 554 851 1193 1733 3119 3120 3236 3243 3453 3454 3455 3702 3703 3704 3705 - 3453 12288 15 1193 2072 2659 2660 3119 3120 3448 3449 3452 3454 3455 3702 3703 3704 3705 - 3454 12288 19 871 1193 1194 1733 2661 2662 3236 3237 3243 3244 3450 3451 3452 3453 3455 3702 3703 3704 3705 - 3455 12288 20 867 871 1193 1194 2658 2659 2660 2661 2662 3448 3449 3450 3451 3452 3453 3454 3702 3703 3704 3705 - 3456 13824 11 554 883 1511 1734 2269 2460 2665 2666 2821 3250 3528 - 3457 9216 17 297 532 577 884 885 886 1151 1152 1161 1217 2450 2667 2668 2797 2823 3251 3252 - 3458 32768 9 891 1225 1513 1514 2669 2670 3173 3262 3669 - 3459 24576 17 585 595 902 1235 1236 1524 1525 1755 2483 2484 2491 2493 2675 2676 2824 3370 3374 - 3460 18432 16 606 915 916 1191 1198 1251 1486 2473 2474 2680 2681 3183 3184 3185 3186 3461 - 3461 18432 15 333 606 607 916 917 2165 2166 2679 2680 2681 3183 3184 3185 3186 3460 - 3462 24576 16 473 931 933 1105 1260 1535 1760 1879 2519 2685 2686 2837 2838 3390 3391 3689 - 3463 18432 15 626 896 934 935 1230 1263 1521 2513 2672 2687 2688 2840 3174 3175 3534 - 3464 18432 14 985 1293 1551 2695 2696 2698 2853 2856 2861 3466 3468 3470 3546 3707 - 3465 13824 17 1294 1299 1300 1774 2697 2698 2854 2855 2856 2857 2862 2940 3466 3467 3468 3706 3707 - 3466 13824 19 985 1293 1299 2695 2696 2697 2698 2855 2856 2862 2940 2941 3464 3465 3467 3468 3474 3706 3707 - 3467 12288 20 990 992 1294 1303 1305 2697 2698 2708 2857 2858 2859 2860 2863 2864 3465 3466 3468 3547 3706 3707 - 3468 12288 22 985 992 1295 1303 1305 2539 2544 2695 2696 2697 2698 2859 2860 2863 2864 3403 3464 3465 3466 3467 3706 3707 - 3469 24576 11 986 1297 1554 1773 1884 1887 1946 1948 2699 2700 3002 - 3470 18432 13 985 987 1298 2544 2545 2695 2696 2701 2702 2861 3403 3404 3464 - 3471 12288 18 988 989 1297 1301 1554 1557 1772 1775 2703 2704 2706 2707 2936 3290 3473 3475 3676 3709 - 3472 16384 19 376 382 665 1023 1555 2198 2527 2705 2706 2937 2938 3296 3297 3473 3474 3475 3579 3708 3709 - 3473 16384 18 382 665 988 1023 2358 2527 2703 2704 2705 2706 3297 3471 3472 3474 3475 3693 3708 3709 - 3474 18432 22 1293 1299 1553 1555 1556 1771 2695 2705 2706 2852 2856 2861 2938 2940 2941 3466 3472 3473 3475 3543 3708 3709 - 3475 18432 22 988 1293 1296 1297 1298 1553 1556 1771 2695 2703 2704 2705 2706 2852 2861 2941 3471 3472 3473 3474 3708 3709 - 3476 24576 10 997 1560 2709 2710 2711 3406 3477 3478 3582 3710 - 3477 12288 17 412 688 698 997 1307 1560 2348 2532 2533 2547 2709 2710 2711 3393 3476 3478 3710 - 3478 16384 17 408 688 697 700 997 998 1309 2345 2533 2548 2709 2710 2711 2865 3476 3477 3710 - 3479 24576 16 175 1577 1578 1781 1783 1784 2204 2205 2530 2531 2717 2718 2866 2945 3209 3480 - 3480 24576 20 175 177 661 674 1013 1014 1577 1781 1783 1784 2204 2530 2531 2716 2717 2718 2866 2945 3048 3479 - 3481 18432 14 1017 1035 1329 1338 1583 1584 1593 2719 2720 2869 2949 3004 3552 3722 - 3482 18432 14 389 390 1329 1585 1792 1899 1953 2361 2362 3483 3484 3485 3722 3723 - 3483 18432 13 390 1329 1585 1792 1953 2720 2721 2722 3482 3484 3485 3722 3723 - 3484 18432 14 74 182 183 389 390 2362 2363 2723 2724 3482 3483 3485 3554 3723 - 3485 18432 13 74 183 390 1019 2721 2722 2723 2724 3482 3483 3484 3554 3723 - 3486 13824 11 1026 1028 1589 1590 1591 2559 2725 2727 2728 3326 3415 - 3487 18432 14 1019 1342 1798 1955 2724 2733 2734 2873 2876 3316 3317 3318 3488 3554 - 3488 13824 16 1019 1020 1342 1344 1603 1798 1906 1955 2733 2734 2735 2873 3317 3318 3487 3489 - 3489 13824 15 715 1020 1040 1344 1603 1906 1908 1956 2732 2734 2735 3318 3319 3488 3565 - 3490 16384 16 433 434 1042 1349 1611 2384 2385 2386 2736 2737 2884 2885 2894 2895 3563 3564 - 3491 18432 12 726 1047 1342 1344 1353 2733 2734 2735 2740 2741 2875 2954 - 3492 32768 17 23 79 194 195 1619 1620 1810 2085 2098 2368 2369 2743 2744 3064 3065 3128 3493 - 3493 32768 23 1052 1362 1619 1620 1622 1623 2075 2076 2077 2085 2086 2380 2743 2744 2745 3056 3057 3064 3065 3071 3072 3128 3492 - 3494 24576 22 426 429 719 720 721 724 1060 1062 1065 1374 1643 2378 2591 2592 2748 2749 2897 2965 2966 3434 3435 3587 - 3495 12288 12 1060 1061 1066 1369 1375 1645 2750 2751 2752 3496 3497 3711 - 3496 13824 12 428 727 1066 1597 1822 2566 2750 2751 2752 3495 3497 3711 - 3497 12288 18 207 428 724 1060 1061 1066 1597 2378 2566 2750 2751 2752 2753 2754 3434 3495 3496 3711 - 3498 9216 16 749 752 756 1070 1073 1379 2595 2599 2601 2755 2756 2757 3438 3499 3500 3712 - 3499 9216 16 753 1073 1378 1379 1380 1381 1650 1825 2596 2755 2756 2757 2898 3498 3500 3712 - 3500 9216 9 749 752 1073 2755 2756 2757 3498 3499 3712 - 3501 9216 14 1088 1091 1407 2049 2052 2759 2760 2761 2908 3091 3102 3502 3503 3713 - 3502 9216 11 1091 1400 2759 2760 2761 2901 2904 2972 3501 3503 3713 - 3503 9216 13 1091 1400 2052 2053 2759 2760 2761 2901 3102 3105 3501 3502 3713 - 3504 24576 10 775 1092 1093 1094 1403 1405 1669 2762 2763 2905 - 3505 9216 11 1095 1096 2434 2765 2766 2767 3348 3349 3506 3507 3714 - 3506 12288 12 776 1092 1096 1402 2603 2765 2766 2767 2904 3505 3507 3714 - 3507 12288 12 1091 1095 1096 1402 1407 2765 2766 2767 2904 3505 3506 3714 - 3508 13824 12 460 464 465 778 1099 1100 1101 1411 2400 2768 2769 2770 - 3509 16384 15 115 522 807 808 1118 1417 2441 2442 2444 2774 2775 3031 3510 3605 3606 - 3510 16384 11 808 1121 1417 2442 2443 2774 2775 2776 3031 3509 3597 - 3511 16384 11 1122 2088 2777 2778 2779 3131 3132 3512 3513 3630 3715 - 3512 18432 14 1122 1123 1685 1848 2777 2778 2779 2780 2781 2979 3511 3513 3514 3715 - 3513 12288 15 1122 1123 1965 2777 2778 2779 2780 2781 3009 3511 3512 3514 3570 3715 3724 - 3514 12288 11 812 1123 1124 2618 2779 2780 2781 2782 3512 3513 3715 - 3515 24576 7 1680 1926 2783 2784 2920 3516 3575 - 3516 24576 13 1125 1126 1422 1423 1839 2783 2784 2785 2919 2920 2921 3515 3575 - 3517 24576 6 1128 1129 1973 2786 2787 2788 - 3518 24576 19 827 1122 1131 1142 1420 1684 1685 1696 1698 1848 1856 1918 1984 2091 2629 2779 2789 2790 2794 - 3519 24576 13 846 1143 1145 1437 1461 1717 2637 2644 2795 2796 2982 3355 3682 - 3520 32768 15 847 1164 1439 1701 1858 2037 2102 2104 2638 2639 2801 2802 3079 3137 3440 - 3521 24576 8 1167 1460 1716 2628 2629 2805 2806 2930 - 3522 18432 17 847 1164 1200 1492 1493 1494 1739 1740 1874 1940 2638 2801 2812 2813 2932 3240 3241 - 3523 16384 18 871 1196 1199 1205 1738 2661 2662 2817 2818 3256 3257 3450 3451 3524 3526 3527 3716 3717 - 3524 16384 15 1202 1739 2816 2817 2818 2819 3256 3257 3258 3523 3525 3526 3527 3716 3717 - 3525 18432 21 875 1200 1202 1203 1493 1739 1743 1976 2273 2274 2813 2816 2818 2819 3240 3241 3247 3248 3524 3527 3717 - 3526 18432 16 581 871 1512 2271 2272 2287 2289 2817 2818 3245 3246 3523 3524 3527 3716 3717 - 3527 18432 18 581 582 1202 1512 2272 2273 2816 2817 2818 2819 3246 3247 3523 3524 3525 3526 3716 3717 - 3528 24576 18 531 547 554 830 883 1171 1216 1442 1443 2269 2460 2631 2665 2666 2821 2822 3250 3456 - 3529 24576 16 903 1237 1238 1528 1731 1749 2293 2466 2492 2493 2825 2826 2933 3363 3373 3374 - 3530 13824 9 922 1254 1256 1257 2426 2427 2833 2834 3267 - 3531 18432 13 585 930 1258 1259 2306 2307 2483 2491 2675 2835 2836 3268 3269 - 3532 32768 17 349 595 596 930 1227 1259 1518 1535 1760 1878 1942 2316 2491 2494 2837 2838 3533 - 3533 32768 17 596 893 904 1227 1261 1518 1535 1760 1878 1942 2494 2677 2837 2838 2839 2983 3532 - 3534 18432 14 586 896 905 935 1229 1262 1263 1761 2687 2839 2840 2841 3174 3463 - 3535 18432 19 32 101 238 497 634 944 1268 1540 1765 1882 2247 2517 2519 2685 2842 2843 3231 3384 3390 - 3536 18432 8 958 1279 2524 2525 2845 2846 2847 3537 - 3537 18432 11 651 958 1278 1545 1546 2524 2525 2844 2845 2846 3536 - 3538 32768 7 2849 2850 2854 3539 3541 3544 3718 - 3539 32768 11 1292 2849 2850 2851 2854 2857 3538 3541 3544 3547 3718 - 3540 24576 10 1293 1552 1769 1770 2852 2853 2856 3543 3546 3720 - 3541 32768 17 2849 2850 2854 2855 3396 3398 3538 3539 3542 3544 3545 3581 3691 3692 3718 3719 3727 - 3542 24576 16 376 2854 2855 2856 2938 3541 3543 3544 3545 3546 3579 3581 3718 3719 3720 3727 - 3543 24576 19 376 1293 2526 2852 2853 2855 2856 2938 3474 3540 3542 3545 3546 3579 3581 3708 3719 3720 3727 - 3544 16384 13 2854 2855 2857 2935 3538 3539 3541 3542 3545 3547 3706 3718 3719 - 3545 12288 16 2854 2855 2856 2857 2935 3541 3542 3543 3544 3546 3547 3706 3707 3718 3719 3720 - 3546 12288 16 1293 1551 2852 2853 2855 2856 2935 3464 3540 3542 3543 3545 3706 3707 3719 3720 - 3547 24576 12 1294 2851 2854 2855 2857 2858 2935 3467 3539 3544 3545 3706 - 3548 24576 10 656 1322 1781 1782 1978 2204 2866 2867 2984 3209 - 3549 32768 21 1327 1336 1583 1584 1594 1895 2554 2555 2556 2870 2871 2872 2947 2949 3409 3410 3411 3550 3551 3583 3721 - 3550 24576 18 425 1327 1336 1585 1898 1899 1900 1952 1953 2360 2361 2870 2871 2872 2947 3549 3551 3721 - 3551 16384 10 1036 1336 2554 2555 2870 2871 2872 3549 3550 3721 - 3552 12288 15 1035 1338 1598 2720 2721 2874 2875 2950 3004 3481 3553 3555 3556 3722 3723 - 3553 12288 17 1342 1598 2721 2722 2873 2874 2875 2876 2950 2954 3004 3552 3554 3555 3556 3722 3723 - 3554 18432 15 1019 1342 2722 2723 2724 2733 2873 2875 2876 3484 3485 3487 3553 3556 3723 - 3555 16384 12 1044 1336 1596 2739 2870 2874 2875 3552 3553 3556 3722 3723 - 3556 16384 18 726 1044 1342 1353 1596 2565 2739 2873 2874 2875 2876 2896 3552 3553 3554 3555 3722 3723 - 3557 24576 19 711 1014 1015 1016 1326 1903 1957 1959 1980 1981 2868 2878 2879 3014 3310 3311 3312 3313 3558 - 3558 24576 17 1903 1954 1957 1958 1959 2365 2366 2878 2879 2880 3310 3311 3312 3313 3557 3559 3584 - 3559 24576 20 1607 1797 1904 1905 1954 1958 2365 2366 2372 2879 2880 2881 3311 3313 3316 3321 3558 3560 3584 3585 - 3560 24576 17 1905 2365 2366 2372 2373 2880 2881 2882 3316 3317 3321 3322 3559 3561 3584 3585 3586 - 3561 24576 20 1608 1798 1907 1955 2372 2373 2374 2881 2882 2883 2956 3316 3317 3318 3321 3322 3323 3560 3562 3586 - 3562 24576 19 1798 1799 1907 1955 2373 2374 2375 2882 2883 2884 2956 3317 3318 3319 3322 3323 3324 3561 3563 - 3563 24576 20 1611 1799 2374 2375 2376 2883 2884 2885 2894 2895 2985 3318 3319 3320 3323 3324 3325 3490 3562 3564 - 3564 24576 22 423 1346 1349 1605 1800 2370 2371 2375 2376 2736 2877 2884 2885 2894 2895 2985 3319 3320 3324 3325 3490 3563 - 3565 9216 15 1040 1908 2384 2385 2732 2735 2894 2895 2985 3329 3330 3331 3332 3489 3566 - 3566 9216 18 433 1040 1349 1800 2382 2383 2384 2385 2732 2893 2894 2895 2985 3329 3330 3331 3332 3565 - 3567 32768 15 1399 1400 1401 1664 1667 1829 1963 1964 1983 2900 2902 2903 2970 2972 2992 - 3568 32768 13 756 1401 1404 1666 1668 2599 2601 2902 2906 2907 2971 2973 3438 - 3569 18432 11 775 776 1094 1406 1408 1830 2603 2762 2909 2910 2974 - 3570 32768 21 812 1123 1124 1131 1133 1833 1918 1965 2620 2779 2781 2790 2916 2917 2994 3513 3571 3573 3574 3724 3725 - 3571 32768 21 1131 1133 1421 1676 1833 1918 1965 2620 2621 2915 2916 2917 2918 2975 2994 3570 3572 3573 3574 3724 3725 - 3572 16384 13 1421 1676 1969 1991 1993 2915 2917 2918 2975 3012 3571 3574 3725 - 3573 16384 10 293 812 1124 2916 2917 3570 3571 3574 3724 3725 - 3574 16384 12 293 1421 2915 2916 2917 2918 3570 3571 3572 3573 3724 3725 - 3575 18432 11 1423 1680 1681 1683 1844 2920 2921 2978 3515 3516 3578 - 3576 32768 20 823 1140 1424 1433 1680 1694 1841 1842 1927 1928 2619 2627 2793 2922 2923 2924 3008 3577 3578 3726 - 3577 16384 13 814 1129 1130 1424 1928 2788 2922 2923 2924 3008 3576 3578 3726 - 3578 16384 14 1424 1426 1680 1841 1844 2920 2922 2923 2924 2978 3575 3576 3577 3726 - 3579 9216 12 376 1555 2937 2938 2939 3472 3542 3543 3580 3581 3708 3727 - 3580 12288 16 376 647 1555 1569 1570 1892 2535 2937 2938 2939 3207 3208 3396 3579 3581 3727 - 3581 12288 19 1299 1555 2535 2536 2854 2855 2856 2862 2937 2938 2939 3396 3398 3541 3542 3543 3579 3580 3727 - 3582 24576 19 412 698 702 996 997 1001 1311 1314 1566 1778 1889 1890 2709 2710 2942 2943 3406 3407 3476 - 3583 18432 15 718 1583 1593 1594 1787 1788 1895 2552 2556 2869 2946 2948 2949 3411 3549 - 3584 16384 11 1607 1958 2879 2880 2881 2957 2958 3558 3559 3560 3585 - 3585 12288 12 1355 1615 1806 2880 2881 2957 2958 2959 3559 3560 3584 3586 - 3586 12288 16 730 1354 1355 1356 1608 1609 1615 1806 2881 2882 2956 2958 2959 3560 3561 3585 - 3587 18432 20 720 721 1028 1029 1031 1034 1333 1643 2009 2010 2013 2557 2749 2965 2966 2991 3036 3042 3494 3592 - 3588 24576 15 453 747 1395 1396 1399 1658 1660 1664 1665 1827 1828 2586 2900 2969 2970 - 3589 9216 15 1154 1677 1704 1705 1835 1836 1921 2635 2976 2977 2996 2998 2999 3006 3595 - 3590 18432 8 1710 1713 1864 1865 1935 2926 2980 2981 - 3591 24576 9 392 703 1002 1313 1814 2549 2987 2988 3038 - 3592 13824 17 415 1643 1821 2009 2010 2011 2013 2078 2079 2351 2965 2966 2990 2991 3122 3124 3587 - 3593 12288 14 818 1136 1430 1836 1850 1988 2622 2997 2998 2999 3016 3594 3595 3728 - 3594 16384 9 1836 1922 1989 2997 2998 2999 3593 3595 3728 - 3595 18432 18 1677 1835 1836 1921 1988 1995 2976 2977 2996 2997 2998 2999 3006 3016 3589 3593 3594 3728 - 3596 13824 12 57 58 59 165 370 2000 2194 2330 2331 3018 3019 3284 - 3597 24576 18 515 803 1121 1417 1418 1674 2003 2014 2435 2775 2776 2913 3020 3021 3031 3045 3510 3598 - 3598 24576 19 121 122 279 515 809 1119 1121 1418 2005 2258 2435 2436 2776 2913 3020 3021 3022 3597 3599 - 3599 24576 17 121 122 279 516 518 809 1119 2005 2258 2436 2445 3021 3022 3023 3351 3598 3600 - 3600 24576 18 121 122 273 274 516 518 523 804 2005 2445 2446 2614 3022 3023 3024 3351 3599 3601 - 3601 24576 17 273 274 281 523 804 2016 2257 2446 2614 2615 3023 3024 3025 3046 3600 3602 3613 - 3602 24576 15 274 276 805 2017 2257 2614 2615 3024 3025 3026 3046 3047 3601 3603 3613 - 3603 24576 16 117 276 277 282 805 2017 2255 2257 2259 2615 3025 3026 3027 3047 3602 3604 - 3604 24576 17 38 117 118 271 277 278 282 283 284 2002 2004 2255 2259 3026 3027 3028 3603 - 3605 9216 15 115 270 522 807 2444 2612 2774 3029 3030 3043 3044 3509 3606 3611 3612 - 3606 9216 19 115 270 522 807 1417 1674 2003 2444 2612 2774 3029 3030 3031 3043 3044 3509 3605 3611 3612 - 3607 24576 20 58 59 102 103 147 167 348 370 475 630 641 938 948 1541 2006 2097 2185 2330 3032 3033 - 3608 18432 16 72 393 1002 1312 1564 1565 2012 2337 2550 2551 3038 3039 3406 3407 3609 3610 - 3609 24576 17 202 410 412 698 1567 1587 1590 1894 2546 2550 2551 2725 3039 3041 3042 3608 3610 - 3610 24576 19 422 703 1027 1568 1590 1786 2012 2013 2351 2550 2551 2726 3038 3039 3040 3041 3042 3608 3609 - 3611 12288 15 268 270 807 2001 2021 2253 2612 3029 3030 3043 3044 3049 3605 3606 3612 - 3612 12288 20 268 270 803 807 1674 2001 2003 2014 2021 2612 3029 3030 3031 3043 3044 3045 3049 3605 3606 3611 - 3613 16384 12 281 2016 2017 2111 2112 2257 3024 3025 3046 3047 3601 3602 - 3614 12288 18 109 256 264 356 359 498 507 508 2025 2026 2027 2329 2430 2431 3052 3053 3279 3346 - 3615 6144 15 239 1661 2232 2234 2587 2588 2899 2968 3093 3094 3096 3225 3616 3618 3619 - 3616 6144 21 239 770 1086 1659 1661 2232 2234 2236 2899 2968 3093 3094 3095 3096 3097 3225 3615 3617 3618 3619 3620 - 3617 6144 20 240 242 770 1086 1397 1659 1662 2050 2147 2235 2236 3092 3094 3095 3097 3098 3099 3616 3619 3620 - 3618 12288 13 747 2587 2588 3093 3094 3096 3100 3101 3104 3615 3616 3619 3621 - 3619 12288 17 3093 3094 3095 3096 3097 3100 3101 3102 3104 3105 3615 3616 3617 3618 3620 3621 3622 - 3620 12288 19 2050 2052 2053 3092 3094 3095 3097 3098 3099 3101 3102 3103 3104 3105 3616 3617 3619 3621 3622 - 3621 6144 11 3096 3097 3100 3101 3102 3104 3105 3618 3619 3620 3622 - 3622 6144 13 2052 2053 3097 3098 3099 3101 3102 3103 3104 3105 3619 3620 3621 - 3623 18432 11 228 491 1412 2055 2056 2057 2425 3106 3107 3108 3221 - 3624 12288 9 858 2070 3115 3116 3117 3119 3120 3625 3626 - 3625 18432 14 1172 1182 1186 1488 1732 2645 2646 2656 3109 3116 3119 3120 3624 3626 - 3626 18432 19 858 1186 1480 1488 1732 2059 2070 2072 2471 2472 2656 3109 3115 3116 3118 3119 3120 3624 3625 - 3627 18432 14 203 204 414 1370 1371 1819 2078 2080 2352 3121 3122 3123 3293 3628 - 3628 12288 15 414 415 1631 2078 2079 2349 2351 2352 2962 3121 3122 3123 3124 3293 3627 - 3629 6144 17 417 1358 1359 1619 1620 2076 2085 2086 2087 2353 2355 2960 2961 3128 3129 3130 3295 - 3630 6144 7 2088 2089 2777 3131 3132 3133 3511 - 3631 18432 18 336 2175 2282 2283 2284 3146 3147 3150 3151 3191 3193 3195 3259 3260 3261 3632 3634 3635 - 3632 13824 18 2172 2283 2284 3146 3147 3148 3150 3151 3152 3193 3195 3260 3261 3631 3633 3634 3635 3636 - 3633 13824 21 305 306 572 588 2117 2118 2172 2281 2284 2488 3147 3148 3149 3151 3152 3153 3195 3261 3632 3635 3636 - 3634 18432 20 140 337 2119 2120 2175 2282 2283 2284 3146 3147 3150 3151 3154 3155 3259 3260 3261 3631 3632 3635 - 3635 13824 21 2119 2120 2121 2283 2284 3146 3147 3148 3150 3151 3152 3154 3155 3156 3260 3261 3631 3632 3633 3634 3636 - 3636 13824 24 46 127 305 306 572 2117 2118 2120 2121 2122 2281 2284 3147 3148 3149 3151 3152 3153 3155 3156 3261 3632 3633 3635 - 3637 18432 17 52 159 162 265 367 502 503 799 1112 1113 2125 2126 2127 2192 3157 3158 3159 - 3638 24576 14 597 894 1486 1487 2495 2497 3183 3184 3185 3186 3376 3639 3640 3641 - 3639 24576 19 597 598 894 906 1229 2165 2166 2495 2497 3174 3175 3183 3184 3185 3186 3376 3638 3640 3641 - 3640 24576 12 1487 3183 3184 3185 3186 3187 3188 3638 3639 3641 3642 3643 - 3641 24576 18 2165 2166 2167 2672 3174 3175 3176 3183 3184 3185 3186 3187 3188 3638 3639 3640 3642 3643 - 3642 24576 13 895 2671 3185 3186 3187 3188 3189 3190 3640 3641 3643 3644 3645 - 3643 24576 21 895 2166 2167 2168 2671 2672 2673 3175 3176 3177 3185 3186 3187 3188 3189 3190 3640 3641 3642 3644 3645 - 3644 24576 15 895 1500 1745 2671 3187 3188 3189 3190 3191 3192 3642 3643 3645 3646 3647 - 3645 24576 22 895 897 2167 2168 2169 2294 2671 2673 3176 3177 3178 3187 3188 3189 3190 3191 3192 3642 3643 3644 3646 3647 - 3646 24576 17 1210 1500 1501 1745 1875 2664 3189 3190 3191 3192 3193 3194 3644 3645 3647 3648 3649 - 3647 24576 20 321 587 2168 2169 2170 2294 3177 3178 3179 3189 3190 3191 3192 3193 3194 3644 3645 3646 3648 3649 - 3648 18432 14 1210 1501 2664 3191 3192 3193 3194 3195 3196 3646 3647 3649 3650 3651 - 3649 18432 19 321 587 2169 2170 2171 3178 3179 3180 3191 3192 3193 3194 3195 3196 3646 3647 3648 3650 3651 - 3650 18432 13 878 2172 2173 2664 3181 3182 3193 3194 3195 3196 3648 3649 3651 - 3651 18432 18 134 591 2164 2170 2171 2172 2173 3179 3180 3181 3182 3193 3194 3195 3196 3648 3649 3650 - 3652 24576 15 33 102 159 168 259 475 504 2193 2195 2196 2197 3032 3203 3204 3205 - 3653 32768 10 192 674 2208 2209 2213 2214 2215 3214 3215 3216 - 3654 24576 21 229 461 462 467 1078 1083 1388 1393 2228 2229 2230 2403 2405 2407 2408 2410 3221 3222 3223 3340 3341 - 3655 24576 23 239 477 478 746 767 1064 1085 1373 1394 1641 2232 2233 2234 2412 2413 2414 2584 2587 3224 3225 3226 3344 3429 - 3656 24576 17 244 247 248 489 493 781 1103 2149 2237 2239 2241 2242 2243 2423 3228 3229 3230 - 3657 24576 11 851 1170 1718 1719 3236 3237 3243 3244 3658 3663 3664 - 3658 24576 11 3236 3237 3238 3243 3244 3245 3657 3659 3663 3664 3665 - 3659 24576 11 3237 3238 3239 3244 3245 3246 3658 3660 3664 3665 3666 - 3660 24576 15 1715 1866 2260 3081 3238 3239 3240 3245 3246 3247 3659 3661 3665 3666 3667 - 3661 24576 22 1165 1459 1715 1866 2260 2261 2262 2638 3081 3082 3239 3240 3241 3246 3247 3248 3440 3660 3662 3666 3667 3668 - 3662 24576 20 286 847 2039 2261 2262 2267 2268 2638 2639 3082 3240 3241 3242 3247 3248 3249 3440 3661 3667 3668 - 3663 24576 17 554 851 1170 1718 2269 2270 2460 2631 3236 3237 3243 3244 3250 3251 3657 3658 3664 - 3664 24576 20 2269 2270 2271 2448 2450 2797 3236 3237 3238 3243 3244 3245 3250 3251 3252 3657 3658 3659 3663 3665 - 3665 24576 22 528 533 2270 2271 2272 2448 2450 2797 3237 3238 3239 3244 3245 3246 3251 3252 3253 3658 3659 3660 3664 3666 - 3666 24576 22 528 533 2260 2265 2271 2272 2273 2450 3238 3239 3240 3245 3246 3247 3252 3253 3254 3659 3660 3661 3665 3667 - 3667 24576 23 535 835 2260 2261 2262 2265 2272 2273 2274 3239 3240 3241 3246 3247 3248 3253 3254 3255 3660 3661 3662 3666 3668 - 3668 24576 24 286 291 292 299 535 835 2261 2262 2267 2268 2273 2274 2275 3240 3241 3242 3247 3248 3249 3254 3255 3661 3662 3667 - 3669 18432 16 325 555 854 1179 1180 1225 1513 2296 2297 2298 2462 2670 3262 3263 3264 3458 - 3670 24576 16 584 891 1226 2162 2306 2307 2483 2824 2831 2832 2934 3268 3269 3270 3271 3671 - 3671 24576 16 339 1254 1533 2304 2305 2306 2307 2831 2832 2934 3267 3268 3269 3270 3271 3670 - 3672 18432 18 626 898 934 1231 1232 2314 2315 2513 2672 2673 2688 3176 3177 3274 3275 3276 3277 3673 - 3673 18432 19 347 626 627 629 934 936 2312 2313 2314 2315 2514 2516 3273 3274 3275 3276 3277 3387 3672 - 3674 18432 14 357 636 2323 2324 2325 2510 2515 2521 2522 3279 3280 3281 3386 3392 - 3675 18432 15 394 395 677 977 978 979 980 1291 2338 2339 2340 2341 3286 3287 3288 - 3676 18432 20 405 986 988 989 1297 1298 1554 2342 2343 2344 2532 2699 2703 2704 2707 3289 3290 3291 3394 3471 - 3677 32768 21 433 754 1077 1349 1382 1605 1651 1652 2383 2401 2402 2598 2736 2758 2877 2893 3335 3336 3337 3338 3678 - 3678 32768 17 460 754 758 1075 1383 1652 2399 2400 2401 2402 2598 3334 3335 3336 3337 3338 3677 - 3679 18432 19 27 208 468 764 1082 1392 1393 1657 2033 2140 2408 2409 2410 2411 2967 3340 3341 3342 3343 - 3680 32768 17 827 849 1168 2456 2457 2632 2641 2642 2643 3352 3353 3356 3357 3439 3441 3442 3681 - 3681 32768 12 2456 2457 2458 2632 3352 3353 3354 3356 3357 3358 3680 3682 - 3682 32768 24 553 828 833 850 1143 1144 1169 1437 1440 1461 1702 2455 2457 2458 2459 2644 2796 3353 3354 3355 3357 3358 3519 3681 - 3683 32768 12 557 1181 1472 2464 2465 3362 3363 3365 3366 3684 3685 3686 - 3684 32768 12 1181 2466 2467 3362 3363 3364 3365 3366 3367 3683 3685 3686 - 3685 32768 20 557 558 560 1181 1475 1476 2464 2465 2468 2469 2650 3362 3363 3365 3366 3368 3369 3683 3684 3686 - 3686 32768 22 562 1181 1475 1476 2466 2467 2468 2469 2470 2650 3362 3363 3364 3365 3366 3367 3368 3369 3444 3683 3684 3685 - 3687 24576 18 597 903 1237 1482 1515 1516 1731 1749 1876 2485 2495 2496 2497 2826 2933 3375 3376 3377 - 3688 18432 12 627 934 2510 2514 2515 2516 2684 2687 2840 3386 3387 3388 - 3689 18432 18 473 634 785 786 931 943 1105 1260 2517 2518 2519 2683 2690 2691 3389 3390 3391 3462 - 3690 24576 11 688 1297 1298 2532 2533 2534 2700 2701 3393 3394 3395 - 3691 24576 13 951 2048 2535 2536 2849 2850 2854 3396 3397 3398 3399 3541 3692 - 3692 24576 17 689 1292 2535 2536 2537 2538 2849 2850 2854 2857 3396 3397 3398 3399 3400 3541 3691 - 3693 24576 17 988 989 1023 1024 2358 2359 2554 2555 2703 2706 3290 3409 3410 3412 3413 3473 3694 - 3694 18432 15 989 2342 2347 2554 2555 2556 3290 3409 3410 3411 3412 3413 3414 3693 3695 - 3695 18432 13 718 2342 2347 2552 2553 2555 2556 3408 3410 3411 3413 3414 3694 - 3696 18432 21 1364 1624 1626 1628 2575 2576 2743 2744 3057 3058 3065 3066 3067 3072 3073 3074 3419 3420 3422 3423 3697 - 3697 13824 20 1626 1628 2575 2576 2577 3058 3059 3066 3067 3073 3074 3219 3419 3420 3421 3422 3423 3424 3696 3698 - 3698 13824 19 738 2222 2573 2574 2576 2577 3059 3060 3067 3068 3074 3075 3219 3418 3420 3421 3423 3424 3697 - 3699 18432 19 746 1059 1064 1368 1374 1636 1637 1642 2585 2587 2588 2747 2897 2964 3429 3430 3432 3433 3700 - 3700 18432 20 747 1059 1065 1368 1374 1637 1642 2586 2587 2588 2589 2748 2897 2964 3429 3430 3431 3432 3433 3699 - 3701 18432 14 859 860 1184 2456 2457 2650 2651 2652 2653 3352 3353 3444 3445 3446 - 3702 24576 13 851 3116 3119 3120 3236 3243 3452 3453 3454 3455 3703 3704 3705 - 3703 24576 16 2070 2072 2659 2660 3116 3119 3120 3448 3449 3452 3453 3454 3455 3702 3704 3705 - 3704 24576 15 2661 2662 3236 3237 3243 3244 3450 3451 3452 3453 3454 3455 3702 3703 3705 - 3705 24576 17 867 2658 2659 2660 2661 2662 3448 3449 3450 3451 3452 3453 3454 3455 3702 3703 3704 - 3706 18432 18 1294 2697 2698 2854 2855 2856 2857 2858 2935 3465 3466 3467 3468 3544 3545 3546 3547 3707 - 3707 18432 19 985 1293 1551 2695 2696 2697 2698 2853 2855 2856 2935 3464 3465 3466 3467 3468 3545 3546 3706 - 3708 24576 25 376 382 662 665 1293 1553 1555 1769 1771 2526 2527 2705 2706 2852 2856 2936 2937 2938 3472 3473 3474 3475 3543 3579 3709 - 3709 24576 26 382 662 665 988 1293 1296 1297 1553 1554 1769 1771 1772 2526 2527 2703 2704 2705 2706 2852 2936 3471 3472 3473 3474 3475 3708 - 3710 24576 13 688 997 1307 1560 2532 2533 2709 2710 2711 3393 3476 3477 3478 - 3711 18432 16 428 1060 1061 1066 1369 1597 1638 1818 2378 2566 2750 2751 2752 3495 3496 3497 - 3712 13824 16 749 752 1070 1073 1379 1650 1825 2595 2754 2755 2756 2757 2898 3498 3499 3500 - 3713 13824 15 1088 1091 1400 2049 2052 2759 2760 2761 2901 3090 3091 3102 3501 3502 3503 - 3714 18432 13 1091 1095 1096 1402 1407 2759 2765 2766 2767 2904 3505 3506 3507 - 3715 18432 11 1122 1123 2777 2778 2779 2780 2781 3511 3512 3513 3514 - 3716 24576 21 871 1199 1491 1738 2271 2272 2661 2662 2817 2818 3238 3239 3245 3246 3450 3451 3523 3524 3526 3527 3717 - 3717 24576 19 1202 1491 1739 2272 2273 2816 2817 2818 2819 3239 3240 3246 3247 3523 3524 3525 3526 3527 3716 - 3718 32768 9 2854 2855 3538 3539 3541 3542 3544 3545 3719 - 3719 24576 11 2854 2855 2856 3541 3542 3543 3544 3545 3546 3718 3720 - 3720 24576 11 1293 2852 2853 2855 2856 3540 3542 3543 3545 3546 3719 - 3721 32768 16 716 1327 1336 2359 2360 2554 2555 2870 2871 2872 2947 3409 3410 3549 3550 3551 - 3722 24576 21 1329 1338 1584 1585 1596 1792 1953 2720 2721 2870 2874 2875 2947 3481 3482 3483 3552 3553 3555 3556 3723 - 3723 24576 19 1342 1596 1792 2721 2722 2873 2874 2875 2876 3482 3483 3484 3485 3552 3553 3554 3555 3556 3722 - 3724 32768 16 812 1123 1124 1965 2779 2781 2916 2917 2994 3009 3513 3570 3571 3573 3574 3725 - 3725 32768 16 1421 1676 1965 2915 2916 2917 2918 2975 2994 3009 3570 3571 3572 3573 3574 3724 - 3726 32768 11 1424 1680 1841 1928 2922 2923 2924 3008 3576 3577 3578 - 3727 18432 14 376 647 1555 2535 2937 2938 2939 3396 3541 3542 3543 3579 3580 3581 - 3728 24576 10 1836 1988 1995 2997 2998 2999 3016 3593 3594 3595 diff --git a/Tests/F_BaseLib/def_knapsack.out b/Tests/F_BaseLib/def_knapsack.out deleted file mode 100644 index 13501c7ad..000000000 --- a/Tests/F_BaseLib/def_knapsack.out +++ /dev/null @@ -1,3729 +0,0 @@ - 3728 - 1 76 4608 - 2 111 3072 - 3 127 1536 - 4 45 512 - 5 96 4608 - 6 86 4096 - 7 25 4096 - 8 9 512 - 9 118 4096 - 10 74 8192 - 11 68 3072 - 12 97 512 - 13 49 1024 - 14 2 512 - 15 74 512 - 16 47 2048 - 17 48 512 - 18 81 3072 - 19 0 2048 - 20 34 1024 - 21 101 2048 - 22 16 13824 - 23 51 9216 - 24 26 3072 - 25 106 9216 - 26 55 4096 - 27 41 18432 - 28 22 4096 - 29 89 3072 - 30 122 9216 - 31 95 9216 - 32 79 2048 - 33 41 4096 - 34 22 512 - 35 80 12288 - 36 113 13824 - 37 69 9216 - 38 53 1024 - 39 28 16384 - 40 8 2048 - 41 29 1024 - 42 121 8192 - 43 66 512 - 44 70 512 - 45 108 4096 - 46 30 9216 - 47 102 9216 - 48 107 12288 - 49 11 2048 - 50 76 6144 - 51 42 512 - 52 124 4096 - 53 6 6144 - 54 100 6144 - 55 34 4096 - 56 99 8192 - 57 120 2048 - 58 58 1024 - 59 126 18432 - 60 19 4096 - 61 29 2048 - 62 91 512 - 63 44 12288 - 64 59 8192 - 65 63 6144 - 66 60 4096 - 67 5 18432 - 68 124 9216 - 69 60 2048 - 70 30 2048 - 71 30 4096 - 72 80 1024 - 73 63 2048 - 74 12 3072 - 75 0 1024 - 76 34 512 - 77 76 2048 - 78 83 12288 - 79 23 4096 - 80 84 9216 - 81 28 1536 - 82 87 24576 - 83 51 8192 - 84 83 1024 - 85 124 1024 - 86 1 4096 - 87 1 18432 - 88 32 12288 - 89 113 4096 - 90 110 9216 - 91 70 3072 - 92 54 1536 - 93 112 12288 - 94 39 1536 - 95 17 9216 - 96 87 9216 - 97 13 4096 - 98 125 13824 - 99 88 512 - 100 6 1024 - 101 9 2048 - 102 61 4096 - 103 39 2048 - 104 24 18432 - 105 21 12288 - 106 99 6144 - 107 107 1024 - 108 68 4096 - 109 90 2048 - 110 30 18432 - 111 39 4096 - 112 0 8192 - 113 74 12288 - 114 27 16384 - 115 100 3072 - 116 3 18432 - 117 72 1536 - 118 64 1024 - 119 66 9216 - 120 50 6144 - 121 104 12288 - 122 92 12288 - 123 105 2048 - 124 104 1024 - 125 92 512 - 126 2 2048 - 127 32 1536 - 128 46 1024 - 129 47 512 - 130 88 4608 - 131 46 512 - 132 20 512 - 133 5 8192 - 134 112 9216 - 135 94 6144 - 136 116 4096 - 137 46 2048 - 138 62 2048 - 139 84 1024 - 140 55 6144 - 141 123 6144 - 142 78 1024 - 143 4 12288 - 144 26 8192 - 145 64 18432 - 146 123 2048 - 147 47 6144 - 148 68 2048 - 149 106 2048 - 150 73 32768 - 151 74 3072 - 152 86 9216 - 153 54 512 - 154 121 12288 - 155 5 2048 - 156 38 1536 - 157 13 2048 - 158 22 16384 - 159 47 12288 - 160 5 512 - 161 15 512 - 162 73 6144 - 163 110 512 - 164 35 12288 - 165 19 9216 - 166 120 512 - 167 2 1024 - 168 49 8192 - 169 68 512 - 170 42 2048 - 171 72 9216 - 172 74 6144 - 173 125 6144 - 174 24 6144 - 175 39 12288 - 176 122 3072 - 177 113 9216 - 178 61 1024 - 179 14 12288 - 180 124 12288 - 181 12 6144 - 182 124 32768 - 183 61 2048 - 184 24 3072 - 185 123 6144 - 186 23 3072 - 187 68 6144 - 188 119 12288 - 189 126 9216 - 190 36 18432 - 191 33 16384 - 192 41 18432 - 193 7 13824 - 194 36 12288 - 195 69 2048 - 196 88 6144 - 197 35 1024 - 198 4 1536 - 199 127 3072 - 200 10 4096 - 201 44 1024 - 202 117 12288 - 203 12 4096 - 204 53 2048 - 205 23 512 - 206 96 16384 - 207 39 1024 - 208 84 12288 - 209 82 2048 - 210 52 1024 - 211 31 12288 - 212 117 6144 - 213 95 4608 - 214 95 16384 - 215 67 1024 - 216 102 24576 - 217 4 3072 - 218 84 9216 - 219 9 4096 - 220 98 1536 - 221 6 3072 - 222 101 4608 - 223 94 2048 - 224 107 1536 - 225 28 2048 - 226 75 6144 - 227 121 12288 - 228 41 12288 - 229 60 6144 - 230 49 6144 - 231 61 512 - 232 57 512 - 233 80 4608 - 234 85 18432 - 235 108 8192 - 236 112 1024 - 237 115 2048 - 238 17 2048 - 239 91 4096 - 240 81 6144 - 241 54 3072 - 242 28 6144 - 243 127 18432 - 244 111 12288 - 245 62 8192 - 246 28 8192 - 247 118 18432 - 248 18 12288 - 249 120 18432 - 250 31 18432 - 251 126 3072 - 252 122 16384 - 253 49 4608 - 254 39 6144 - 255 57 4096 - 256 43 1024 - 257 44 512 - 258 8 4096 - 259 27 1024 - 260 53 4096 - 261 119 8192 - 262 60 32768 - 263 74 12288 - 264 95 3072 - 265 86 8192 - 266 118 9216 - 267 106 18432 - 268 10 6144 - 269 22 3072 - 270 120 2048 - 271 74 9216 - 272 91 24576 - 273 24 9216 - 274 18 4096 - 275 93 8192 - 276 16 6144 - 277 109 1024 - 278 83 2048 - 279 53 9216 - 280 49 512 - 281 100 12288 - 282 80 8192 - 283 45 13824 - 284 15 6144 - 285 10 512 - 286 119 24576 - 287 68 6144 - 288 18 512 - 289 99 12288 - 290 31 1024 - 291 19 1024 - 292 110 2048 - 293 25 4608 - 294 13 1024 - 295 23 1024 - 296 9 1024 - 297 30 18432 - 298 52 512 - 299 86 6144 - 300 36 512 - 301 121 4096 - 302 104 2048 - 303 33 6144 - 304 96 12288 - 305 12 16384 - 306 100 8192 - 307 66 3072 - 308 84 6144 - 309 88 2048 - 310 57 9216 - 311 104 8192 - 312 43 18432 - 313 10 1024 - 314 22 6144 - 315 34 2048 - 316 38 2048 - 317 87 12288 - 318 59 4096 - 319 11 2048 - 320 39 2048 - 321 100 9216 - 322 11 1024 - 323 1 2048 - 324 77 12288 - 325 99 4096 - 326 70 18432 - 327 30 8192 - 328 84 4096 - 329 73 2048 - 330 24 8192 - 331 73 4096 - 332 125 8192 - 333 54 1024 - 334 126 12288 - 335 55 1024 - 336 119 3072 - 337 97 4096 - 338 98 2048 - 339 28 9216 - 340 82 4096 - 341 58 1024 - 342 62 9216 - 343 95 6144 - 344 15 3072 - 345 17 8192 - 346 56 4096 - 347 77 4096 - 348 14 18432 - 349 125 3072 - 350 118 3072 - 351 40 4608 - 352 36 4096 - 353 103 4096 - 354 46 8192 - 355 120 6144 - 356 85 13824 - 357 16 8192 - 358 120 9216 - 359 97 9216 - 360 81 6144 - 361 86 2048 - 362 76 18432 - 363 74 9216 - 364 74 512 - 365 74 2048 - 366 12 2048 - 367 80 9216 - 368 51 16384 - 369 70 6144 - 370 121 9216 - 371 34 3072 - 372 7 2048 - 373 53 9216 - 374 119 1024 - 375 91 16384 - 376 35 24576 - 377 100 512 - 378 39 6144 - 379 15 9216 - 380 58 2048 - 381 80 512 - 382 49 4096 - 383 85 512 - 384 43 4096 - 385 91 4608 - 386 85 1024 - 387 92 4608 - 388 77 16384 - 389 32 6144 - 390 125 2048 - 391 59 2048 - 392 68 2048 - 393 97 3072 - 394 20 9216 - 395 50 4096 - 396 54 2048 - 397 113 2048 - 398 98 6144 - 399 0 2048 - 400 106 12288 - 401 24 2048 - 402 62 4096 - 403 116 4096 - 404 33 3072 - 405 127 8192 - 406 93 1024 - 407 21 512 - 408 76 9216 - 409 96 6144 - 410 82 24576 - 411 16 4096 - 412 78 32768 - 413 1 1024 - 414 126 2048 - 415 14 4096 - 416 5 512 - 417 55 16384 - 418 94 18432 - 419 123 4096 - 420 26 512 - 421 114 18432 - 422 119 13824 - 423 79 6144 - 424 68 12288 - 425 0 6144 - 426 78 1024 - 427 52 2048 - 428 62 24576 - 429 40 6144 - 430 91 2048 - 431 103 12288 - 432 56 6144 - 433 27 18432 - 434 19 3072 - 435 83 12288 - 436 122 4096 - 437 91 3072 - 438 20 2048 - 439 97 2048 - 440 117 8192 - 441 107 8192 - 442 11 9216 - 443 3 1024 - 444 111 6144 - 445 21 4096 - 446 101 3072 - 447 4 9216 - 448 3 6144 - 449 36 6144 - 450 16 2048 - 451 106 6144 - 452 37 2048 - 453 51 12288 - 454 51 6144 - 455 30 16384 - 456 37 12288 - 457 18 18432 - 458 73 4096 - 459 14 1024 - 460 36 8192 - 461 77 8192 - 462 78 8192 - 463 2 4096 - 464 78 4096 - 465 34 12288 - 466 67 4096 - 467 43 12288 - 468 100 4096 - 469 30 1024 - 470 79 4096 - 471 50 9216 - 472 77 4096 - 473 63 6144 - 474 116 512 - 475 89 4096 - 476 117 512 - 477 104 8192 - 478 1 8192 - 479 17 6144 - 480 117 32768 - 481 7 6144 - 482 70 8192 - 483 112 6144 - 484 0 3072 - 485 54 18432 - 486 18 6144 - 487 32 4096 - 488 122 12288 - 489 75 12288 - 490 55 12288 - 491 113 9216 - 492 101 4096 - 493 95 3072 - 494 95 4096 - 495 74 1024 - 496 46 6144 - 497 38 3072 - 498 117 4096 - 499 102 1024 - 500 67 2048 - 501 44 4096 - 502 110 6144 - 503 3 1536 - 504 122 6144 - 505 111 1024 - 506 36 12288 - 507 4 12288 - 508 39 8192 - 509 100 2048 - 510 20 6144 - 511 43 6144 - 512 109 4096 - 513 86 12288 - 514 90 2048 - 515 116 12288 - 516 114 12288 - 517 121 6144 - 518 8 6144 - 519 104 3072 - 520 85 6144 - 521 0 24576 - 522 104 16384 - 523 17 6144 - 524 87 8192 - 525 16 18432 - 526 1 1024 - 527 1 2048 - 528 7 4096 - 529 88 18432 - 530 115 12288 - 531 49 1024 - 532 37 16384 - 533 18 12288 - 534 109 2048 - 535 16 12288 - 536 24 512 - 537 67 1024 - 538 74 6144 - 539 127 4608 - 540 0 3072 - 541 14 2048 - 542 94 4096 - 543 107 1024 - 544 57 8192 - 545 7 2048 - 546 102 4096 - 547 57 12288 - 548 85 2048 - 549 49 3072 - 550 81 9216 - 551 124 2048 - 552 12 2048 - 553 120 4096 - 554 97 8192 - 555 28 6144 - 556 126 3072 - 557 111 12288 - 558 40 512 - 559 58 2048 - 560 81 2048 - 561 86 3072 - 562 73 18432 - 563 61 9216 - 564 126 16384 - 565 65 24576 - 566 38 512 - 567 21 1536 - 568 31 3072 - 569 96 12288 - 570 64 2048 - 571 48 4608 - 572 127 24576 - 573 37 9216 - 574 27 6144 - 575 58 4096 - 576 56 8192 - 577 55 4096 - 578 114 9216 - 579 51 512 - 580 69 4096 - 581 127 1024 - 582 29 512 - 583 61 2048 - 584 122 2048 - 585 50 12288 - 586 39 24576 - 587 51 1536 - 588 126 9216 - 589 88 1024 - 590 65 2048 - 591 38 4608 - 592 115 2048 - 593 52 6144 - 594 43 9216 - 595 34 9216 - 596 72 12288 - 597 31 6144 - 598 50 1536 - 599 94 12288 - 600 25 512 - 601 114 2048 - 602 50 1024 - 603 70 2048 - 604 110 12288 - 605 17 512 - 606 54 2048 - 607 26 4608 - 608 73 8192 - 609 20 9216 - 610 87 4096 - 611 5 9216 - 612 61 3072 - 613 52 16384 - 614 35 512 - 615 107 18432 - 616 55 512 - 617 7 512 - 618 24 18432 - 619 110 3072 - 620 25 6144 - 621 127 6144 - 622 21 13824 - 623 21 6144 - 624 21 2048 - 625 0 9216 - 626 97 6144 - 627 57 4096 - 628 56 512 - 629 91 6144 - 630 107 6144 - 631 107 4608 - 632 33 512 - 633 27 4096 - 634 3 8192 - 635 109 24576 - 636 26 6144 - 637 27 512 - 638 15 512 - 639 14 3072 - 640 26 2048 - 641 2 9216 - 642 17 1536 - 643 45 2048 - 644 18 1024 - 645 93 2048 - 646 22 4096 - 647 0 6144 - 648 4 6144 - 649 94 512 - 650 107 2048 - 651 28 12288 - 652 118 512 - 653 78 12288 - 654 78 6144 - 655 37 16384 - 656 60 8192 - 657 0 18432 - 658 125 512 - 659 4 4608 - 660 116 3072 - 661 105 2048 - 662 92 6144 - 663 32 1024 - 664 99 9216 - 665 89 6144 - 666 25 2048 - 667 48 4096 - 668 75 2048 - 669 73 9216 - 670 62 512 - 671 82 2048 - 672 119 512 - 673 40 12288 - 674 123 18432 - 675 58 3072 - 676 4 2048 - 677 68 18432 - 678 67 2048 - 679 114 512 - 680 116 512 - 681 108 6144 - 682 64 512 - 683 108 2048 - 684 1 12288 - 685 77 2048 - 686 115 512 - 687 4 4096 - 688 44 6144 - 689 107 9216 - 690 69 512 - 691 55 8192 - 692 66 1024 - 693 124 9216 - 694 50 9216 - 695 107 18432 - 696 98 9216 - 697 80 2048 - 698 6 18432 - 699 8 1536 - 700 18 8192 - 701 45 9216 - 702 64 3072 - 703 12 8192 - 704 32 2048 - 705 100 2048 - 706 60 1024 - 707 111 512 - 708 96 2048 - 709 17 6144 - 710 122 1024 - 711 37 6144 - 712 91 4096 - 713 92 2048 - 714 47 2048 - 715 111 4096 - 716 83 512 - 717 118 8192 - 718 94 6144 - 719 108 512 - 720 41 9216 - 721 126 2048 - 722 112 9216 - 723 72 512 - 724 68 9216 - 725 32 4096 - 726 10 6144 - 727 64 6144 - 728 76 512 - 729 1 4608 - 730 16 6144 - 731 43 8192 - 732 104 512 - 733 120 1024 - 734 24 12288 - 735 59 12288 - 736 24 9216 - 737 103 512 - 738 30 6144 - 739 58 8192 - 740 57 1024 - 741 109 18432 - 742 117 4096 - 743 120 2048 - 744 86 12288 - 745 98 512 - 746 81 18432 - 747 7 9216 - 748 87 6144 - 749 59 1024 - 750 23 8192 - 751 119 6144 - 752 49 1536 - 753 57 16384 - 754 52 12288 - 755 62 2048 - 756 86 18432 - 757 47 12288 - 758 11 4608 - 759 63 1024 - 760 86 8192 - 761 4 24576 - 762 116 2048 - 763 81 512 - 764 110 2048 - 765 113 1024 - 766 126 4096 - 767 93 12288 - 768 65 1024 - 769 36 4608 - 770 45 3072 - 771 58 9216 - 772 126 12288 - 773 78 1536 - 774 109 13824 - 775 65 6144 - 776 60 16384 - 777 34 9216 - 778 17 4096 - 779 57 2048 - 780 63 4096 - 781 21 6144 - 782 45 4096 - 783 96 1024 - 784 29 1536 - 785 60 4096 - 786 33 6144 - 787 70 2048 - 788 91 512 - 789 115 4096 - 790 97 1024 - 791 111 2048 - 792 123 9216 - 793 25 12288 - 794 108 4608 - 795 33 18432 - 796 93 512 - 797 7 4096 - 798 92 512 - 799 126 512 - 800 71 4096 - 801 126 1024 - 802 26 2048 - 803 42 9216 - 804 67 9216 - 805 104 9216 - 806 114 18432 - 807 87 2048 - 808 5 2048 - 809 29 3072 - 810 127 512 - 811 9 512 - 812 67 16384 - 813 41 13824 - 814 84 6144 - 815 38 512 - 816 100 24576 - 817 101 6144 - 818 79 8192 - 819 28 4096 - 820 4 12288 - 821 107 12288 - 822 10 24576 - 823 120 18432 - 824 3 24576 - 825 46 1024 - 826 45 2048 - 827 112 32768 - 828 22 512 - 829 35 8192 - 830 90 8192 - 831 40 1024 - 832 9 16384 - 833 70 12288 - 834 18 4096 - 835 64 4096 - 836 91 6144 - 837 98 2048 - 838 27 1024 - 839 117 16384 - 840 55 12288 - 841 10 12288 - 842 29 1024 - 843 73 2048 - 844 84 24576 - 845 18 512 - 846 77 3072 - 847 26 9216 - 848 4 1024 - 849 97 12288 - 850 105 6144 - 851 21 12288 - 852 127 2048 - 853 73 6144 - 854 125 4096 - 855 94 32768 - 856 101 1024 - 857 25 1024 - 858 4 2048 - 859 118 4096 - 860 59 4096 - 861 13 4096 - 862 45 12288 - 863 42 6144 - 864 101 2048 - 865 78 6144 - 866 54 12288 - 867 101 9216 - 868 99 1024 - 869 72 2048 - 870 19 2048 - 871 12 32768 - 872 105 1024 - 873 67 6144 - 874 73 1024 - 875 96 2048 - 876 54 512 - 877 71 12288 - 878 60 12288 - 879 75 3072 - 880 90 9216 - 881 31 512 - 882 91 8192 - 883 77 6144 - 884 65 4096 - 885 14 12288 - 886 6 512 - 887 1 6144 - 888 57 4096 - 889 20 1024 - 890 56 512 - 891 94 16384 - 892 101 1536 - 893 74 12288 - 894 44 6144 - 895 127 4096 - 896 32 3072 - 897 2 3072 - 898 12 2048 - 899 8 2048 - 900 103 6144 - 901 74 2048 - 902 6 8192 - 903 99 9216 - 904 25 1536 - 905 68 6144 - 906 3 3072 - 907 60 2048 - 908 7 1024 - 909 95 13824 - 910 92 8192 - 911 4 8192 - 912 18 2048 - 913 26 4096 - 914 94 512 - 915 88 4096 - 916 110 2048 - 917 77 9216 - 918 110 512 - 919 67 1536 - 920 124 512 - 921 72 3072 - 922 55 9216 - 923 111 3072 - 924 62 2048 - 925 7 16384 - 926 105 4096 - 927 55 2048 - 928 120 512 - 929 62 9216 - 930 87 12288 - 931 20 16384 - 932 89 8192 - 933 97 13824 - 934 102 6144 - 935 94 6144 - 936 30 2048 - 937 126 12288 - 938 104 3072 - 939 68 2048 - 940 72 4608 - 941 94 1024 - 942 125 18432 - 943 94 24576 - 944 63 2048 - 945 57 2048 - 946 20 12288 - 947 114 512 - 948 8 6144 - 949 47 12288 - 950 112 512 - 951 12 9216 - 952 70 2048 - 953 120 6144 - 954 13 2048 - 955 123 12288 - 956 115 512 - 957 34 2048 - 958 88 13824 - 959 2 1536 - 960 115 6144 - 961 27 2048 - 962 37 6144 - 963 62 6144 - 964 50 2048 - 965 111 512 - 966 39 2048 - 967 97 2048 - 968 126 16384 - 969 96 2048 - 970 42 4096 - 971 121 1024 - 972 76 3072 - 973 108 4096 - 974 19 12288 - 975 118 13824 - 976 117 1024 - 977 104 4608 - 978 12 6144 - 979 33 13824 - 980 73 2048 - 981 114 1024 - 982 25 2048 - 983 10 8192 - 984 96 512 - 985 21 9216 - 986 55 8192 - 987 116 6144 - 988 10 6144 - 989 90 2048 - 990 40 12288 - 991 4 2048 - 992 113 1024 - 993 75 2048 - 994 50 8192 - 995 108 2048 - 996 89 512 - 997 12 8192 - 998 93 512 - 999 80 1536 - 1000 79 2048 - 1001 70 1024 - 1002 49 4096 - 1003 39 9216 - 1004 98 9216 - 1005 14 6144 - 1006 90 512 - 1007 118 6144 - 1008 33 512 - 1009 22 18432 - 1010 52 4096 - 1011 109 4096 - 1012 20 3072 - 1013 6 12288 - 1014 22 12288 - 1015 61 18432 - 1016 103 1536 - 1017 45 6144 - 1018 52 6144 - 1019 24 18432 - 1020 107 12288 - 1021 9 4096 - 1022 27 1024 - 1023 38 12288 - 1024 86 4096 - 1025 96 2048 - 1026 100 16384 - 1027 34 6144 - 1028 53 6144 - 1029 35 2048 - 1030 91 2048 - 1031 113 13824 - 1032 63 4096 - 1033 0 512 - 1034 92 2048 - 1035 11 3072 - 1036 41 12288 - 1037 48 1024 - 1038 95 1536 - 1039 89 2048 - 1040 48 9216 - 1041 54 3072 - 1042 103 9216 - 1043 51 6144 - 1044 44 3072 - 1045 85 12288 - 1046 50 4096 - 1047 37 6144 - 1048 35 1024 - 1049 48 2048 - 1050 83 6144 - 1051 50 6144 - 1052 60 18432 - 1053 7 1024 - 1054 33 2048 - 1055 88 9216 - 1056 64 12288 - 1057 31 2048 - 1058 86 2048 - 1059 123 8192 - 1060 24 12288 - 1061 81 4096 - 1062 4 1024 - 1063 25 1024 - 1064 8 12288 - 1065 50 13824 - 1066 7 6144 - 1067 81 6144 - 1068 116 6144 - 1069 49 12288 - 1070 109 8192 - 1071 40 3072 - 1072 101 1024 - 1073 10 4096 - 1074 23 512 - 1075 18 2048 - 1076 37 2048 - 1077 61 6144 - 1078 12 4096 - 1079 102 2048 - 1080 76 3072 - 1081 82 1024 - 1082 16 2048 - 1083 0 1536 - 1084 28 4096 - 1085 64 9216 - 1086 88 3072 - 1087 9 8192 - 1088 105 1024 - 1089 23 18432 - 1090 56 3072 - 1091 66 4096 - 1092 123 12288 - 1093 5 12288 - 1094 103 8192 - 1095 77 12288 - 1096 110 4096 - 1097 56 16384 - 1098 72 1024 - 1099 12 6144 - 1100 83 9216 - 1101 93 3072 - 1102 66 6144 - 1103 47 3072 - 1104 85 4096 - 1105 62 4096 - 1106 41 512 - 1107 48 8192 - 1108 28 13824 - 1109 73 1024 - 1110 99 1024 - 1111 124 4096 - 1112 112 6144 - 1113 55 2048 - 1114 43 3072 - 1115 46 4096 - 1116 70 12288 - 1117 74 24576 - 1118 77 1024 - 1119 75 1024 - 1120 116 2048 - 1121 14 6144 - 1122 98 8192 - 1123 72 8192 - 1124 67 16384 - 1125 3 12288 - 1126 103 1024 - 1127 19 512 - 1128 91 12288 - 1129 31 32768 - 1130 43 24576 - 1131 75 12288 - 1132 102 9216 - 1133 122 18432 - 1134 29 4608 - 1135 50 512 - 1136 98 1024 - 1137 119 2048 - 1138 56 12288 - 1139 76 8192 - 1140 82 12288 - 1141 94 2048 - 1142 76 16384 - 1143 84 12288 - 1144 100 1024 - 1145 1 12288 - 1146 119 24576 - 1147 23 1536 - 1148 9 1536 - 1149 86 1024 - 1150 39 512 - 1151 119 4096 - 1152 118 2048 - 1153 66 2048 - 1154 112 24576 - 1155 13 1536 - 1156 112 2048 - 1157 36 12288 - 1158 16 9216 - 1159 115 3072 - 1160 15 2048 - 1161 41 16384 - 1162 20 1024 - 1163 8 512 - 1164 79 8192 - 1165 87 1024 - 1166 35 8192 - 1167 87 6144 - 1168 119 9216 - 1169 95 1024 - 1170 107 16384 - 1171 69 2048 - 1172 45 6144 - 1173 75 16384 - 1174 52 9216 - 1175 57 2048 - 1176 125 2048 - 1177 26 512 - 1178 87 18432 - 1179 10 3072 - 1180 71 3072 - 1181 97 12288 - 1182 21 1024 - 1183 11 512 - 1184 46 16384 - 1185 103 12288 - 1186 94 3072 - 1187 59 2048 - 1188 64 4096 - 1189 53 512 - 1190 53 1536 - 1191 121 2048 - 1192 24 1536 - 1193 71 2048 - 1194 20 12288 - 1195 37 512 - 1196 3 1024 - 1197 117 2048 - 1198 11 8192 - 1199 109 6144 - 1200 19 8192 - 1201 60 3072 - 1202 13 9216 - 1203 5 6144 - 1204 74 2048 - 1205 70 4096 - 1206 70 16384 - 1207 124 12288 - 1208 28 3072 - 1209 24 1024 - 1210 80 6144 - 1211 113 2048 - 1212 58 9216 - 1213 38 1024 - 1214 122 4096 - 1215 16 3072 - 1216 40 8192 - 1217 110 12288 - 1218 117 18432 - 1219 117 4608 - 1220 31 9216 - 1221 28 1024 - 1222 102 3072 - 1223 95 2048 - 1224 4 512 - 1225 9 9216 - 1226 9 4096 - 1227 65 4096 - 1228 114 4096 - 1229 103 9216 - 1230 40 2048 - 1231 16 512 - 1232 17 1024 - 1233 44 2048 - 1234 111 2048 - 1235 89 8192 - 1236 27 2048 - 1237 41 12288 - 1238 56 2048 - 1239 112 12288 - 1240 87 2048 - 1241 30 512 - 1242 12 512 - 1243 22 2048 - 1244 34 4096 - 1245 44 9216 - 1246 98 6144 - 1247 22 1024 - 1248 23 2048 - 1249 41 1024 - 1250 61 16384 - 1251 9 2048 - 1252 127 9216 - 1253 53 2048 - 1254 25 9216 - 1255 1 512 - 1256 29 6144 - 1257 24 2048 - 1258 82 6144 - 1259 75 24576 - 1260 5 4096 - 1261 9 24576 - 1262 77 8192 - 1263 64 13824 - 1264 32 512 - 1265 50 2048 - 1266 85 3072 - 1267 17 2048 - 1268 16 12288 - 1269 26 1024 - 1270 10 2048 - 1271 28 2048 - 1272 5 1024 - 1273 41 2048 - 1274 99 6144 - 1275 105 4608 - 1276 14 512 - 1277 13 512 - 1278 101 9216 - 1279 56 9216 - 1280 31 512 - 1281 51 1024 - 1282 39 4096 - 1283 6 512 - 1284 38 4096 - 1285 28 512 - 1286 8 1024 - 1287 2 512 - 1288 90 9216 - 1289 49 2048 - 1290 14 512 - 1291 120 3072 - 1292 23 12288 - 1293 116 12288 - 1294 88 16384 - 1295 73 4608 - 1296 48 2048 - 1297 72 16384 - 1298 19 12288 - 1299 40 6144 - 1300 22 1536 - 1301 34 1536 - 1302 4 18432 - 1303 91 9216 - 1304 36 2048 - 1305 2 6144 - 1306 25 12288 - 1307 46 3072 - 1308 122 512 - 1309 68 8192 - 1310 29 4096 - 1311 37 1024 - 1312 99 2048 - 1313 25 4096 - 1314 124 512 - 1315 26 4096 - 1316 61 512 - 1317 78 2048 - 1318 83 3072 - 1319 57 512 - 1320 88 4096 - 1321 123 512 - 1322 108 16384 - 1323 52 1024 - 1324 41 1536 - 1325 58 512 - 1326 33 4096 - 1327 60 512 - 1328 127 2048 - 1329 100 6144 - 1330 121 512 - 1331 52 2048 - 1332 62 3072 - 1333 84 2048 - 1334 59 512 - 1335 124 3072 - 1336 71 12288 - 1337 36 1024 - 1338 111 6144 - 1339 96 4096 - 1340 103 6144 - 1341 98 4096 - 1342 36 6144 - 1343 12 1024 - 1344 41 8192 - 1345 2 4608 - 1346 113 6144 - 1347 80 18432 - 1348 29 2048 - 1349 104 6144 - 1350 3 6144 - 1351 63 512 - 1352 116 1024 - 1353 1 12288 - 1354 106 6144 - 1355 82 4608 - 1356 127 4096 - 1357 75 6144 - 1358 6 2048 - 1359 78 4096 - 1360 105 12288 - 1361 98 18432 - 1362 117 512 - 1363 83 8192 - 1364 16 1024 - 1365 26 1536 - 1366 32 6144 - 1367 65 512 - 1368 3 2048 - 1369 30 1024 - 1370 69 3072 - 1371 120 8192 - 1372 81 1024 - 1373 100 4096 - 1374 32 9216 - 1375 67 4096 - 1376 118 1024 - 1377 72 2048 - 1378 120 12288 - 1379 82 16384 - 1380 107 4096 - 1381 112 512 - 1382 2 2048 - 1383 49 6144 - 1384 14 1024 - 1385 19 2048 - 1386 41 6144 - 1387 113 512 - 1388 28 8192 - 1389 11 4096 - 1390 105 4096 - 1391 79 4096 - 1392 67 512 - 1393 102 6144 - 1394 60 6144 - 1395 50 8192 - 1396 103 2048 - 1397 79 2048 - 1398 121 6144 - 1399 8 6144 - 1400 95 12288 - 1401 103 16384 - 1402 72 12288 - 1403 92 12288 - 1404 112 8192 - 1405 23 24576 - 1406 30 3072 - 1407 86 12288 - 1408 85 6144 - 1409 22 16384 - 1410 32 16384 - 1411 54 9216 - 1412 20 2048 - 1413 94 1024 - 1414 90 2048 - 1415 71 512 - 1416 15 1024 - 1417 5 1536 - 1418 18 1536 - 1419 35 2048 - 1420 115 6144 - 1421 66 8192 - 1422 13 24576 - 1423 83 6144 - 1424 70 8192 - 1425 110 1024 - 1426 97 2048 - 1427 103 9216 - 1428 19 4096 - 1429 75 4096 - 1430 55 6144 - 1431 125 1024 - 1432 102 512 - 1433 62 6144 - 1434 101 12288 - 1435 71 6144 - 1436 106 512 - 1437 91 2048 - 1438 112 1024 - 1439 122 8192 - 1440 43 2048 - 1441 33 2048 - 1442 89 2048 - 1443 92 4096 - 1444 109 512 - 1445 109 2048 - 1446 60 9216 - 1447 2 24576 - 1448 45 8192 - 1449 31 2048 - 1450 56 4608 - 1451 73 512 - 1452 107 512 - 1453 28 2048 - 1454 63 3072 - 1455 100 4608 - 1456 18 6144 - 1457 63 16384 - 1458 46 6144 - 1459 114 3072 - 1460 83 9216 - 1461 14 13824 - 1462 69 1024 - 1463 43 24576 - 1464 66 6144 - 1465 105 512 - 1466 75 512 - 1467 55 6144 - 1468 57 3072 - 1469 2 8192 - 1470 77 512 - 1471 2 18432 - 1472 16 2048 - 1473 37 2048 - 1474 53 16384 - 1475 121 12288 - 1476 35 4096 - 1477 20 8192 - 1478 78 512 - 1479 37 1536 - 1480 31 16384 - 1481 18 2048 - 1482 123 1024 - 1483 102 2048 - 1484 14 2048 - 1485 71 9216 - 1486 96 32768 - 1487 68 1024 - 1488 84 512 - 1489 121 1024 - 1490 60 2048 - 1491 62 1024 - 1492 7 12288 - 1493 85 2048 - 1494 64 1024 - 1495 54 18432 - 1496 46 2048 - 1497 64 12288 - 1498 114 1024 - 1499 124 2048 - 1500 114 6144 - 1501 95 4096 - 1502 76 4096 - 1503 106 4096 - 1504 76 18432 - 1505 13 3072 - 1506 122 6144 - 1507 83 2048 - 1508 104 4096 - 1509 101 512 - 1510 117 1024 - 1511 27 6144 - 1512 109 8192 - 1513 104 24576 - 1514 55 2048 - 1515 9 3072 - 1516 77 4608 - 1517 123 2048 - 1518 104 1024 - 1519 0 4096 - 1520 119 2048 - 1521 81 2048 - 1522 79 512 - 1523 71 1024 - 1524 99 512 - 1525 45 1536 - 1526 87 12288 - 1527 30 2048 - 1528 94 2048 - 1529 74 1024 - 1530 66 2048 - 1531 27 3072 - 1532 96 512 - 1533 68 18432 - 1534 118 2048 - 1535 86 6144 - 1536 111 4608 - 1537 112 2048 - 1538 115 1024 - 1539 82 512 - 1540 102 1024 - 1541 39 3072 - 1542 20 4096 - 1543 69 13824 - 1544 86 512 - 1545 57 6144 - 1546 114 2048 - 1547 95 512 - 1548 111 1024 - 1549 87 512 - 1550 70 1024 - 1551 121 2048 - 1552 106 1024 - 1553 76 1024 - 1554 73 3072 - 1555 8 4096 - 1556 51 4096 - 1557 63 2048 - 1558 25 32768 - 1559 43 24576 - 1560 95 6144 - 1561 13 512 - 1562 37 4096 - 1563 115 2048 - 1564 39 18432 - 1565 65 2048 - 1566 8 12288 - 1567 19 512 - 1568 108 1024 - 1569 59 18432 - 1570 104 12288 - 1571 71 2048 - 1572 44 512 - 1573 83 16384 - 1574 78 3072 - 1575 106 2048 - 1576 117 2048 - 1577 52 24576 - 1578 90 1024 - 1579 91 1024 - 1580 80 6144 - 1581 104 2048 - 1582 48 3072 - 1583 79 1024 - 1584 38 6144 - 1585 5 9216 - 1586 95 2048 - 1587 65 9216 - 1588 47 1024 - 1589 84 1536 - 1590 115 13824 - 1591 44 2048 - 1592 40 2048 - 1593 25 6144 - 1594 42 1024 - 1595 89 512 - 1596 90 512 - 1597 73 12288 - 1598 42 12288 - 1599 56 8192 - 1600 81 4096 - 1601 51 18432 - 1602 76 2048 - 1603 88 2048 - 1604 82 3072 - 1605 54 6144 - 1606 47 512 - 1607 89 1024 - 1608 56 1024 - 1609 54 9216 - 1610 99 3072 - 1611 22 2048 - 1612 56 2048 - 1613 27 2048 - 1614 45 1024 - 1615 51 2048 - 1616 74 4096 - 1617 23 2048 - 1618 45 512 - 1619 44 12288 - 1620 34 2048 - 1621 93 6144 - 1622 92 1024 - 1623 21 2048 - 1624 89 18432 - 1625 0 512 - 1626 48 6144 - 1627 94 4096 - 1628 1 3072 - 1629 3 512 - 1630 24 512 - 1631 73 18432 - 1632 66 4096 - 1633 26 12288 - 1634 127 6144 - 1635 38 2048 - 1636 13 2048 - 1637 50 2048 - 1638 41 2048 - 1639 10 2048 - 1640 82 6144 - 1641 17 2048 - 1642 22 6144 - 1643 111 9216 - 1644 102 4096 - 1645 120 4096 - 1646 49 2048 - 1647 20 512 - 1648 50 512 - 1649 33 1024 - 1650 29 6144 - 1651 7 1024 - 1652 93 2048 - 1653 101 8192 - 1654 48 1024 - 1655 41 512 - 1656 107 3072 - 1657 44 9216 - 1658 82 8192 - 1659 56 3072 - 1660 33 2048 - 1661 43 1024 - 1662 110 4096 - 1663 10 512 - 1664 29 8192 - 1665 38 18432 - 1666 46 12288 - 1667 92 12288 - 1668 35 6144 - 1669 11 3072 - 1670 107 6144 - 1671 93 24576 - 1672 17 512 - 1673 1 2048 - 1674 30 4096 - 1675 26 6144 - 1676 62 12288 - 1677 46 4096 - 1678 79 9216 - 1679 44 4608 - 1680 106 4608 - 1681 50 12288 - 1682 51 512 - 1683 99 2048 - 1684 15 4096 - 1685 34 16384 - 1686 59 13824 - 1687 67 3072 - 1688 107 2048 - 1689 48 2048 - 1690 36 2048 - 1691 75 1024 - 1692 29 2048 - 1693 105 3072 - 1694 25 2048 - 1695 100 8192 - 1696 57 18432 - 1697 13 18432 - 1698 8 512 - 1699 105 2048 - 1700 112 4096 - 1701 58 4096 - 1702 78 2048 - 1703 119 4096 - 1704 71 16384 - 1705 98 12288 - 1706 11 512 - 1707 19 6144 - 1708 84 2048 - 1709 36 3072 - 1710 92 6144 - 1711 82 1024 - 1712 75 2048 - 1713 90 3072 - 1714 29 512 - 1715 53 512 - 1716 70 4096 - 1717 109 16384 - 1718 69 4096 - 1719 34 512 - 1720 37 512 - 1721 92 2048 - 1722 23 13824 - 1723 2 6144 - 1724 103 2048 - 1725 108 2048 - 1726 103 3072 - 1727 67 2048 - 1728 114 4096 - 1729 6 2048 - 1730 98 1024 - 1731 3 2048 - 1732 11 6144 - 1733 42 2048 - 1734 87 4096 - 1735 77 2048 - 1736 79 2048 - 1737 2 2048 - 1738 79 3072 - 1739 96 9216 - 1740 1 24576 - 1741 11 8192 - 1742 32 2048 - 1743 72 1024 - 1744 109 1024 - 1745 80 2048 - 1746 100 2048 - 1747 84 1024 - 1748 35 2048 - 1749 77 1024 - 1750 52 512 - 1751 36 512 - 1752 100 1024 - 1753 25 512 - 1754 47 2048 - 1755 83 13824 - 1756 89 2048 - 1757 4 512 - 1758 43 2048 - 1759 89 6144 - 1760 103 24576 - 1761 103 1024 - 1762 109 2048 - 1763 30 512 - 1764 31 2048 - 1765 16 512 - 1766 108 3072 - 1767 32 1024 - 1768 85 18432 - 1769 19 8192 - 1770 86 2048 - 1771 10 2048 - 1772 27 4096 - 1773 41 2048 - 1774 5 4096 - 1775 19 1024 - 1776 45 4096 - 1777 107 9216 - 1778 33 512 - 1779 92 3072 - 1780 80 1024 - 1781 115 16384 - 1782 29 9216 - 1783 54 4096 - 1784 71 2048 - 1785 86 1024 - 1786 31 1024 - 1787 32 512 - 1788 98 4096 - 1789 127 1024 - 1790 113 3072 - 1791 28 512 - 1792 108 6144 - 1793 36 1024 - 1794 30 512 - 1795 29 4096 - 1796 7 2048 - 1797 16 512 - 1798 125 12288 - 1799 2 1024 - 1800 116 12288 - 1801 113 6144 - 1802 81 512 - 1803 46 1024 - 1804 89 9216 - 1805 61 2048 - 1806 38 4096 - 1807 99 4096 - 1808 66 512 - 1809 97 4096 - 1810 33 4096 - 1811 58 512 - 1812 99 1536 - 1813 124 6144 - 1814 115 9216 - 1815 85 9216 - 1816 24 6144 - 1817 118 512 - 1818 14 512 - 1819 85 1024 - 1820 102 2048 - 1821 53 6144 - 1822 90 18432 - 1823 73 8192 - 1824 14 2048 - 1825 85 2048 - 1826 15 512 - 1827 84 4096 - 1828 122 512 - 1829 115 12288 - 1830 46 2048 - 1831 62 1024 - 1832 48 4096 - 1833 42 3072 - 1834 73 16384 - 1835 42 8192 - 1836 74 6144 - 1837 96 4096 - 1838 125 6144 - 1839 3 4608 - 1840 123 2048 - 1841 80 3072 - 1842 41 6144 - 1843 83 2048 - 1844 73 9216 - 1845 124 2048 - 1846 121 6144 - 1847 60 512 - 1848 0 4096 - 1849 119 2048 - 1850 124 1024 - 1851 125 512 - 1852 12 1024 - 1853 4 4096 - 1854 55 1024 - 1855 83 1024 - 1856 82 4096 - 1857 123 512 - 1858 81 2048 - 1859 35 3072 - 1860 40 4096 - 1861 67 8192 - 1862 70 9216 - 1863 66 2048 - 1864 116 2048 - 1865 117 3072 - 1866 58 2048 - 1867 64 2048 - 1868 118 2048 - 1869 116 1024 - 1870 16 1024 - 1871 60 1024 - 1872 121 512 - 1873 81 1024 - 1874 69 512 - 1875 68 512 - 1876 118 1024 - 1877 62 512 - 1878 125 2048 - 1879 107 4096 - 1880 121 2048 - 1881 59 512 - 1882 56 4096 - 1883 1 4096 - 1884 122 2048 - 1885 112 2048 - 1886 15 2048 - 1887 61 6144 - 1888 66 1024 - 1889 90 4096 - 1890 114 2048 - 1891 15 1024 - 1892 11 4096 - 1893 119 512 - 1894 63 512 - 1895 69 2048 - 1896 36 4096 - 1897 10 9216 - 1898 77 1536 - 1899 85 6144 - 1900 64 512 - 1901 13 12288 - 1902 61 1024 - 1903 76 24576 - 1904 65 2048 - 1905 59 2048 - 1906 122 1024 - 1907 65 512 - 1908 110 1024 - 1909 113 512 - 1910 69 1024 - 1911 23 2048 - 1912 111 4096 - 1913 24 2048 - 1914 125 1024 - 1915 85 512 - 1916 87 2048 - 1917 103 4096 - 1918 23 12288 - 1919 120 1024 - 1920 58 12288 - 1921 116 16384 - 1922 51 2048 - 1923 106 3072 - 1924 83 6144 - 1925 9 2048 - 1926 119 1024 - 1927 5 2048 - 1928 53 2048 - 1929 102 512 - 1930 45 2048 - 1931 122 8192 - 1932 123 1024 - 1933 57 1024 - 1934 113 4096 - 1935 68 1024 - 1936 70 512 - 1937 75 4096 - 1938 59 1024 - 1939 6 4096 - 1940 78 2048 - 1941 84 2048 - 1942 92 4096 - 1943 71 512 - 1944 106 1024 - 1945 106 512 - 1946 83 512 - 1947 98 2048 - 1948 99 2048 - 1949 115 1024 - 1950 71 1024 - 1951 108 512 - 1952 48 9216 - 1953 82 2048 - 1954 33 2048 - 1955 3 4096 - 1956 21 3072 - 1957 1 2048 - 1958 66 8192 - 1959 127 2048 - 1960 107 2048 - 1961 76 512 - 1962 48 2048 - 1963 95 24576 - 1964 104 512 - 1965 123 16384 - 1966 20 16384 - 1967 36 2048 - 1968 80 4096 - 1969 58 16384 - 1970 104 4096 - 1971 63 1024 - 1972 97 512 - 1973 79 512 - 1974 6 512 - 1975 106 4096 - 1976 42 512 - 1977 126 512 - 1978 19 2048 - 1979 77 2048 - 1980 44 3072 - 1981 103 2048 - 1982 44 512 - 1983 40 3072 - 1984 22 3072 - 1985 53 16384 - 1986 91 2048 - 1987 72 4096 - 1988 80 16384 - 1989 35 4096 - 1990 47 512 - 1991 104 24576 - 1992 65 1024 - 1993 64 6144 - 1994 76 4096 - 1995 49 3072 - 1996 92 2048 - 1997 93 3072 - 1998 108 12288 - 1999 43 3072 - 2000 16 6144 - 2001 45 512 - 2002 119 16384 - 2003 66 6144 - 2004 93 4096 - 2005 43 4096 - 2006 46 16384 - 2007 70 6144 - 2008 45 8192 - 2009 6 2048 - 2010 126 4096 - 2011 101 2048 - 2012 117 12288 - 2013 127 12288 - 2014 47 4096 - 2015 3 2048 - 2016 42 2048 - 2017 114 6144 - 2018 76 1024 - 2019 72 2048 - 2020 32 2048 - 2021 20 4096 - 2022 80 2048 - 2023 40 1024 - 2024 44 1024 - 2025 47 3072 - 2026 56 512 - 2027 31 4096 - 2028 27 6144 - 2029 19 1536 - 2030 54 13824 - 2031 86 4096 - 2032 48 18432 - 2033 52 3072 - 2034 65 4096 - 2035 47 6144 - 2036 100 1536 - 2037 2 12288 - 2038 5 4096 - 2039 75 24576 - 2040 56 1024 - 2041 92 18432 - 2042 35 2048 - 2043 82 12288 - 2044 126 6144 - 2045 89 2048 - 2046 20 1536 - 2047 93 4096 - 2048 31 4096 - 2049 87 1536 - 2050 17 4096 - 2051 108 2048 - 2052 34 8192 - 2053 51 4096 - 2054 21 512 - 2055 125 6144 - 2056 102 6144 - 2057 117 3072 - 2058 106 3072 - 2059 41 6144 - 2060 39 1024 - 2061 51 12288 - 2062 40 1024 - 2063 24 6144 - 2064 83 4096 - 2065 23 6144 - 2066 97 2048 - 2067 42 2048 - 2068 98 9216 - 2069 78 16384 - 2070 13 8192 - 2071 113 3072 - 2072 27 12288 - 2073 88 1536 - 2074 86 13824 - 2075 118 12288 - 2076 68 12288 - 2077 3 512 - 2078 97 9216 - 2079 37 4096 - 2080 12 1024 - 2081 35 32768 - 2082 113 9216 - 2083 55 1024 - 2084 84 4608 - 2085 126 2048 - 2086 60 6144 - 2087 93 9216 - 2088 6 2048 - 2089 15 8192 - 2090 43 2048 - 2091 3 16384 - 2092 43 512 - 2093 19 16384 - 2094 23 8192 - 2095 42 512 - 2096 115 6144 - 2097 79 16384 - 2098 5 13824 - 2099 115 4096 - 2100 54 4608 - 2101 64 24576 - 2102 58 8192 - 2103 69 8192 - 2104 120 6144 - 2105 63 12288 - 2106 112 12288 - 2107 64 12288 - 2108 83 12288 - 2109 0 18432 - 2110 111 16384 - 2111 8 16384 - 2112 89 16384 - 2113 85 16384 - 2114 96 16384 - 2115 114 24576 - 2116 124 12288 - 2117 21 9216 - 2118 95 9216 - 2119 125 12288 - 2120 33 9216 - 2121 32 9216 - 2122 27 13824 - 2123 116 13824 - 2124 72 9216 - 2125 62 6144 - 2126 71 6144 - 2127 31 8192 - 2128 30 12288 - 2129 110 9216 - 2130 24 16384 - 2131 43 16384 - 2132 76 12288 - 2133 48 24576 - 2134 33 12288 - 2135 26 16384 - 2136 77 18432 - 2137 75 16384 - 2138 94 12288 - 2139 15 24576 - 2140 8 18432 - 2141 53 12288 - 2142 98 4608 - 2143 71 4096 - 2144 38 3072 - 2145 21 3072 - 2146 93 18432 - 2147 109 18432 - 2148 82 18432 - 2149 47 12288 - 2150 15 12288 - 2151 65 8192 - 2152 0 16384 - 2153 97 24576 - 2154 127 16384 - 2155 39 32768 - 2156 120 32768 - 2157 14 32768 - 2158 3 32768 - 2159 40 16384 - 2160 11 24576 - 2161 74 4096 - 2162 43 12288 - 2163 57 12288 - 2164 57 13824 - 2165 34 12288 - 2166 58 12288 - 2167 78 12288 - 2168 87 12288 - 2169 111 12288 - 2170 27 9216 - 2171 60 9216 - 2172 13 12288 - 2173 1 12288 - 2174 13 12288 - 2175 19 12288 - 2176 115 9216 - 2177 23 12288 - 2178 119 12288 - 2179 110 24576 - 2180 25 16384 - 2181 78 24576 - 2182 26 3072 - 2183 52 12288 - 2184 65 12288 - 2185 69 12288 - 2186 5 32768 - 2187 16 4096 - 2188 61 13824 - 2189 61 4096 - 2190 78 16384 - 2191 116 32768 - 2192 101 16384 - 2193 23 24576 - 2194 47 24576 - 2195 113 8192 - 2196 42 12288 - 2197 42 16384 - 2198 78 12288 - 2199 8 12288 - 2200 73 12288 - 2201 85 12288 - 2202 51 9216 - 2203 14 9216 - 2204 45 16384 - 2205 16 18432 - 2206 18 24576 - 2207 89 18432 - 2208 106 16384 - 2209 113 16384 - 2210 76 12288 - 2211 104 12288 - 2212 75 18432 - 2213 116 18432 - 2214 84 24576 - 2215 27 24576 - 2216 67 12288 - 2217 71 9216 - 2218 14 4096 - 2219 123 4096 - 2220 20 3072 - 2221 52 3072 - 2222 29 24576 - 2223 98 16384 - 2224 21 24576 - 2225 127 12288 - 2226 8 13824 - 2227 21 4608 - 2228 94 9216 - 2229 79 12288 - 2230 33 8192 - 2231 112 4096 - 2232 95 8192 - 2233 46 6144 - 2234 32 8192 - 2235 41 9216 - 2236 85 9216 - 2237 19 18432 - 2238 10 16384 - 2239 78 24576 - 2240 97 18432 - 2241 104 18432 - 2242 82 16384 - 2243 108 12288 - 2244 110 6144 - 2245 18 6144 - 2246 30 6144 - 2247 88 8192 - 2248 62 32768 - 2249 51 24576 - 2250 0 12288 - 2251 75 12288 - 2252 2 12288 - 2253 49 9216 - 2254 15 12288 - 2255 18 18432 - 2256 25 8192 - 2257 38 8192 - 2258 21 18432 - 2259 6 12288 - 2260 19 32768 - 2261 45 24576 - 2262 45 24576 - 2263 8 9216 - 2264 116 9216 - 2265 93 18432 - 2266 26 18432 - 2267 64 6144 - 2268 124 6144 - 2269 40 12288 - 2270 2 12288 - 2271 42 12288 - 2272 38 12288 - 2273 101 12288 - 2274 90 12288 - 2275 121 12288 - 2276 18 9216 - 2277 66 24576 - 2278 120 16384 - 2279 68 16384 - 2280 44 16384 - 2281 102 16384 - 2282 127 32768 - 2283 4 32768 - 2284 68 32768 - 2285 70 6144 - 2286 15 4096 - 2287 87 18432 - 2288 11 12288 - 2289 78 24576 - 2290 7 9216 - 2291 74 12288 - 2292 105 12288 - 2293 50 3072 - 2294 88 13824 - 2295 64 18432 - 2296 58 6144 - 2297 122 6144 - 2298 75 8192 - 2299 59 16384 - 2300 55 16384 - 2301 53 3072 - 2302 63 18432 - 2303 66 16384 - 2304 102 18432 - 2305 107 12288 - 2306 120 9216 - 2307 17 9216 - 2308 19 12288 - 2309 89 12288 - 2310 125 4096 - 2311 114 6144 - 2312 118 6144 - 2313 69 6144 - 2314 127 8192 - 2315 84 8192 - 2316 97 4608 - 2317 22 4608 - 2318 59 6144 - 2319 101 8192 - 2320 122 12288 - 2321 82 8192 - 2322 90 8192 - 2323 66 12288 - 2324 10 12288 - 2325 22 8192 - 2326 46 12288 - 2327 98 13824 - 2328 62 12288 - 2329 70 12288 - 2330 55 12288 - 2331 32 18432 - 2332 10 18432 - 2333 103 13824 - 2334 29 8192 - 2335 21 8192 - 2336 58 24576 - 2337 37 3072 - 2338 33 13824 - 2339 13 6144 - 2340 39 6144 - 2341 107 8192 - 2342 117 8192 - 2343 60 12288 - 2344 109 12288 - 2345 66 13824 - 2346 15 9216 - 2347 23 24576 - 2348 75 32768 - 2349 7 3072 - 2350 41 3072 - 2351 91 8192 - 2352 99 8192 - 2353 86 32768 - 2354 57 16384 - 2355 11 16384 - 2356 71 18432 - 2357 113 18432 - 2358 37 24576 - 2359 57 24576 - 2360 31 24576 - 2361 90 24576 - 2362 73 24576 - 2363 8 24576 - 2364 62 24576 - 2365 34 24576 - 2366 126 24576 - 2367 70 24576 - 2368 104 18432 - 2369 119 18432 - 2370 88 12288 - 2371 48 12288 - 2372 45 12288 - 2373 54 12288 - 2374 32 12288 - 2375 5 12288 - 2376 21 12288 - 2377 95 24576 - 2378 38 32768 - 2379 5 24576 - 2380 8 3072 - 2381 76 24576 - 2382 18 18432 - 2383 127 18432 - 2384 77 18432 - 2385 125 18432 - 2386 126 6144 - 2387 39 12288 - 2388 95 12288 - 2389 20 6144 - 2390 99 4608 - 2391 120 12288 - 2392 105 16384 - 2393 16 12288 - 2394 109 13824 - 2395 123 9216 - 2396 74 13824 - 2397 118 9216 - 2398 124 24576 - 2399 39 16384 - 2400 100 16384 - 2401 0 8192 - 2402 105 8192 - 2403 119 16384 - 2404 11 12288 - 2405 119 12288 - 2406 9 6144 - 2407 8 18432 - 2408 28 16384 - 2409 57 6144 - 2410 6 8192 - 2411 65 6144 - 2412 112 16384 - 2413 2 16384 - 2414 27 16384 - 2415 59 16384 - 2416 23 9216 - 2417 68 4096 - 2418 108 18432 - 2419 87 9216 - 2420 72 6144 - 2421 38 6144 - 2422 15 24576 - 2423 71 18432 - 2424 52 18432 - 2425 46 13824 - 2426 88 6144 - 2427 54 6144 - 2428 92 8192 - 2429 10 16384 - 2430 28 16384 - 2431 80 12288 - 2432 102 12288 - 2433 60 12288 - 2434 105 24576 - 2435 26 12288 - 2436 51 12288 - 2437 79 24576 - 2438 47 9216 - 2439 91 12288 - 2440 100 32768 - 2441 2 32768 - 2442 11 32768 - 2443 29 32768 - 2444 101 32768 - 2445 109 9216 - 2446 54 9216 - 2447 23 16384 - 2448 2 8192 - 2449 62 16384 - 2450 63 24576 - 2451 76 6144 - 2452 64 16384 - 2453 95 18432 - 2454 18 3072 - 2455 4 8192 - 2456 42 8192 - 2457 67 8192 - 2458 78 8192 - 2459 46 8192 - 2460 43 16384 - 2461 120 12288 - 2462 100 24576 - 2463 115 16384 - 2464 37 12288 - 2465 125 12288 - 2466 96 24576 - 2467 67 24576 - 2468 74 18432 - 2469 121 18432 - 2470 12 24576 - 2471 118 12288 - 2472 39 24576 - 2473 47 24576 - 2474 45 24576 - 2475 26 24576 - 2476 6 4608 - 2477 14 16384 - 2478 42 24576 - 2479 99 24576 - 2480 67 9216 - 2481 10 13824 - 2482 48 6144 - 2483 52 12288 - 2484 81 16384 - 2485 22 24576 - 2486 104 9216 - 2487 1 9216 - 2488 72 13824 - 2489 51 2048 - 2490 111 9216 - 2491 20 13824 - 2492 68 12288 - 2493 27 12288 - 2494 120 24576 - 2495 108 9216 - 2496 106 8192 - 2497 63 12288 - 2498 64 16384 - 2499 17 16384 - 2500 119 18432 - 2501 24 4096 - 2502 64 12288 - 2503 49 12288 - 2504 8 16384 - 2505 81 24576 - 2506 7 12288 - 2507 22 9216 - 2508 114 12288 - 2509 80 9216 - 2510 115 18432 - 2511 3 9216 - 2512 26 9216 - 2513 3 9216 - 2514 35 6144 - 2515 108 8192 - 2516 4 6144 - 2517 98 12288 - 2518 1 8192 - 2519 32 12288 - 2520 84 32768 - 2521 40 9216 - 2522 76 9216 - 2523 22 9216 - 2524 106 24576 - 2525 25 24576 - 2526 79 9216 - 2527 90 18432 - 2528 71 12288 - 2529 108 24576 - 2530 59 24576 - 2531 36 24576 - 2532 30 12288 - 2533 111 8192 - 2534 75 9216 - 2535 17 12288 - 2536 69 12288 - 2537 34 13824 - 2538 100 12288 - 2539 42 16384 - 2540 38 16384 - 2541 93 13824 - 2542 58 12288 - 2543 17 13824 - 2544 34 12288 - 2545 43 12288 - 2546 5 24576 - 2547 29 18432 - 2548 81 16384 - 2549 99 16384 - 2550 118 16384 - 2551 104 16384 - 2552 96 9216 - 2553 75 12288 - 2554 44 8192 - 2555 117 6144 - 2556 105 6144 - 2557 124 13824 - 2558 78 18432 - 2559 29 12288 - 2560 36 8192 - 2561 27 8192 - 2562 14 8192 - 2563 64 8192 - 2564 115 8192 - 2565 105 9216 - 2566 93 9216 - 2567 94 9216 - 2568 14 16384 - 2569 80 18432 - 2570 3 16384 - 2571 1 16384 - 2572 25 18432 - 2573 35 9216 - 2574 82 9216 - 2575 124 8192 - 2576 6 6144 - 2577 96 6144 - 2578 124 16384 - 2579 106 16384 - 2580 49 16384 - 2581 19 16384 - 2582 123 3072 - 2583 112 18432 - 2584 2 24576 - 2585 65 24576 - 2586 65 12288 - 2587 11 9216 - 2588 29 9216 - 2589 30 13824 - 2590 57 12288 - 2591 61 12288 - 2592 9 12288 - 2593 5 12288 - 2594 86 16384 - 2595 99 12288 - 2596 18 16384 - 2597 79 24576 - 2598 71 12288 - 2599 89 24576 - 2600 86 18432 - 2601 51 16384 - 2602 89 12288 - 2603 93 32768 - 2604 117 9216 - 2605 6 9216 - 2606 62 12288 - 2607 79 12288 - 2608 52 24576 - 2609 118 24576 - 2610 12 24576 - 2611 18 24576 - 2612 105 18432 - 2613 37 18432 - 2614 82 12288 - 2615 56 12288 - 2616 69 18432 - 2617 46 18432 - 2618 113 32768 - 2619 103 18432 - 2620 109 32768 - 2621 121 32768 - 2622 73 12288 - 2623 73 24576 - 2624 80 24576 - 2625 11 24576 - 2626 5 18432 - 2627 100 18432 - 2628 71 32768 - 2629 106 32768 - 2630 106 12288 - 2631 85 16384 - 2632 6 24576 - 2633 69 16384 - 2634 52 16384 - 2635 83 18432 - 2636 57 24576 - 2637 0 4608 - 2638 67 12288 - 2639 63 18432 - 2640 10 1536 - 2641 108 12288 - 2642 117 12288 - 2643 11 24576 - 2644 44 12288 - 2645 108 16384 - 2646 74 16384 - 2647 90 12288 - 2648 53 12288 - 2649 71 8192 - 2650 96 8192 - 2651 42 6144 - 2652 56 6144 - 2653 54 8192 - 2654 67 6144 - 2655 119 6144 - 2656 125 18432 - 2657 20 24576 - 2658 72 18432 - 2659 91 12288 - 2660 106 12288 - 2661 92 9216 - 2662 1 9216 - 2663 125 9216 - 2664 22 24576 - 2665 89 9216 - 2666 77 9216 - 2667 1 6144 - 2668 90 6144 - 2669 80 32768 - 2670 5 16384 - 2671 19 6144 - 2672 11 6144 - 2673 77 6144 - 2674 81 8192 - 2675 69 12288 - 2676 40 16384 - 2677 94 8192 - 2678 7 12288 - 2679 68 13824 - 2680 81 12288 - 2681 61 12288 - 2682 60 13824 - 2683 53 32768 - 2684 6 12288 - 2685 33 18432 - 2686 118 18432 - 2687 80 12288 - 2688 4 9216 - 2689 34 24576 - 2690 84 18432 - 2691 20 18432 - 2692 26 12288 - 2693 73 24576 - 2694 69 24576 - 2695 94 13824 - 2696 22 12288 - 2697 42 9216 - 2698 106 9216 - 2699 76 12288 - 2700 30 16384 - 2701 36 9216 - 2702 100 12288 - 2703 61 8192 - 2704 12 9216 - 2705 73 12288 - 2706 96 12288 - 2707 55 3072 - 2708 77 24576 - 2709 38 12288 - 2710 118 16384 - 2711 102 8192 - 2712 52 18432 - 2713 81 13824 - 2714 10 9216 - 2715 36 18432 - 2716 81 24576 - 2717 17 12288 - 2718 17 12288 - 2719 66 9216 - 2720 84 12288 - 2721 14 18432 - 2722 41 18432 - 2723 6 18432 - 2724 29 18432 - 2725 107 32768 - 2726 24 12288 - 2727 82 9216 - 2728 122 9216 - 2729 102 13824 - 2730 71 13824 - 2731 40 4096 - 2732 112 13824 - 2733 4 12288 - 2734 46 9216 - 2735 70 9216 - 2736 122 12288 - 2737 28 12288 - 2738 85 8192 - 2739 79 4608 - 2740 80 12288 - 2741 55 9216 - 2742 67 12288 - 2743 99 24576 - 2744 34 24576 - 2745 41 24576 - 2746 110 13824 - 2747 73 16384 - 2748 91 18432 - 2749 106 18432 - 2750 23 9216 - 2751 37 8192 - 2752 95 9216 - 2753 79 18432 - 2754 47 16384 - 2755 101 6144 - 2756 13 6144 - 2757 59 6144 - 2758 114 9216 - 2759 15 6144 - 2760 51 6144 - 2761 53 6144 - 2762 29 16384 - 2763 17 12288 - 2764 92 18432 - 2765 34 6144 - 2766 110 6144 - 2767 13 8192 - 2768 107 16384 - 2769 21 9216 - 2770 97 9216 - 2771 63 16384 - 2772 59 24576 - 2773 33 24576 - 2774 10 8192 - 2775 34 8192 - 2776 97 12288 - 2777 99 16384 - 2778 7 8192 - 2779 29 12288 - 2780 12 12288 - 2781 62 8192 - 2782 32 24576 - 2783 121 24576 - 2784 12 24576 - 2785 10 12288 - 2786 47 24576 - 2787 66 12288 - 2788 50 32768 - 2789 121 16384 - 2790 59 18432 - 2791 3 12288 - 2792 46 12288 - 2793 44 24576 - 2794 114 32768 - 2795 13 16384 - 2796 111 18432 - 2797 23 6144 - 2798 47 18432 - 2799 16 16384 - 2800 62 16384 - 2801 4 16384 - 2802 87 16384 - 2803 114 16384 - 2804 16 16384 - 2805 44 12288 - 2806 116 12288 - 2807 124 24576 - 2808 31 13824 - 2809 1 24576 - 2810 63 6144 - 2811 31 18432 - 2812 98 12288 - 2813 113 12288 - 2814 121 3072 - 2815 109 3072 - 2816 109 12288 - 2817 9 12288 - 2818 86 12288 - 2819 48 13824 - 2820 120 18432 - 2821 36 16384 - 2822 109 12288 - 2823 101 18432 - 2824 93 12288 - 2825 14 24576 - 2826 25 12288 - 2827 70 13824 - 2828 112 3072 - 2829 59 12288 - 2830 123 12288 - 2831 33 9216 - 2832 63 9216 - 2833 14 9216 - 2834 48 9216 - 2835 68 9216 - 2836 20 12288 - 2837 127 24576 - 2838 70 24576 - 2839 72 32768 - 2840 14 12288 - 2841 105 12288 - 2842 103 18432 - 2843 9 12288 - 2844 123 13824 - 2845 48 12288 - 2846 14 12288 - 2847 32 13824 - 2848 53 13824 - 2849 76 16384 - 2850 12 16384 - 2851 16 24576 - 2852 36 24576 - 2853 33 12288 - 2854 50 16384 - 2855 30 12288 - 2856 81 12288 - 2857 0 24576 - 2858 122 16384 - 2859 78 4608 - 2860 67 4608 - 2861 123 24576 - 2862 90 12288 - 2863 29 12288 - 2864 11 12288 - 2865 25 12288 - 2866 123 16384 - 2867 25 24576 - 2868 50 6144 - 2869 6 4096 - 2870 96 24576 - 2871 69 16384 - 2872 79 12288 - 2873 37 9216 - 2874 114 8192 - 2875 110 8192 - 2876 102 12288 - 2877 89 12288 - 2878 53 12288 - 2879 77 12288 - 2880 84 12288 - 2881 3 12288 - 2882 94 12288 - 2883 99 12288 - 2884 60 12288 - 2885 78 12288 - 2886 102 24576 - 2887 52 24576 - 2888 85 24576 - 2889 24 24576 - 2890 71 24576 - 2891 75 18432 - 2892 69 18432 - 2893 46 9216 - 2894 7 6144 - 2895 116 6144 - 2896 94 18432 - 2897 102 18432 - 2898 125 16384 - 2899 49 16384 - 2900 63 9216 - 2901 74 18432 - 2902 102 32768 - 2903 97 16384 - 2904 84 18432 - 2905 71 24576 - 2906 41 16384 - 2907 24 16384 - 2908 19 18432 - 2909 28 9216 - 2910 119 12288 - 2911 50 24576 - 2912 104 32768 - 2913 8 2048 - 2914 110 12288 - 2915 71 16384 - 2916 114 16384 - 2917 58 16384 - 2918 59 8192 - 2919 48 24576 - 2920 124 12288 - 2921 92 9216 - 2922 94 16384 - 2923 68 16384 - 2924 126 8192 - 2925 106 8192 - 2926 67 24576 - 2927 101 4096 - 2928 8 12288 - 2929 64 32768 - 2930 15 18432 - 2931 41 24576 - 2932 13 18432 - 2933 28 6144 - 2934 29 24576 - 2935 2 4096 - 2936 89 4096 - 2937 112 6144 - 2938 14 6144 - 2939 105 8192 - 2940 42 4096 - 2941 3 4096 - 2942 46 24576 - 2943 125 12288 - 2944 22 24576 - 2945 92 24576 - 2946 80 4096 - 2947 51 12288 - 2948 81 9216 - 2949 27 12288 - 2950 46 16384 - 2951 16 12288 - 2952 37 12288 - 2953 102 12288 - 2954 66 18432 - 2955 88 18432 - 2956 94 12288 - 2957 118 12288 - 2958 100 9216 - 2959 35 9216 - 2960 14 24576 - 2961 5 3072 - 2962 68 24576 - 2963 56 9216 - 2964 125 9216 - 2965 24 13824 - 2966 48 12288 - 2967 52 13824 - 2968 42 4608 - 2969 41 12288 - 2970 36 16384 - 2971 55 16384 - 2972 9 18432 - 2973 12 12288 - 2974 15 8192 - 2975 109 12288 - 2976 124 6144 - 2977 69 6144 - 2978 124 18432 - 2979 76 32768 - 2980 49 9216 - 2981 18 12288 - 2982 38 24576 - 2983 11 1536 - 2984 93 24576 - 2985 27 18432 - 2986 115 12288 - 2987 51 18432 - 2988 83 12288 - 2989 58 13824 - 2990 18 9216 - 2991 78 9216 - 2992 115 18432 - 2993 84 8192 - 2994 89 4608 - 2995 16 24576 - 2996 5 16384 - 2997 119 8192 - 2998 116 9216 - 2999 38 12288 - 3000 58 6144 - 3001 127 9216 - 3002 93 1536 - 3003 102 18432 - 3004 116 18432 - 3005 119 24576 - 3006 18 16384 - 3007 32 4608 - 3008 59 3072 - 3009 87 24576 - 3010 69 24576 - 3011 87 3072 - 3012 103 24576 - 3013 118 6144 - 3014 90 4608 - 3015 20 24576 - 3016 97 24576 - 3017 117 24576 - 3018 8 9216 - 3019 61 9216 - 3020 25 16384 - 3021 56 16384 - 3022 93 16384 - 3023 35 16384 - 3024 91 16384 - 3025 105 16384 - 3026 38 16384 - 3027 92 16384 - 3028 105 24576 - 3029 45 6144 - 3030 72 6144 - 3031 47 9216 - 3032 111 16384 - 3033 36 24576 - 3034 43 9216 - 3035 96 8192 - 3036 31 8192 - 3037 21 4096 - 3038 96 18432 - 3039 43 12288 - 3040 34 12288 - 3041 122 24576 - 3042 119 24576 - 3043 9 8192 - 3044 57 8192 - 3045 52 6144 - 3046 65 8192 - 3047 58 12288 - 3048 51 3072 - 3049 47 6144 - 3050 36 1536 - 3051 64 2048 - 3052 109 6144 - 3053 5 8192 - 3054 16 9216 - 3055 35 18432 - 3056 93 4096 - 3057 54 4096 - 3058 52 4096 - 3059 72 4096 - 3060 47 4096 - 3061 44 4096 - 3062 17 3072 - 3063 65 3072 - 3064 44 8192 - 3065 47 8192 - 3066 111 8192 - 3067 87 8192 - 3068 80 8192 - 3069 116 8192 - 3070 25 8192 - 3071 69 8192 - 3072 3 8192 - 3073 52 8192 - 3074 40 8192 - 3075 39 8192 - 3076 22 8192 - 3077 123 8192 - 3078 122 2048 - 3079 84 24576 - 3080 26 8192 - 3081 13 24576 - 3082 121 24576 - 3083 105 1536 - 3084 62 18432 - 3085 11 16384 - 3086 88 9216 - 3087 88 3072 - 3088 31 6144 - 3089 15 2048 - 3090 52 1536 - 3091 73 1536 - 3092 9 6144 - 3093 31 4096 - 3094 109 4096 - 3095 90 4096 - 3096 23 4096 - 3097 24 4096 - 3098 121 4096 - 3099 123 12288 - 3100 76 8192 - 3101 8 8192 - 3102 63 8192 - 3103 5 6144 - 3104 85 4096 - 3105 41 4096 - 3106 15 12288 - 3107 69 9216 - 3108 19 4608 - 3109 30 9216 - 3110 82 1536 - 3111 75 1536 - 3112 53 8192 - 3113 25 3072 - 3114 26 32768 - 3115 104 12288 - 3116 38 8192 - 3117 103 4608 - 3118 61 18432 - 3119 99 12288 - 3120 111 12288 - 3121 101 12288 - 3122 120 13824 - 3123 75 8192 - 3124 79 6144 - 3125 33 32768 - 3126 93 12288 - 3127 93 6144 - 3128 84 3072 - 3129 83 4096 - 3130 11 12288 - 3131 98 3072 - 3132 53 4096 - 3133 90 16384 - 3134 96 3072 - 3135 77 32768 - 3136 97 6144 - 3137 7 16384 - 3138 0 16384 - 3139 54 16384 - 3140 89 16384 - 3141 38 24576 - 3142 61 24576 - 3143 91 24576 - 3144 53 24576 - 3145 83 24576 - 3146 24 12288 - 3147 119 9216 - 3148 52 9216 - 3149 48 13824 - 3150 85 12288 - 3151 65 9216 - 3152 59 9216 - 3153 21 13824 - 3154 51 18432 - 3155 63 13824 - 3156 32 13824 - 3157 13 9216 - 3158 77 12288 - 3159 114 12288 - 3160 125 32768 - 3161 54 24576 - 3162 53 24576 - 3163 107 24576 - 3164 58 24576 - 3165 43 6144 - 3166 113 4608 - 3167 33 4608 - 3168 88 32768 - 3169 16 32768 - 3170 44 32768 - 3171 85 32768 - 3172 66 32768 - 3173 42 18432 - 3174 105 18432 - 3175 56 18432 - 3176 79 18432 - 3177 30 18432 - 3178 38 18432 - 3179 18 13824 - 3180 62 13824 - 3181 28 18432 - 3182 11 18432 - 3183 77 16384 - 3184 101 16384 - 3185 127 16384 - 3186 15 16384 - 3187 84 16384 - 3188 87 16384 - 3189 35 16384 - 3190 15 16384 - 3191 21 16384 - 3192 117 16384 - 3193 79 12288 - 3194 59 12288 - 3195 92 12288 - 3196 37 12288 - 3197 6 24576 - 3198 100 24576 - 3199 9 24576 - 3200 80 24576 - 3201 61 32768 - 3202 70 32768 - 3203 76 12288 - 3204 83 16384 - 3205 92 24576 - 3206 66 24576 - 3207 92 24576 - 3208 19 24576 - 3209 115 24576 - 3210 59 24576 - 3211 93 24576 - 3212 60 18432 - 3213 32 18432 - 3214 123 24576 - 3215 43 24576 - 3216 63 32768 - 3217 116 18432 - 3218 75 4608 - 3219 95 32768 - 3220 17 18432 - 3221 37 18432 - 3222 90 12288 - 3223 120 16384 - 3224 108 12288 - 3225 66 16384 - 3226 127 12288 - 3227 48 24576 - 3228 111 24576 - 3229 7 18432 - 3230 124 16384 - 3231 59 12288 - 3232 104 24576 - 3233 13 24576 - 3234 9 18432 - 3235 37 13824 - 3236 91 12288 - 3237 50 12288 - 3238 65 12288 - 3239 68 12288 - 3240 89 12288 - 3241 101 12288 - 3242 3 12288 - 3243 35 12288 - 3244 127 12288 - 3245 61 12288 - 3246 52 12288 - 3247 45 12288 - 3248 40 12288 - 3249 0 12288 - 3250 98 24576 - 3251 127 24576 - 3252 44 24576 - 3253 44 24576 - 3254 0 24576 - 3255 111 24576 - 3256 30 32768 - 3257 90 32768 - 3258 48 32768 - 3259 0 32768 - 3260 67 32768 - 3261 111 32768 - 3262 117 9216 - 3263 22 12288 - 3264 6 12288 - 3265 41 32768 - 3266 49 24576 - 3267 40 24576 - 3268 85 18432 - 3269 81 18432 - 3270 33 12288 - 3271 56 12288 - 3272 90 6144 - 3273 121 9216 - 3274 100 12288 - 3275 102 12288 - 3276 114 12288 - 3277 110 12288 - 3278 35 12288 - 3279 8 18432 - 3280 2 12288 - 3281 82 12288 - 3282 58 18432 - 3283 9 16384 - 3284 97 24576 - 3285 26 16384 - 3286 32 9216 - 3287 0 12288 - 3288 96 12288 - 3289 67 12288 - 3290 69 12288 - 3291 26 18432 - 3292 35 4608 - 3293 34 16384 - 3294 55 32768 - 3295 6 32768 - 3296 31 24576 - 3297 52 24576 - 3298 107 24576 - 3299 91 24576 - 3300 64 24576 - 3301 20 24576 - 3302 111 24576 - 3303 13 24576 - 3304 116 24576 - 3305 30 24576 - 3306 90 24576 - 3307 86 24576 - 3308 39 24576 - 3309 75 24576 - 3310 76 24576 - 3311 46 24576 - 3312 58 24576 - 3313 112 24576 - 3314 99 24576 - 3315 88 24576 - 3316 113 24576 - 3317 80 24576 - 3318 116 24576 - 3319 88 24576 - 3320 7 24576 - 3321 3 24576 - 3322 72 24576 - 3323 101 24576 - 3324 118 24576 - 3325 72 24576 - 3326 83 32768 - 3327 42 24576 - 3328 89 24576 - 3329 65 18432 - 3330 42 18432 - 3331 48 18432 - 3332 126 18432 - 3333 22 18432 - 3334 54 32768 - 3335 60 16384 - 3336 6 16384 - 3337 112 16384 - 3338 74 16384 - 3339 26 24576 - 3340 66 24576 - 3341 53 12288 - 3342 0 9216 - 3343 7 12288 - 3344 24 32768 - 3345 25 9216 - 3346 74 24576 - 3347 55 24576 - 3348 60 24576 - 3349 109 24576 - 3350 121 18432 - 3351 43 13824 - 3352 10 16384 - 3353 66 16384 - 3354 50 16384 - 3355 48 16384 - 3356 65 16384 - 3357 62 16384 - 3358 23 16384 - 3359 1 32768 - 3360 125 24576 - 3361 34 24576 - 3362 87 24576 - 3363 108 24576 - 3364 22 32768 - 3365 24 24576 - 3366 38 24576 - 3367 40 32768 - 3368 4 24576 - 3369 27 24576 - 3370 44 16384 - 3371 49 13824 - 3372 87 13824 - 3373 47 18432 - 3374 81 18432 - 3375 12 12288 - 3376 49 18432 - 3377 2 16384 - 3378 40 24576 - 3379 114 24576 - 3380 98 18432 - 3381 98 24576 - 3382 78 18432 - 3383 110 18432 - 3384 21 18432 - 3385 97 18432 - 3386 27 12288 - 3387 64 9216 - 3388 0 12288 - 3389 13 12288 - 3390 11 18432 - 3391 15 12288 - 3392 126 13824 - 3393 125 16384 - 3394 95 18432 - 3395 103 12288 - 3396 37 18432 - 3397 79 16384 - 3398 44 18432 - 3399 92 16384 - 3400 63 18432 - 3401 98 32768 - 3402 65 18432 - 3403 60 18432 - 3404 49 18432 - 3405 79 24576 - 3406 82 32768 - 3407 65 32768 - 3408 49 18432 - 3409 95 12288 - 3410 75 9216 - 3411 27 9216 - 3412 110 16384 - 3413 88 12288 - 3414 31 12288 - 3415 126 24576 - 3416 103 13824 - 3417 103 24576 - 3418 51 13824 - 3419 39 12288 - 3420 78 9216 - 3421 39 9216 - 3422 126 12288 - 3423 40 9216 - 3424 38 9216 - 3425 57 32768 - 3426 46 32768 - 3427 42 32768 - 3428 7 32768 - 3429 72 12288 - 3430 88 12288 - 3431 71 18432 - 3432 95 13824 - 3433 122 13824 - 3434 30 24576 - 3435 28 24576 - 3436 113 24576 - 3437 98 24576 - 3438 55 24576 - 3439 3 24576 - 3440 105 24576 - 3441 7 24576 - 3442 49 24576 - 3443 63 24576 - 3444 2 9216 - 3445 115 12288 - 3446 36 12288 - 3447 38 9216 - 3448 15 24576 - 3449 35 24576 - 3450 99 18432 - 3451 99 18432 - 3452 28 12288 - 3453 31 12288 - 3454 49 12288 - 3455 61 12288 - 3456 12 13824 - 3457 59 9216 - 3458 79 32768 - 3459 19 24576 - 3460 121 18432 - 3461 53 18432 - 3462 56 24576 - 3463 64 18432 - 3464 17 18432 - 3465 15 13824 - 3466 97 13824 - 3467 26 12288 - 3468 31 12288 - 3469 69 24576 - 3470 113 18432 - 3471 29 12288 - 3472 122 16384 - 3473 4 16384 - 3474 67 18432 - 3475 96 18432 - 3476 46 24576 - 3477 117 12288 - 3478 90 16384 - 3479 65 24576 - 3480 10 24576 - 3481 67 18432 - 3482 2 18432 - 3483 108 18432 - 3484 27 18432 - 3485 1 18432 - 3486 47 13824 - 3487 100 18432 - 3488 55 13824 - 3489 72 13824 - 3490 29 16384 - 3491 72 18432 - 3492 105 32768 - 3493 115 32768 - 3494 21 24576 - 3495 112 12288 - 3496 9 13824 - 3497 113 12288 - 3498 105 9216 - 3499 88 9216 - 3500 93 9216 - 3501 45 9216 - 3502 33 9216 - 3503 72 9216 - 3504 23 24576 - 3505 91 9216 - 3506 81 12288 - 3507 106 12288 - 3508 31 13824 - 3509 47 16384 - 3510 65 16384 - 3511 13 16384 - 3512 55 18432 - 3513 30 12288 - 3514 42 12288 - 3515 70 24576 - 3516 113 24576 - 3517 77 24576 - 3518 8 24576 - 3519 21 24576 - 3520 17 32768 - 3521 56 24576 - 3522 83 18432 - 3523 12 16384 - 3524 121 16384 - 3525 34 18432 - 3526 82 18432 - 3527 123 18432 - 3528 15 24576 - 3529 20 24576 - 3530 45 13824 - 3531 112 18432 - 3532 27 32768 - 3533 49 32768 - 3534 110 18432 - 3535 118 18432 - 3536 16 18432 - 3537 14 18432 - 3538 122 32768 - 3539 89 32768 - 3540 122 24576 - 3541 74 32768 - 3542 109 24576 - 3543 17 24576 - 3544 102 16384 - 3545 120 12288 - 3546 63 12288 - 3547 42 24576 - 3548 60 24576 - 3549 92 32768 - 3550 108 24576 - 3551 110 16384 - 3552 85 12288 - 3553 18 12288 - 3554 43 18432 - 3555 61 16384 - 3556 6 16384 - 3557 62 24576 - 3558 87 24576 - 3559 47 24576 - 3560 29 24576 - 3561 9 24576 - 3562 101 24576 - 3563 82 24576 - 3564 4 24576 - 3565 36 9216 - 3566 19 9216 - 3567 9 32768 - 3568 8 32768 - 3569 117 18432 - 3570 110 32768 - 3571 21 32768 - 3572 70 16384 - 3573 116 16384 - 3574 84 16384 - 3575 35 18432 - 3576 108 32768 - 3577 17 16384 - 3578 70 16384 - 3579 6 9216 - 3580 113 12288 - 3581 66 12288 - 3582 19 24576 - 3583 110 18432 - 3584 50 16384 - 3585 35 12288 - 3586 105 12288 - 3587 53 18432 - 3588 56 24576 - 3589 108 9216 - 3590 112 18432 - 3591 51 24576 - 3592 93 13824 - 3593 56 12288 - 3594 80 16384 - 3595 91 18432 - 3596 121 13824 - 3597 28 24576 - 3598 106 24576 - 3599 83 24576 - 3600 90 24576 - 3601 123 24576 - 3602 106 24576 - 3603 110 24576 - 3604 82 24576 - 3605 9 9216 - 3606 57 9216 - 3607 89 24576 - 3608 111 18432 - 3609 122 24576 - 3610 61 24576 - 3611 22 12288 - 3612 81 12288 - 3613 1 16384 - 3614 118 12288 - 3615 61 6144 - 3616 104 6144 - 3617 126 6144 - 3618 23 12288 - 3619 63 12288 - 3620 49 12288 - 3621 20 6144 - 3622 43 6144 - 3623 40 18432 - 3624 20 12288 - 3625 39 18432 - 3626 101 18432 - 3627 56 18432 - 3628 54 12288 - 3629 30 6144 - 3630 71 6144 - 3631 83 18432 - 3632 13 13824 - 3633 86 13824 - 3634 114 18432 - 3635 114 13824 - 3636 39 13824 - 3637 124 18432 - 3638 96 24576 - 3639 68 24576 - 3640 32 24576 - 3641 125 24576 - 3642 25 24576 - 3643 58 24576 - 3644 94 24576 - 3645 85 24576 - 3646 77 24576 - 3647 86 24576 - 3648 4 18432 - 3649 3 18432 - 3650 53 18432 - 3651 17 18432 - 3652 5 24576 - 3653 18 32768 - 3654 95 24576 - 3655 120 24576 - 3656 117 24576 - 3657 10 24576 - 3658 72 24576 - 3659 50 24576 - 3660 115 24576 - 3661 28 24576 - 3662 126 24576 - 3663 57 24576 - 3664 123 24576 - 3665 31 24576 - 3666 88 24576 - 3667 67 24576 - 3668 1 24576 - 3669 15 18432 - 3670 86 24576 - 3671 33 24576 - 3672 34 18432 - 3673 50 18432 - 3674 20 18432 - 3675 40 18432 - 3676 25 18432 - 3677 97 32768 - 3678 51 32768 - 3679 124 18432 - 3680 56 32768 - 3681 32 32768 - 3682 37 32768 - 3683 10 32768 - 3684 28 32768 - 3685 91 32768 - 3686 118 32768 - 3687 32 24576 - 3688 7 18432 - 3689 12 18432 - 3690 35 24576 - 3691 101 24576 - 3692 69 24576 - 3693 6 24576 - 3694 74 18432 - 3695 61 18432 - 3696 115 18432 - 3697 39 13824 - 3698 65 13824 - 3699 57 18432 - 3700 7 18432 - 3701 94 18432 - 3702 117 24576 - 3703 59 24576 - 3704 33 24576 - 3705 40 24576 - 3706 45 18432 - 3707 23 18432 - 3708 54 24576 - 3709 54 24576 - 3710 107 24576 - 3711 68 18432 - 3712 98 13824 - 3713 54 13824 - 3714 44 18432 - 3715 58 18432 - 3716 26 24576 - 3717 2 24576 - 3718 99 32768 - 3719 126 24576 - 3720 55 24576 - 3721 103 32768 - 3722 50 24576 - 3723 17 24576 - 3724 36 32768 - 3725 45 32768 - 3726 81 32768 - 3727 45 18432 - 3728 37 24576 diff --git a/Tests/F_BaseLib/fornberg_weights.f90 b/Tests/F_BaseLib/fornberg_weights.f90 deleted file mode 100644 index f9fd8db59..000000000 --- a/Tests/F_BaseLib/fornberg_weights.f90 +++ /dev/null @@ -1,51 +0,0 @@ -module fornberg_weights_module - implicit none - integer, parameter, private :: dp_t = kind(1.0d0) -contains - subroutine weights(c, z, x) - real(kind=dp_t), intent(in) :: z - real(kind=dp_t), dimension(0:), intent(in) :: x - real(kind=dp_t), dimension(0:,0:), intent(out) :: c - real(kind=dp_t) :: c1, c2, c3, c4, c5 - integer :: i, j, k, mn - c1 = 1.0_dp_t - c4 = x(0) - z - c(:,:) = 0.0_dp_t - c(0,0) = 1.0_dp_t - do i = 1, ubound(x,dim=1) - mn = min(i, ubound(c,dim=2)) - c2 = 1.0_dp_t - c5 = c4 - c4 = x(i) - z - do j = 0, i - 1 - c3 = x(i) - x(j) - c2 = c2*c3 - if ( j == i-1 ) then - do k = mn, 1, -1 - c(i,k) = c1*(k*c(i-1,k-1) - c5*c(i-1,k))/c2 - end do - c(i,0) = -c1*c5*c(i-1,0)/c2 - end if - do k = mn, 1, -1 - c(j,k) = (c4*c(j,k) - k*c(j,k-1))/c3 - end do - c(j,0) = c4*c(j,0)/c3 - end do - c1 = c2 - end do - end subroutine weights -end module fornberg_weights_module - -program main - use fornberg_weights_module - implicit none - integer :: i - integer, parameter :: dp_t = kind(1.0d0) - real(kind(0.0d0)) :: z, x(0:2), c(0:2,0:2) - z = 0 - x = (/-0.5_dp_t, 0.0_dp_t, 1.0_dp_t/) - call weights(c, z, x) - do i = lbound(c,dim=2), ubound(c,dim=2) - print *, '*', i, c(:,i) - end do -end program main diff --git a/Tests/F_BaseLib/inputs.domain b/Tests/F_BaseLib/inputs.domain deleted file mode 100644 index efde6c041..000000000 --- a/Tests/F_BaseLib/inputs.domain +++ /dev/null @@ -1,16 +0,0 @@ -&PROBIN -!test_set = "gr.2_little" -!test_set = "../../data/mglib_grids/gr.2_3x2" - test_set = "../../data/mglib_grids/gr.2_19boxes" -!test_set = "gr.2_big" -!test_set = "../../data/grids/3D_4_level_32x128" -!test_set = "../../data/grids/3D_4_level_96x96x96" -!test_set = "../../data/grids/2D_1_level_512x256" - - test_set_mglib = T - - verbose = T - - pd_xyz = 128, 128, 128 - -/ diff --git a/Tests/F_BaseLib/main.f90 b/Tests/F_BaseLib/main.f90 deleted file mode 100644 index dd9b2e8e9..000000000 --- a/Tests/F_BaseLib/main.f90 +++ /dev/null @@ -1,59 +0,0 @@ -program main - use BoxLib - use parallel - use multifab_module - use bl_prof_module - - implicit none - - call boxlib_initialize() - - call bl_prof_initialize(on = .true.) - -! call t_box_read -! call t_plotfile -! call t_ba -! call t_bx -! call t_cluster -! call t_mf_fabio -! call t_mf -! call t_domain -! call t_box_chop -! call t_box_mod -! call t_boxassoc -! call t_mt_random_numbers -! call t_box_conn -! call t_boxarray -! call t_nodal_mf_fabio -! call t_timer -! call t_knap -! call t_ml_mf_read -! call t_bl_prof -! call t_ba_self_intersection -! call t_knapsack -! call t_gatherv - call t_particle - - call layout_flush_copyassoc_cache () - - if ( parallel_IOProcessor() ) then - print*, 'MEMORY STATS AT END OF PROGRAM' - print*, ' ' - end if - call print(lmultifab_mem_stats(), " lmultifab") - call print(multifab_mem_stats(), " multifab") - call print(fab_mem_stats(), " fab") - call print(boxarray_mem_stats(), " boxarray") - call print(layout_mem_stats(), " layout") - call print(boxassoc_mem_stats(), " boxassoc") - call print(fgassoc_mem_stats(), " fgassoc") - call print(syncassoc_mem_stats(), " syncassoc") - call print(copyassoc_mem_stats(), " copyassoc") - call print(fluxassoc_mem_stats(), " fluxassoc") - - call bl_prof_glean("bl_prof_res") - call bl_prof_finalize() - - call boxlib_finalize() - -end program main diff --git a/Tests/F_BaseLib/makefile b/Tests/F_BaseLib/makefile deleted file mode 100644 index d45c15256..000000000 --- a/Tests/F_BaseLib/makefile +++ /dev/null @@ -1,17 +0,0 @@ -TOP = ..\.. - -#f90sources = $(f90sources) main.f90 - -!INCLUDE $(TOP)\mk\NMakedefs.mak - -boxlib_dir=.. -!INCLUDE ..\NPackage.mak - -f90objects = $(f90objects) $(obj_dir)\main.obj -f90objects = $(f90objects) $(obj_dir)\t_main.obj -f90objects = $(f90objects) $(obj_dir)\t_knapsack.obj - -main.exe: $(objects) - $(FOR) $(FFLAGS) $(LDFLAGS) /out:main.exe $(objects) - -!INCLUDE $(TOP)\mk\NMakerules.mak diff --git a/Tests/F_BaseLib/mt19937ar.f90 b/Tests/F_BaseLib/mt19937ar.f90 deleted file mode 100644 index cb094f38c..000000000 --- a/Tests/F_BaseLib/mt19937ar.f90 +++ /dev/null @@ -1,1202 +0,0 @@ -! A C-program for MT19937, with initialization improved 2002/1/26. -! Coded by Takuji Nishimura and Makoto Matsumoto. - -! Code converted to Fortran 95 by Josi Rui Faustino de Sousa -! Date: 2002-02-01 - -! Before using, initialize the state by using init_genrand(seed) -! or init_by_array(init_key, key_length). - -! This library is free software. -! This library is distributed in the hope that it will be useful, -! but WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -! Copyright (C) 1997, 2002 Makoto Matsumoto and Takuji Nishimura. -! Any feedback is very welcome. -! http://www.math.keio.ac.jp/matumoto/emt.html -! email: matumoto@math.keio.ac.jp - -module mt19937_module - - implicit none - - private - public :: init_genrand, init_by_array - public :: genrand_bit - public :: genrand_int - public :: genrand_int32, genrand_int31 - public :: genrand_real1, genrand_real2, genrand_real3, genrand_res53 - - public :: mt_init_genrand, mt_init_by_array - public :: mt_genrand_bit - public :: mt_genrand_int - public :: mt_genrand_int32, mt_genrand_int31 - public :: mt_genrand_real1, mt_genrand_real2, mt_genrand_real3, mt_genrand_res53 - public :: mt_validate, build_random_boxarray - - ! genrand_init - ! Internal RNG state initialization function accepts either an genrand_intg integer - ! or a vector returns genrand_state if called with no arguments uses a default seed. - ! genrand_int32 - ! Subroutine takes two arguments the state to use and a scalar or an array whose - ! elements are random integer on [0,0xffffffff] interval. Note that this numbers - ! will positive/negative since there are no unsigned integers in F95 - ! genrand_int31 - ! Subroutine takes two arguments the state to use and a scalar or an array whose - ! elements are random integer on [0,0x7fffffff] interval. - ! genrand_real1 - ! Subroutine takes two arguments the state to use and a scalar or an array whose - ! elements are random real on [0,1] interval. - ! genrand_real2 - ! Subroutine takes two arguments the state to use and a scalar or an array whose - ! elements are random numbers on [0,1) interval. - ! genrand_real3 - ! Subroutine takes two arguments the state to use and a scalar or an array whose - ! elements are random numbers on (0,1) interval. - ! genrand_res53 - ! Subroutine takes two arguments the state to use and a scalar or an array whose - ! elements are random numbers on [0,1) interval with 53-bit resolution. - - ! mt_random_number returns floats,doubles in range [0,1) ala the build random_number - - interface mt_random_number - module procedure mt_random_number_l_0, mt_random_number_l_0a - module procedure mt_random_number_l_1, mt_random_number_l_1a - module procedure mt_random_number_l_2, mt_random_number_l_2a - module procedure mt_random_number_l_3, mt_random_number_l_3a - module procedure mt_random_number_l_4, mt_random_number_l_4a - module procedure mt_random_number_l_5, mt_random_number_l_5a - module procedure mt_random_number_l_6, mt_random_number_l_6a - module procedure mt_random_number_l_7, mt_random_number_l_7a - - module procedure mt_random_number_i_0, mt_random_number_i_0a - module procedure mt_random_number_i_1, mt_random_number_i_1a - module procedure mt_random_number_i_2, mt_random_number_i_2a - module procedure mt_random_number_i_3, mt_random_number_i_3a - module procedure mt_random_number_i_4, mt_random_number_i_4a - module procedure mt_random_number_i_5, mt_random_number_i_5a - module procedure mt_random_number_i_6, mt_random_number_i_6a - module procedure mt_random_number_i_7, mt_random_number_i_7a - - module procedure mt_random_number_d_0, mt_random_number_d_0a - module procedure mt_random_number_d_1, mt_random_number_d_1a - module procedure mt_random_number_d_2, mt_random_number_d_2a - module procedure mt_random_number_d_3, mt_random_number_d_3a - module procedure mt_random_number_d_4, mt_random_number_d_4a - module procedure mt_random_number_d_5, mt_random_number_d_5a - module procedure mt_random_number_d_6, mt_random_number_d_6a - module procedure mt_random_number_d_7, mt_random_number_d_7a - - module procedure mt_random_number_r_0, mt_random_number_r_0a - module procedure mt_random_number_r_1, mt_random_number_r_1a - module procedure mt_random_number_r_2, mt_random_number_r_2a - module procedure mt_random_number_r_3, mt_random_number_r_3a - module procedure mt_random_number_r_4, mt_random_number_r_4a - module procedure mt_random_number_r_5, mt_random_number_r_5a - module procedure mt_random_number_r_6, mt_random_number_r_6a - module procedure mt_random_number_r_7, mt_random_number_r_7a - end interface mt_random_number - - interface mt_random_seed - module procedure mt_random_seed_0 - module procedure mt_random_seed_a - end interface - - public mt_random_number - public mt_random_seed - - integer, parameter :: intg = selected_int_kind( 9 ) - integer, parameter :: flot = selected_real_kind( 6, 37 ) - integer, parameter :: dobl = selected_real_kind( 15, 307 ) - - integer, parameter :: wi = intg - integer, parameter :: wr = dobl - integer, parameter :: wf = flot - - - ! Period parameters - integer( kind = wi ), parameter :: n = 624_wi - integer( kind = wi ), parameter :: m = 397_wi - integer, parameter :: hbs = bit_size( n ) / 2 - integer, parameter :: qbs = hbs / 2 - integer, parameter :: tbs = 3 * qbs - - type, public :: mt19937 - integer( kind = wi ) :: mt(n) - logical( kind = wi ) :: mtinit = .false._wi - integer( kind = wi ) :: mti = n + 1_wi - end type mt19937 - - type(mt19937), save :: the_mt - -contains - - !! Places a box into the world. - !! The center of the is uniformly distributed in the world. - !! The size of the box is uniformly distrubed between MN and MX - !! The resulting box is intersected with the world - function box_random_box(world, mn, mx, mt) result(r) - - use box_module - type(mt19937), intent(inout), optional :: mt - type(box) :: r - type(box), intent(in) :: world - integer, intent(in) :: mn, mx - real(kind=dp_t) :: aa(get_dim(world),2) - integer :: spot(get_dim(world)) - integer :: hwide(get_dim(world)) - - if ( present(mt) ) then - call mt_random_number(mt, aa) - else - call mt_random_number(aa) - end if - hwide = int((mn + aa(:,1)*(mx-mn))/2) - spot = int(lwb(world) + aa(:,2)*(upb(world)-lwb(world))) - call build(r, spot-hwide, spot+hwide) - r = intersection(r, world) - - end function box_random_box - - !! Makes an array of random boxes - subroutine make_random_boxes_bv(bxs, world, mn, mx, mt) - - use box_module - type(box), dimension(:), intent(out) :: bxs - type(mt19937), intent(inout), optional :: mt - integer, intent(in) :: mn, mx - type(box), intent(in) :: world - integer :: i - - do i = 1, size(bxs) - bxs(i) = box_random_box(world, mn, mx, mt) - end do - - end subroutine make_random_boxes_bv - - subroutine build_random_boxarray(ba, pd, nb, mn, mx, bf) - use boxarray_module - implicit none - type(boxarray), intent(out) :: ba - integer, intent(in) :: nb, mn, mx, bf - type(box), intent(in) :: pd - type(box) :: tpd - type(box) :: bxs(nb) - - integer :: tmn, tmx - - tpd = coarsen(pd, bf) - tmn = max(mn/bf, 1) - tmx = max(mx/bf, 1) - - call make_random_boxes_bv(bxs, tpd, tmn, tmx) - call boxarray_build_v(ba, bxs) - call boxarray_refine(ba, bf) - - call boxarray_to_domain(ba) - - end subroutine build_random_boxarray - - elemental function uiadd( a, b ) result( c ) - integer( kind = wi ), intent( in ) :: a, b - integer( kind = wi ) :: c - integer( kind = wi ) :: a1, a2, b1, b2, s1, s2 - - a1 = ibits( a, 0, hbs ) - a2 = ibits( a, hbs, hbs ) - b1 = ibits( b, 0, hbs ) - b2 = ibits( b, hbs, hbs ) - s1 = a1 + b1 - s2 = a2 + b2 + ibits( s1, hbs, hbs ) - c = ior( ishft( s2, hbs ), ibits( s1, 0, hbs ) ) - end function uiadd - - elemental function uisub( a, b ) result( c ) - integer( kind = wi ), intent( in ) :: a, b - integer( kind = wi ) :: c - integer( kind = wi ) :: a1, a2, b1, b2, s1, s2 - - a1 = ibits( a, 0, hbs ) - a2 = ibits( a, hbs, hbs ) - b1 = ibits( b, 0, hbs ) - b2 = ibits( b, hbs, hbs ) - s1 = a1 - b1 - s2 = a2 - b2 + ibits( s1, hbs, hbs ) - c = ior( ishft( s2, hbs ), ibits( s1, 0, hbs ) ) - end function uisub - - elemental function uimlt( a, b ) result( c ) - integer( kind = wi ), intent( in ) :: a, b - integer( kind = wi ) :: c - integer( kind = wi ) :: a0, a1, a2, a3 - integer( kind = wi ) :: b0, b1, b2, b3 - integer( kind = wi ) :: p0, p1, p2, p3 - - a0 = ibits( a, 0, qbs ) - a1 = ibits( a, qbs, qbs ) - a2 = ibits( a, hbs, qbs ) - a3 = ibits( a, tbs, qbs ) - b0 = ibits( b, 0, qbs ) - b1 = ibits( b, qbs, qbs ) - b2 = ibits( b, hbs, qbs ) - b3 = ibits( b, tbs, qbs ) - p0 = a0 * b0 - p1 = a1 * b0 + a0 * b1 + ibits( p0, qbs, tbs ) - p2 = a2 * b0 + a1 * b1 + a0 * b2 + ibits( p1, qbs, tbs ) - p3 = a3 * b0 + a2 * b1 + a1 * b2 + a0 * b3 + ibits( p2, qbs, tbs ) - c = ior( ishft( p1, qbs ), ibits( p0, 0, qbs ) ) - c = ior( ishft( p2, hbs ), ibits( c, 0, hbs ) ) - c = ior( ishft( p3, tbs ), ibits( c, 0, tbs ) ) - end function uimlt - - ! initializes mt[N] with a seed - subroutine init_genrand( s ) - integer( kind = wi ), intent( in ) :: s - call mt_init_genrand(the_mt, s) - end subroutine init_genrand - - subroutine mt_init_genrand( mt, s ) - type(mt19937), intent(out) :: mt - integer( kind = wi ), intent( in ) :: s - integer( kind = wi ) :: i, mult_a - - data mult_a /z'6C078965'/ - - mt%mtinit = .true._wi - mt%mt(1) = ibits( s, 0, 32 ) - do i = 2, n, 1 - mt%mt(i) = ieor( mt%mt(i-1), ishft( mt%mt(i-1), -30 ) ) - mt%mt(i) = uimlt( mt%mt(i), mult_a ) - mt%mt(i) = uiadd( mt%mt(i), i-1_wi ) - ! See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. - ! In the previous versions, MSBs of the seed affect - ! only MSBs of the array mt%mt[]. - ! 2002/01/09 modified by Makoto Matsumoto - mt%mt(i) = ibits( mt%mt(i), 0, 32 ) - ! for >32 bit machines - end do - - end subroutine mt_init_genrand - - ! initialize by an array with array-length - ! init_key is the array for initializing keys - ! key_length is its length - subroutine init_by_array( init_key ) - integer( kind = wi ), intent( in ) :: init_key(:) - call mt_init_by_array(the_mt, init_key) - end subroutine init_by_array - - subroutine mt_init_by_array( mt, init_key ) - type(mt19937), intent(out) :: mt - integer( kind = wi ), intent( in ) :: init_key(:) - integer( kind = wi ) :: i, j, k, tp, key_length - integer( kind = wi ) :: seed_d, mult_a, mult_b, msb1_d - - data seed_d /z'12BD6AA'/ - data mult_a /z'19660D'/ - data mult_b /z'5D588B65'/ - data msb1_d /z'80000000'/ - - key_length = size( init_key, dim=1 ) - call mt_init_genrand( mt, seed_d ) - i = 2_wi - j = 1_wi - do k = max( n, key_length ), 1, -1 - tp = ieor( mt%mt(i-1), ishft( mt%mt(i-1), -30 ) ) - tp = uimlt( tp, mult_a ) - mt%mt(i) = ieor( mt%mt(i), tp ) - mt%mt(i) = uiadd( mt%mt(i), uiadd( init_key(j), j-1_wi ) ) ! non linear - mt%mt(i) = ibits( mt%mt(i), 0, 32 ) ! for WORDSIZE > 32 machines - i = i + 1_wi - j = j + 1_wi - if ( i > n ) then - mt%mt(1) = mt%mt(n) - i = 2_wi - end if - if ( j > key_length) j = 1_wi - end do - do k = n-1, 1, -1 - tp = ieor( mt%mt(i-1), ishft( mt%mt(i-1), -30 ) ) - tp = uimlt( tp, mult_b ) - mt%mt(i) = ieor( mt%mt(i), tp ) - mt%mt(i) = uisub( mt%mt(i), i-1_wi ) ! non linear - mt%mt(i) = ibits( mt%mt(i), 0, 32 ) ! for WORDSIZE > 32 machines - i = i + 1_wi - if ( i > n ) then - mt%mt(1) = mt%mt(n) - i = 2_wi - end if - end do - mt%mt(1) = msb1_d ! MSB is 1; assuring non-zero initial array - end subroutine mt_init_by_array - - ! generates a random number on [0,0xffffffff]-interval - function genrand_int32( ) result( y ) - integer( kind = wi ) :: y - y = mt_genrand_int32(the_mt) - end function genrand_int32 - - function mt_genrand_int32( mt ) result( y ) - type(mt19937), intent(inout) :: mt - integer( kind = wi ) :: y - integer( kind = wi ) :: kk - integer( kind = wi ) :: seed_d, matrix_a, matrix_b, temper_a, temper_b - - data seed_d /z'5489'/ - data matrix_a /z'9908B0DF'/ - data matrix_b /z'0'/ - data temper_a /z'9D2C5680'/ - data temper_b /z'EFC60000'/ - - if ( mt%mti > n ) then ! generate N words at one time - ! if init_genrand() has not been called, a default initial seed is used - if ( .not. mt%mtinit ) call mt_init_genrand( mt, seed_d ) - do kk = 1, n-m, 1 - y = ibits( mt%mt(kk+1), 0, 31 ) - call mvbits( mt%mt(kk), 31, 1, y, 31 ) - if ( btest( y, 0 ) ) then - mt%mt(kk) = ieor( ieor( mt%mt(kk+m), ishft( y, -1 ) ), matrix_a ) - else - mt%mt(kk) = ieor( ieor( mt%mt(kk+m), ishft( y, -1 ) ), matrix_b ) - end if - end do - do kk = n-m+1, n-1, 1 - y = ibits( mt%mt(kk+1), 0, 31 ) - call mvbits( mt%mt(kk), 31, 1, y, 31 ) - if ( btest( y, 0 ) ) then - mt%mt(kk) = ieor(ieor( mt%mt(kk+m-n), ishft( y, -1 ) ), matrix_a) - else - mt%mt(kk) = ieor(ieor( mt%mt(kk+m-n), ishft( y, -1 ) ), matrix_b) - end if - end do - y = ibits( mt%mt(1), 0, 31 ) - call mvbits( mt%mt(n), 31, 1, y, 31 ) - if ( btest( y, 0 ) ) then - mt%mt(kk) = ieor( ieor( mt%mt(m), ishft( y, -1 ) ), matrix_a ) - else - mt%mt(kk) = ieor( ieor( mt%mt(m), ishft( y, -1 ) ), matrix_b ) - end if - mt%mti = 1_wi - end if - y = mt%mt(mt%mti) - mt%mti = mt%mti + 1_wi - ! Tempering - y = ieor( y, ishft( y, -11) ) - y = ieor( y, iand( ishft( y, 7 ), temper_a ) ) - y = ieor( y, iand( ishft( y, 15 ), temper_b ) ) - y = ieor( y, ishft( y, -18 ) ) - end function mt_genrand_int32 - - ! generates a random number on [0,0x7fffffff]-interval - function genrand_int31( ) result( i ) - integer( kind = wi ) :: i - i = mt_genrand_int31(the_mt) - end function genrand_int31 - function mt_genrand_int31( mt ) result( i ) - type(mt19937), intent(inout) :: mt - integer( kind = wi ) :: i - i = ishft( mt_genrand_int32( mt ), -1 ) - end function mt_genrand_int31 - - function genrand_int(natural) result(i) - integer( kind = wi ) :: i - logical, intent(in), optional :: natural - i = mt_genrand_int(the_mt, natural) - end function genrand_int - function mt_genrand_int(mt, natural) result(i) - type(mt19937), intent(inout) :: mt - integer( kind = wi ) :: i - logical, intent(in), optional :: natural - if ( present(natural) ) then - if ( natural ) then - i = mt_genrand_int31(mt) - else - i = mt_genrand_int32(mt) - end if - else - i = mt_genrand_int32(mt) - end if - end function mt_genrand_int - - function genrand_bit() result(l) - logical :: l - l = mt_genrand_bit(the_mt) - end function genrand_bit - function mt_genrand_bit(mt) result(l) - type(mt19937), intent(inout) :: mt - logical :: l - l = mod(mt_genrand_int32(mt),2_wi) == 0 - end function mt_genrand_bit - - ! generates a random number on [0,1]-real-interval - function genrand_real1( ) result( r ) - real( kind = wr ) :: r - r = mt_genrand_real1(the_mt) - end function genrand_real1 - - function mt_genrand_real1( mt ) result( r ) - type(mt19937), intent(inout) :: mt - real( kind = wr ) :: r - integer( kind = wi ) :: a, a1, a0 - - a = mt_genrand_int32( mt ) - a0 = ibits( a, 0, hbs ) - a1 = ibits( a, hbs, hbs ) - r = real( a0, kind = wr ) / 4294967295.0_wr - r = real( a1, kind = wr ) * ( 65536.0_wr / 4294967295.0_wr ) + r - ! divided by 2^32-1 - end function mt_genrand_real1 - - ! generates a random number on [0,1)-real-interval - function genrand_real2( ) result( r ) - real( kind = wr ) :: r - r = mt_genrand_real2(the_mt) - end function genrand_real2 - - function mt_genrand_real2( mt ) result( r ) - type(mt19937), intent(inout) :: mt - real( kind = wr ) :: r - integer( kind = wi ) :: a, a1, a0 - - a = mt_genrand_int32( mt ) - a0 = ibits( a, 0, hbs ) - a1 = ibits( a, hbs, hbs ) - r = real( a0, kind = wr ) / 4294967296.0_wr - r = real( a1, kind = wr ) / 65536.0_wr + r - ! divided by 2^32 - end function mt_genrand_real2 - - ! generates a random number on (0,1)-real-interval - function genrand_real3( ) result( r ) - real( kind = wr ) :: r - r = mt_genrand_real3(the_mt) - end function genrand_real3 - - function mt_genrand_real3( mt ) result( r ) - type(mt19937), intent(inout) :: mt - real( kind = wr ) :: r - integer( kind = wi ) :: a, a1, a0 - - a = mt_genrand_int32( mt ) - a0 = ibits( a, 0, hbs ) - a1 = ibits( a, hbs, hbs ) - r = ( real( a0, kind = wr ) + 0.5_wr ) / 4294967296.0_wr - r = real( a1, kind = wr ) / 65536.0_wr + r - ! divided by 2^32 - end function mt_genrand_real3 - - !! returns various kinds of real results with intervals - !! selected by lo_open, hi_open - function genrand_real(lo_open, hi_open) result(r) - real( kind = wr ) :: r - logical, intent(in), optional :: lo_open, hi_open - r = mt_genrand_real(the_mt, lo_open, hi_open) - end function genrand_real - function mt_genrand_real(mt, lo_open, hi_open) result(r) - use bl_error_module - real( kind = wr ) :: r - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: lo_open, hi_open - logical :: lop, hop - lop = .false.; if ( present(lo_open) ) lop = lo_open - hop = .true.; if ( present(hi_open) ) hop = hi_open - if ( hop .and. lop ) then - r = mt_genrand_real3(mt) - else if ( hop .and. .not. lop ) then - r = mt_genrand_real2(mt) - else if ( .not. hop .and. .not. lop) then - r = mt_genrand_real1(mt) - else - call bl_error("MT_GENRAND_REAL: lo_open hi_closed: fails") - end if - end function mt_genrand_real - - subroutine mt_random_seed_0(size, put, get) - integer, intent(out), optional :: size - integer, intent(in), optional :: put(:) - integer, intent(out), optional :: get(:) - call mt_random_seed_a(the_mt, size, put, get) - end subroutine mt_random_seed_0 - - subroutine mt_random_seed_a(mt, size, put, get) - use bl_error_module - type(mt19937), intent(inout) :: mt - integer, intent(out), optional :: size - integer, intent(in), optional :: put(:) - integer, intent(out), optional :: get(:) - integer(kind=wi) :: seed_d - data seed_d /z'5489'/ - if ( .not. present(size) .and. .not. present(put) & - .and. .not. present(get) ) then - call mt_init_genrand(mt, seed_d) - else if ( present(size) .and. .not. present(put) & - .and. .not. present(get) ) then - size = n + 1 - else if ( .not. present(size) .and. present(put) & - .and. .not. present(get) ) then - if ( ubound(put,dim=1) < n + 1 ) & - call bl_error("MT_RANDOM_SEED: put array too small: ", & - ubound(put,dim=1)) - mt%mt = put(1:n) - mt%mti = put(n+1) - mt%mtinit = .true._wi - else if ( .not. present(size) .and. .not. present(put) & - .and. present(get) ) then - if ( .not. mt%mtinit) then - call mt_init_genrand(mt, seed_d) - end if - if ( ubound(get,dim=1) < n + 1 ) & - call bl_error("MT_RANDOM_SEED: get array too small: ", & - ubound(get,dim=1)) - get(1:n) = mt%mt - get(n+1) = mt%mti - else - call bl_error("MT_RANDOM_SEED: args either SIZE, GET, PUT") - end if - end subroutine mt_random_seed_a - - subroutine mt_random_number_l_0a(harvest) - logical, intent(out) :: harvest - call mt_random_number_l_0(the_mt, harvest) - end subroutine mt_random_number_l_0a - subroutine mt_random_number_l_0(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest - harvest = mt_genrand_bit(mt) - end subroutine mt_random_number_l_0 - - subroutine mt_random_number_l_1a(harvest) - logical, intent(out) :: harvest(:) - call mt_random_number_l_1(the_mt, harvest) - end subroutine mt_random_number_l_1a - subroutine mt_random_number_l_1(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest(:) - integer :: i - do i = 1, size(harvest) - harvest(i) = mt_genrand_bit(mt) - end do - end subroutine mt_random_number_l_1 - - subroutine mt_random_number_l_2a(harvest) - logical, intent(out) :: harvest(:,:) - call mt_random_number_l_2(the_mt, harvest) - end subroutine mt_random_number_l_2a - subroutine mt_random_number_l_2(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest(:,:) - integer :: i,j - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j) = mt_genrand_bit(mt) - end do - end do - end subroutine mt_random_number_l_2 - - subroutine mt_random_number_l_3a(harvest) - logical, intent(out) :: harvest(:,:,:) - call mt_random_number_l_3(the_mt, harvest) - end subroutine mt_random_number_l_3a - subroutine mt_random_number_l_3(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest(:,:,:) - integer :: i,j,k - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k) = mt_genrand_bit(mt) - end do - end do - end do - end subroutine mt_random_number_l_3 - - subroutine mt_random_number_l_4a(harvest) - logical, intent(out) :: harvest(:,:,:,:) - call mt_random_number_l_4(the_mt, harvest) - end subroutine mt_random_number_l_4a - subroutine mt_random_number_l_4(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest(:,:,:,:) - integer :: i,j,k,l - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l) = mt_genrand_bit(mt) - end do - end do - end do - end do - end subroutine mt_random_number_l_4 - - subroutine mt_random_number_l_5a(harvest) - logical, intent(out) :: harvest(:,:,:,:,:) - call mt_random_number_l_5(the_mt, harvest) - end subroutine mt_random_number_l_5a - subroutine mt_random_number_l_5(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest(:,:,:,:,:) - integer :: i,j,k,l,m - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m) = mt_genrand_bit(mt) - end do - end do - end do - end do - end do - end subroutine mt_random_number_l_5 - - subroutine mt_random_number_l_6a(harvest) - logical, intent(out) :: harvest(:,:,:,:,:,:) - call mt_random_number_l_6(the_mt, harvest) - end subroutine mt_random_number_l_6a - subroutine mt_random_number_l_6(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest(:,:,:,:,:,:) - integer :: i,j,k,l,m,n - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n) = mt_genrand_bit(mt) - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_l_6 - - subroutine mt_random_number_l_7a(harvest) - logical, intent(out) :: harvest(:,:,:,:,:,:,:) - call mt_random_number_l_7(the_mt, harvest) - end subroutine mt_random_number_l_7a - subroutine mt_random_number_l_7(mt, harvest) - type(mt19937), intent(inout) :: mt - logical, intent(out) :: harvest(:,:,:,:,:,:,:) - integer :: i,j,k,l,m,n,o - do o = 1, size(harvest,dim=7) - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n,o) = mt_genrand_bit(mt) - end do - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_l_7 - - subroutine mt_random_number_i_0a(harvest, natural) - integer, intent(out) :: harvest - logical, intent(in), optional :: natural - call mt_random_number_i_0(the_mt, harvest, natural) - end subroutine mt_random_number_i_0a - subroutine mt_random_number_i_0(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest - harvest = mt_genrand_int(mt, natural) - end subroutine mt_random_number_i_0 - - subroutine mt_random_number_i_1a(harvest, natural) - integer, intent(out) :: harvest(:) - logical, intent(in), optional :: natural - call mt_random_number_i_1(the_mt, harvest, natural) - end subroutine mt_random_number_i_1a - subroutine mt_random_number_i_1(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest(:) - integer :: i - do i = 1, size(harvest) - harvest(i) = mt_genrand_int(mt, natural) - end do - end subroutine mt_random_number_i_1 - - subroutine mt_random_number_i_2a(harvest, natural) - integer, intent(out) :: harvest(:,:) - logical, intent(in), optional :: natural - call mt_random_number_i_2(the_mt, harvest, natural) - end subroutine mt_random_number_i_2a - subroutine mt_random_number_i_2(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest(:,:) - integer :: i,j - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j) = mt_genrand_int(mt, natural) - end do - end do - end subroutine mt_random_number_i_2 - - subroutine mt_random_number_i_3a(harvest, natural) - integer, intent(out) :: harvest(:,:,:) - logical, intent(in), optional :: natural - call mt_random_number_i_3(the_mt, harvest, natural) - end subroutine mt_random_number_i_3a - subroutine mt_random_number_i_3(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest(:,:,:) - integer :: i,j,k - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k) = mt_genrand_int(mt, natural) - end do - end do - end do - end subroutine mt_random_number_i_3 - - subroutine mt_random_number_i_4a(harvest, natural) - integer, intent(out) :: harvest(:,:,:,:) - logical, intent(in), optional :: natural - call mt_random_number_i_4(the_mt, harvest, natural) - end subroutine mt_random_number_i_4a - subroutine mt_random_number_i_4(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest(:,:,:,:) - integer :: i,j,k,l - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l) = mt_genrand_int(mt, natural) - end do - end do - end do - end do - end subroutine mt_random_number_i_4 - - subroutine mt_random_number_i_5a(harvest, natural) - integer, intent(out) :: harvest(:,:,:,:,:) - logical, intent(in), optional :: natural - call mt_random_number_i_5(the_mt, harvest, natural) - end subroutine mt_random_number_i_5a - subroutine mt_random_number_i_5(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest(:,:,:,:,:) - integer :: i,j,k,l,m - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m) = mt_genrand_int(mt, natural) - end do - end do - end do - end do - end do - end subroutine mt_random_number_i_5 - - subroutine mt_random_number_i_6a(harvest, natural) - integer, intent(out) :: harvest(:,:,:,:,:,:) - logical, intent(in), optional :: natural - call mt_random_number_i_6(the_mt, harvest, natural) - end subroutine mt_random_number_i_6a - subroutine mt_random_number_i_6(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest(:,:,:,:,:,:) - integer :: i,j,k,l,m,n - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n) = mt_genrand_int(mt, natural) - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_i_6 - - subroutine mt_random_number_i_7a(harvest, natural) - integer, intent(out) :: harvest(:,:,:,:,:,:,:) - logical, intent(in), optional :: natural - call mt_random_number_i_7(the_mt, harvest, natural) - end subroutine mt_random_number_i_7a - subroutine mt_random_number_i_7(mt, harvest, natural) - type(mt19937), intent(inout) :: mt - logical, intent(in), optional :: natural - integer, intent(out) :: harvest(:,:,:,:,:,:,:) - integer :: i,j,k,l,m,n,o - do o = 1, size(harvest,dim=7) - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n,o) = mt_genrand_int(mt, natural) - end do - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_i_7 - - subroutine mt_random_number_d_0a(harvest) - real(kind = wr), intent(out) :: harvest - call mt_random_number_d_0(the_mt, harvest) - end subroutine mt_random_number_d_0a - subroutine mt_random_number_d_0(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest - harvest = mt_genrand_real2(mt) - end subroutine mt_random_number_d_0 - - subroutine mt_random_number_d_1a(harvest) - real(kind = wr), intent(out) :: harvest(:) - call mt_random_number_d_1(the_mt, harvest) - end subroutine mt_random_number_d_1a - subroutine mt_random_number_d_1(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest(:) - integer :: i - do i = 1, size(harvest) - harvest(i) = mt_genrand_real2(mt) - end do - end subroutine mt_random_number_d_1 - - subroutine mt_random_number_d_2a(harvest) - real(kind = wr), intent(out) :: harvest(:,:) - call mt_random_number_d_2(the_mt, harvest) - end subroutine mt_random_number_d_2a - - subroutine mt_random_number_d_2(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest(:,:) - integer :: i,j - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j) = mt_genrand_real2(mt) - end do - end do - end subroutine mt_random_number_d_2 - - subroutine mt_random_number_d_3a(harvest) - real(kind = wr), intent(out) :: harvest(:,:,:) - call mt_random_number_d_3(the_mt, harvest) - end subroutine mt_random_number_d_3a - - subroutine mt_random_number_d_3(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest(:,:,:) - integer :: i,j,k - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k) = mt_genrand_real2(mt) - end do - end do - end do - end subroutine mt_random_number_d_3 - - subroutine mt_random_number_d_4a(harvest) - real(kind = wr), intent(out) :: harvest(:,:,:,:) - call mt_random_number_d_4(the_mt, harvest) - end subroutine mt_random_number_d_4a - - subroutine mt_random_number_d_4(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest(:,:,:,:) - integer :: i,j,k,l - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l) = mt_genrand_real2(mt) - end do - end do - end do - end do - end subroutine mt_random_number_d_4 - - subroutine mt_random_number_d_5a(harvest) - real(kind = wr), intent(out) :: harvest(:,:,:,:,:) - call mt_random_number_d_5(the_mt, harvest) - end subroutine mt_random_number_d_5a - - subroutine mt_random_number_d_5(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest(:,:,:,:,:) - integer :: i,j,k,l,m - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m) = mt_genrand_real2(mt) - end do - end do - end do - end do - end do - end subroutine mt_random_number_d_5 - - subroutine mt_random_number_d_6a(harvest) - real(kind = wr), intent(out) :: harvest(:,:,:,:,:,:) - call mt_random_number_d_6(the_mt, harvest) - end subroutine mt_random_number_d_6a - - subroutine mt_random_number_d_6(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest(:,:,:,:,:,:) - integer :: i,j,k,l,m,n - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n) = mt_genrand_real2(mt) - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_d_6 - - subroutine mt_random_number_d_7a(harvest) - real(kind = wr), intent(out) :: harvest(:,:,:,:,:,:,:) - call mt_random_number_d_7(the_mt, harvest) - end subroutine mt_random_number_d_7a - - subroutine mt_random_number_d_7(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wr), intent(out) :: harvest(:,:,:,:,:,:,:) - integer :: i,j,k,l,m,n,o - do o = 1, size(harvest,dim=7) - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n,o) = mt_genrand_real2(mt) - end do - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_d_7 - - subroutine mt_random_number_r_0a(harvest) - real(kind = wf), intent(out) :: harvest - call mt_random_number_r_0(the_mt, harvest) - end subroutine mt_random_number_r_0a - - subroutine mt_random_number_r_0(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest - harvest = real(mt_genrand_real2(mt),kind=wf) - end subroutine mt_random_number_r_0 - - subroutine mt_random_number_r_1a(harvest) - real(kind = wf), intent(out) :: harvest(:) - call mt_random_number_r_1(the_mt, harvest) - end subroutine mt_random_number_r_1a - - subroutine mt_random_number_r_1(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest(:) - integer :: i - do i = 1, size(harvest) - harvest(i) = real(mt_genrand_real2(mt),kind=wf) - end do - end subroutine mt_random_number_r_1 - - subroutine mt_random_number_r_2a(harvest) - real(kind = wf), intent(out) :: harvest(:,:) - call mt_random_number_r_2(the_mt, harvest) - end subroutine mt_random_number_r_2a - - subroutine mt_random_number_r_2(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest(:,:) - integer :: i,j - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j) = real(mt_genrand_real2(mt),kind=wf) - end do - end do - end subroutine mt_random_number_r_2 - - subroutine mt_random_number_r_3a(harvest) - real(kind = wf), intent(out) :: harvest(:,:,:) - call mt_random_number_r_3(the_mt, harvest) - end subroutine mt_random_number_r_3a - - subroutine mt_random_number_r_3(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest(:,:,:) - integer :: i,j,k - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k) = real(mt_genrand_real2(mt),kind=wf) - end do - end do - end do - end subroutine mt_random_number_r_3 - - subroutine mt_random_number_r_4a(harvest) - real(kind = wf), intent(out) :: harvest(:,:,:,:) - call mt_random_number_r_4(the_mt, harvest) - end subroutine mt_random_number_r_4a - - subroutine mt_random_number_r_4(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest(:,:,:,:) - integer :: i,j,k,l - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l) = real(mt_genrand_real2(mt),kind=wf) - end do - end do - end do - end do - end subroutine mt_random_number_r_4 - - subroutine mt_random_number_r_5a(harvest) - real(kind = wf), intent(out) :: harvest(:,:,:,:,:) - call mt_random_number_r_5(the_mt, harvest) - end subroutine mt_random_number_r_5a - - subroutine mt_random_number_r_5(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest(:,:,:,:,:) - integer :: i,j,k,l,m - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m) = real(mt_genrand_real2(mt),kind=wf) - end do - end do - end do - end do - end do - end subroutine mt_random_number_r_5 - - subroutine mt_random_number_r_6a(harvest) - real(kind = wf), intent(out) :: harvest(:,:,:,:,:,:) - call mt_random_number_r_6(the_mt, harvest) - end subroutine mt_random_number_r_6a - - subroutine mt_random_number_r_6(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest(:,:,:,:,:,:) - integer :: i,j,k,l,m,n - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n) = real(mt_genrand_real2(mt),kind=wf) - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_r_6 - - subroutine mt_random_number_r_7a(harvest) - real(kind = wf), intent(out) :: harvest(:,:,:,:,:,:,:) - call mt_random_number_r_7(the_mt, harvest) - end subroutine mt_random_number_r_7a - - subroutine mt_random_number_r_7(mt, harvest) - type(mt19937), intent(inout) :: mt - real(kind = wf), intent(out) :: harvest(:,:,:,:,:,:,:) - integer :: i,j,k,l,m,n,o - do o = 1, size(harvest,dim=7) - do n = 1, size(harvest,dim=6) - do m = 1, size(harvest,dim=5) - do l = 1, size(harvest,dim=4) - do k = 1, size(harvest,dim=3) - do j = 1, size(harvest,dim=2) - do i = 1, size(harvest, dim=1) - harvest(i,j,k,l,m,n,o) = real(mt_genrand_real2(mt),kind=wf) - end do - end do - end do - end do - end do - end do - end do - end subroutine mt_random_number_r_7 - - ! generates a random number on [0,1) with 53-bit resolution - function genrand_res53( ) result( r ) - real( kind = wr ) :: r - r = mt_genrand_res53(the_mt) - end function genrand_res53 - - function mt_genrand_res53( mt ) result( r ) - type(mt19937), intent(inout) :: mt - real( kind = wr ) :: r - integer( kind = wi ) :: a, a0, a1 - integer( kind = wi ) :: b, b0, b1 - - a = ishft( mt_genrand_int32( mt ), -5 ) - a0 = ibits( a, 0, hbs ) - a1 = ibits( a, hbs, hbs ) - b = ishft( mt_genrand_int32( mt ), -6 ) - b0 = ibits( b, 0, hbs ) - b1 = ibits( b, hbs, hbs ) - r = real( a1, kind = wr ) / 2048.0_wr - r = real( a0, kind = wr ) / 134217728.0_wr + r - r = real( b1, kind = wr ) / 137438953472.0_wr + r - r = real( b0, kind = wr ) / 9007199254740992.0_wr + r - end function mt_genrand_res53 - ! These real versions are due to Isaku Wada, 2002/01/09 added - - !! Returns whether mt rn returns same number as original source. - function mt_validate() - logical :: mt_validate - integer :: i - integer(kind=wi) :: init(4), ia - data init /Z'123', Z'234', Z'345', Z'456'/ - type(mt19937) :: mt - - call mt_init_by_array(mt,init) - do i = 1, 1000 - ia = mt_genrand_int32(mt); - end do - mt_validate = ia == (-834941650) - end function mt_validate - -end module mt19937_module - diff --git a/Tests/F_BaseLib/t_bl_prof.f90 b/Tests/F_BaseLib/t_bl_prof.f90 deleted file mode 100644 index dc6db8c2f..000000000 --- a/Tests/F_BaseLib/t_bl_prof.f90 +++ /dev/null @@ -1,55 +0,0 @@ -subroutine t_bl_prof - use parallel - use bl_prof_module - implicit none - type(bl_prof_timer), save :: bpt - real :: a(100), b(100) - integer :: i - - call bl_prof_initialize(on = .true.) - call build(bpt, "t_bl_prof") - b = (/(i,i=1,100)/) - call t() - do i = 1, 100 - a = sin(b) - end do - call t1() - call destroy(bpt) - call bl_prof_glean("bl_prof_res") - call bl_prof_finalize - -contains - - subroutine t - type(bl_prof_timer), save :: bpt - integer i - call build(bpt, "t", no_start = .true.) - call start(bpt) - do i = 1, 100 - a = sin(b) - a = sin(b) - end do - call destroy(bpt) - end subroutine t - - subroutine t1 - type(bl_prof_timer), save :: bpt - integer i - call build(bpt, "t1", no_start = .true.) - call start(bpt) - do i = 1, 100*parallel_myproc() - a = sin(b) - a = sin(b) - end do - call destroy(bpt) - end subroutine t1 - - subroutine g - type(bl_prof_timer), save :: bpt - call build(bpt, "t") ! (sic) - call start(bpt) - call stop(bpt) - call destroy(bpt) - end subroutine g - -end subroutine t_bl_prof diff --git a/Tests/F_BaseLib/t_bx.f90 b/Tests/F_BaseLib/t_bx.f90 deleted file mode 100644 index e775876ef..000000000 --- a/Tests/F_BaseLib/t_bx.f90 +++ /dev/null @@ -1,238 +0,0 @@ -subroutine t_bx - use box_module - implicit none - type(box) :: bx - bx = allbox(2) - print *, bx - bx = allbox_grc(bx, grow = 2) - print *, bx -contains - function allbox_grc(bx, grow, refine, coarsen) result(r) - type(box) :: r - type(box), intent(in) :: bx - integer, intent(in), optional :: grow, refine, coarsen - integer :: dm - r = bx - dm = r%dim - if ( present(grow) ) then - else if ( present(refine) ) then - else if ( present(coarsen) ) then - end if - end function allbox_grc -end subroutine t_bx - -subroutine t_ba_self_intersection - use bl_error_module - use ml_boxarray_module - use box_util_module - use layout_module - use bl_prof_module - implicit none - type(boxarray) :: ba - integer :: dm - integer :: ng - integer, allocatable, dimension(:) :: ext, plo, phi, vsz, crsn, vrng - type(ml_boxarray) :: mba - character(len=64) :: test_set - integer :: i, n, j, k, sz - type(box) :: bx, cbx - type(bl_prof_timer), save :: bpt, bpt_r, bpt_s, bpt_b - integer :: cnt, cnt1, cnt2, cnt3 - integer(ll_t) :: vol, vol1, vol2, vol3 - integer, pointer :: ipv(:) - integer :: mxsz - logical :: verbose - type(layout) :: la - - type bin - integer, pointer :: iv(:) => Null() - end type bin - - type(bin), allocatable, dimension(:,:,:) :: bins - - call build(bpt, "t_ba_self_intersection") - - verbose = .true. - ng = 1 - test_set = "grids.5034" - test_set = "grids.1071" - test_set = "grids.213" - test_set = "grids.60" - - call build(bpt_r, "ba_read") - call read_a_mglib_grid(mba, test_set) - call destroy(bpt_r) - - ba = mba%bas(1) - call build(la, ba, pd = mba%pd(1)) - - dm = get_dim(ba) - - allocate(ext(dm), plo(dm), phi(dm), vsz(dm), crsn(dm), vrng(dm)) - - cnt = 0; cnt1 = 0; cnt2 = 0; cnt3 = 0 - vol = 0; vol1 = 0; vol2 = 0; vol3 = 0 - crsn = 32 - - call init_box_hash_bin(la) - - call build(bpt_b, "build hash") - bx = boxarray_bbox(ba) - cbx = coarsen(bx,crsn) - plo = lwb(cbx) - phi = upb(cbx) - - vsz = -Huge(1) - do n = 1, nboxes(ba) - vsz = max(vsz,extent(get_box(ba,n))) - end do - print *, 'max extent', vsz - print *, 'crsn max extent', int_coarsen(vsz,crsn+1) - vrng = int_coarsen(vsz,crsn+1) - print *, 'vrng = ', vrng - - allocate(bins(plo(1):phi(1),plo(2):phi(2),plo(3):phi(3))) - do k = plo(3), phi(3); do j = plo(2), phi(2); do i = plo(1), phi(1) - allocate(bins(i,j,k)%iv(0)) - end do;end do; end do - - do n = 1, nboxes(ba) - ext = int_coarsen(lwb(get_box(ba,n)),crsn) - if ( .not. contains(cbx, ext) ) then - call bl_error("Not Contained!") - end if - sz = size(bins(ext(1),ext(2),ext(3))%iv) - allocate(ipv(sz+1)) - ipv(1:sz) = bins(ext(1),ext(2),ext(3))%iv(1:sz) - ipv(sz+1) = n - deallocate(bins(ext(1),ext(2),ext(3))%iv) - bins(ext(1),ext(2),ext(3))%iv => ipv - end do - call destroy(bpt_b) - - if ( verbose ) then - call print(bx, 'bbox(ba) ') - call print(cbx, 'coarsen(bbox(ba),crsn) ') - print *, 'extents(bx)', extent(bx) - print *, 'extents(cbx)', extent(cbx) - print *, 'plo ', plo - print *, 'phi ', phi - mxsz = -Huge(1) - do k = plo(3), phi(3); do j = plo(2), phi(2); do i = plo(1), phi(1) - mxsz = max(mxsz, size(bins(i,j,k)%iv)) - end do;end do; end do - print *, 'max bin sz ', mxsz - - sz = Huge(1) - do k = plo(3), phi(3); do j = plo(2), phi(2); do i = plo(1), phi(1) - sz = min(sz, size(bins(i,j,k)%iv)) - end do;end do; end do - print *, 'min bin sz ', sz - - sz = 0 - do k = plo(3), phi(3); do j = plo(2), phi(2); do i = plo(1), phi(1) - sz = sz + size(bins(i,j,k)%iv) - end do;end do; end do - print *, 'tot bins ', sz - - if ( sz /= nboxes(ba) ) then - call bl_error("sz /= nboxes(ba): ", sz) - end if - end if - - call build(bpt_s, "ba_s") - do i = 1, nboxes(ba) - bx = grow(get_box(ba,i), ng) - call self_intersection(bx, ba) - call self_intersection_1(bx, ba) - call la_chk_box(la, bx) - end do - call destroy(bpt_s) - - ! Just a check of the result - print *, 'cnt = ', cnt - print *, 'cnt1 = ', cnt1 - print *, 'cnt2 = ', cnt2 - print *, 'cnt3 = ', cnt3 - print *, 'vol = ', vol - print *, 'vol1 = ', vol1 - print *, 'vol2 = ', vol2 - print *, 'vol3 = ', vol3 - - do k = plo(3), phi(3); do j = plo(2), phi(2); do i = plo(1), phi(1) - deallocate(bins(i,j,k)%iv) - end do;end do; end do - - call destroy(la) - call destroy(mba) - call destroy(bpt) -contains - - subroutine la_chk_box(la, bx) - type(layout), intent(inout) :: la - type(box), intent(in) :: bx - type(box_intersector), pointer :: bi(:) - integer :: i - type(bl_prof_timer), save :: bpt_h1 - call build(bpt_h1, "ba_h1") - bi => layout_get_box_intersector(la, bx) - do i = 1, size(bi) - cnt3 = cnt3 + 1 - vol3 = vol3 + volume(bi(i)%bx) - end do - deallocate(bi) - call destroy(bpt_h1) - end subroutine la_chk_box - - subroutine self_intersection(bx, ba) - type(box), intent(in) :: bx - type(boxarray), intent(in) :: ba - integer :: i - type(bl_prof_timer), save :: bpt_i - type(box) :: bx1 - call build(bpt_i, "ba_i") - do i = 1, nboxes(ba) - bx1 = intersection(bx, get_box(ba,i)) - if ( empty(bx1) ) cycle - cnt = cnt + 1 - vol = vol + volume(bx1) - end do - call destroy(bpt_i) - - end subroutine self_intersection - - subroutine self_intersection_1(bx, ba) - type(box), intent(in) :: bx - type(boxarray), intent(in) :: ba - integer :: i - type(bl_prof_timer), save :: bpt_i - type(box) :: bx1(nboxes(ba)),bx2(nboxes(ba)) - logical :: is_empty(nboxes(ba)) - call build(bpt_i, "ba_i1") - do i = 1, nboxes(ba) - bx2(i) = get_box(ba,i) - end do - call box_intersection_and_empty(bx1, is_empty, bx, bx2) - do i = 1, size(bx1) - if ( is_empty(i) ) cycle - vol1 = vol1 + volume(bx1(i)) - end do - cnt1 = cnt1 + count(.not.is_empty) - call destroy(bpt_i) - end subroutine self_intersection_1 - -end subroutine t_ba_self_intersection - -function log2(vin) result(r) - implicit none - integer :: r - integer, intent(in) :: vin - integer :: v - r = 0 - v = vin - do - v = ishft(v, -1) - if ( v == 0 ) exit - r = r + 1 - end do -end function log2 diff --git a/Tests/F_BaseLib/t_bxasc.f90 b/Tests/F_BaseLib/t_bxasc.f90 deleted file mode 100644 index 9d019776f..000000000 --- a/Tests/F_BaseLib/t_bxasc.f90 +++ /dev/null @@ -1,88 +0,0 @@ -subroutine t_boxassoc_1 - use layout_module - - implicit none - type(boxassoc) :: bxasc - type(boxarray) :: ba - integer :: dm - integer :: ng - integer :: pd_xyz(MAX_SPACEDIM) - integer :: ba_maxsize - type(layout) :: la - logical :: nodal(MAX_SPACEDIM) - type(box) :: bxs(4) - logical pmask(MAX_SPACEDIM) - type(box) :: pd - integer :: i - - dm = 2 - ng = 1 - pd_xyz = 32 - ba_maxsize = 16 - - nodal = .true. - nodal = .false. - pmask = .true. - - if ( .false. ) then - bxs(1) = make_box((/0,0/),(/3,3/)) - bxs(2) = make_box((/4,4/),(/7,7/)) - bxs(3) = make_box((/0,8/),(/7,16/)) - call build(ba, bxs(1:2)) - else - call build(ba, make_box((/(0,i=1,dm)/), pd_xyz(1:dm)-1)) - call boxarray_maxsize(ba, ba_maxsize) - end if - - pd = bbox(ba) - call build(la, ba, pd = pd, pmask = pmask(1:dm)) - - call boxassoc_build(bxasc, la%lap, ng, nodal = nodal(1:dm), cross = .false.) - - call boxassoc_destroy(bxasc) - call destroy(la) - call boxarray_destroy(ba) - -end subroutine t_boxassoc_1 - -subroutine t_boxassoc - use layout_module - use ml_boxarray_module - use box_util_module - implicit none - type(boxassoc) :: bxasc - type(boxarray) :: ba - integer :: dm - integer :: ng - type(layout) :: la - logical pmask(MAX_SPACEDIM) - type(box) :: pd - type(ml_boxarray) :: mba - character(len=64) :: test_set - logical :: nodal(MAX_SPACEDIM) - - ng = 1 - test_set = "grids.5034" - - nodal = .false. - - call read_a_mglib_grid(mba, test_set) - - ba = mba%bas(1) - pd = mba%pd(1) - - dm = get_dim(ba) - - call build(la, ba, pd = pd, pmask = pmask(1:dm)) - - call boxassoc_build(bxasc, la%lap, ng, nodal = nodal, cross = .false.) - - !! call boxassoc_print(bxasc) - - call boxassoc_destroy(bxasc) - - call destroy(la) - call destroy(mba) - -end subroutine t_boxassoc - diff --git a/Tests/F_BaseLib/t_cls.f90 b/Tests/F_BaseLib/t_cls.f90 deleted file mode 100644 index 55728f376..000000000 --- a/Tests/F_BaseLib/t_cls.f90 +++ /dev/null @@ -1,46 +0,0 @@ -subroutine t_cluster - - use cluster_module - use multifab_module - - type(lmultifab) tags - type(lmultifab) ctags - type(boxarray) ba, rba - type(layout) la, cla - type(box) bx - integer ratio - - bx = make_box((/0,0,0/),(/7,7,7/)) - - ratio = 2 - - call build(ba,bx) - call build(la, ba, bx) - call destroy(ba) - call build(tags,la,1,0) - call setval(tags,.true.,all=.true.) -! call setval(tags,.true.) - -! call print(tags, 'tags') - -! call tagboxes_coarsen(tags,ctags,ratio) - - call cluster(rba, tags, 2) - -! call print(ctags, 'ctags') -! print*, '' - - call print(rba, "grids") - - call destroy(rba) - -! cla = ctags%la - -! call destroy(ctags) -! call destroy(cla) - - - call destroy(tags) - call destroy(la) - -end subroutine t_cluster diff --git a/Tests/F_BaseLib/t_knapsack.f90 b/Tests/F_BaseLib/t_knapsack.f90 deleted file mode 100644 index 4a9a956cc..000000000 --- a/Tests/F_BaseLib/t_knapsack.f90 +++ /dev/null @@ -1,58 +0,0 @@ -subroutine t_knapsack - use bl_IO_module - use f2kcli - use boxarray_module - use box_util_module - use knapsack_module - use list_box_module - integer :: np, n - real(kind=dp_t) :: thresh - logical :: verbose - integer, allocatable :: iweights(:), prc(:) - integer :: i - character(len=128) fname - type(boxarray) :: ba - type(box) :: bx - - if ( command_argument_count() < 1 ) then - np = 128 - else - call get_command_argument(1, value = fname) - read(fname,*) np - end if - - print*, 'np = ', np - -! call read_a_mglib_grid_ba(ba, bx, '../../data/mglib_grids/grids.5034') - call read_a_mglib_grid_ba(ba, bx, '../../data/mglib_grids/grids.1071') - - if (contains(ba,ba)) then - print*, 'ba contains ba' - else - print*, 'ba does NOT contain ba' - endif - - if (contains(ba,bx)) then - print*, 'ba contains empty bx' - else - print*, 'ba does NOT contain empty bx' - endif - - n = nboxes(ba) - - allocate(iweights(n)) - do i = 1, n - iweights(i) = volume(get_box(ba,i)) - end do - - allocate(prc(n)) - - verbose = .true.; thresh = 1.0_dp_t - - call knapsack_i(prc, iweights, np, verbose, thresh) - - call destroy(ba) - -end subroutine t_knapsack - - diff --git a/Tests/F_BaseLib/t_main.f90 b/Tests/F_BaseLib/t_main.f90 deleted file mode 100644 index 105a5ab82..000000000 --- a/Tests/F_BaseLib/t_main.f90 +++ /dev/null @@ -1,807 +0,0 @@ -subroutine t_gatherv - - use parallel - implicit none - integer i,n - integer, allocatable :: rcvc(:), rcvd(:) - real(dp_t), allocatable :: snd(:), rcv(:) - ! - ! Each CPU will send 3+parallel_nprocs() chunks of data to IOproc. - ! The data will be initialized to their respective parallel_myproc(). - ! - if (parallel_IOProcessor()) then - - allocate(rcvc(0:parallel_nprocs()-1), rcvd(0:parallel_nprocs()-1)) - - rcvd(0) = 0 - rcvc(0) = 3 - - do i = 1, parallel_nprocs()-1 - rcvc(i) = 3 + i - rcvd(i) = rcvd(i-1) + rcvc(i-1) - end do - - allocate(rcv(0:sum(rcvc)-1)) - endif - - n = parallel_myproc() + 3 - - allocate(snd(n)) - - snd = parallel_myproc() - - call parallel_gather(snd,n,rcv,rcvc,rcvd) - - if (parallel_IOProcessor()) then - do i = 0, parallel_nprocs()-1 - print*, 'proc#', i, rcv(rcvd(i):rcvd(i)+rcvc(i)-1) - end do - end if - -end subroutine t_gatherv - -subroutine t_mt_random_numbers - use mt19937_module - implicit none - integer n - integer, allocatable :: gt(:) - real a - - print *, 'MT_VALIDATE() = ', mt_validate() - call mt_random_seed(size = n) - print *, 'MT_RANDOM_SEED(SIZE) ', n - allocate(gt(n)) - print *, 'MT_RANDOM_SEED(GET)' - call mt_random_seed(get = gt) - call mt_random_number(a) - print *, 'MT_RANDOM_NUMBER(a) = ', a - call mt_random_number(a) - print *, 'MT_RANDOM_NUMBER(a) = ', a - print *, 'MT_RANDOM_SEED(PUT)' - call mt_random_seed(put = gt) - call mt_random_number(a) - print *, 'MT_RANDOM_NUMBER(a) = ', a - call mt_random_number(a) - print *, 'MT_RANDOM_NUMBER(a) = ', a -end subroutine t_mt_random_numbers - -subroutine t_plotfile - use f2kcli - use plotfile_module - use bl_IO_module - use bl_error_module - implicit none - type(plotfile) pf - integer :: unit - integer :: i - character(len=256) :: pfname - - if ( command_argument_count() /= 1 ) & - call bl_error('number of args') - call get_command_argument(1, pfname) - - unit = unit_new() - call build(pf, pfname, unit) - write(*,'("PLOTFILE: ", a)') pfname - write(*,'("Time : ", g15.10)') plotfile_time(pf) - write(*,'("Number of Levels ", i15)') plotfile_nlevels(pf) - if ( plotfile_nlevels(pf) > 0 ) then - write(*,'("Refinement ratio : ")', advance='no') - do i = 1, plotfile_nlevels(pf)-1 - write(*, '(i5)', advance='no') plotfile_refrat_n(pf, i) - end do - write(*,fmt='()') - end if - write(*,'("Number of Variables: ", i15)') plotfile_nvars(pf) - do i = 1, plotfile_nvars(pf) - write(*,'(i3,1x, a20)') i, adjustr(plotfile_var_name(pf, i)) - end do - do i = 1, plotfile_nlevels(pf) - write(*,*) 'level ', i, ' has ', plotfile_nboxes_n(pf, i), ' grids' - end do - call destroy(pf) - -end subroutine t_plotfile - -subroutine t_box_conn - use ml_boxarray_module - use box_util_module - implicit none - type(ml_boxarray) :: mba - integer :: i - integer :: ml - real(kind=dp_t) :: d - - call ml_boxarray_read_boxes(mba, "../../data/grids/3D_4_level_96x96x96") - - call box_conn(mba%bas(4)) - - do i = 1, mba%nlevel - ml = local_max_mg_levels(mba%bas(i),1) - print *, i, "mg_levels: ", ml - d = boxarray_dvolume(mba%bas(i)) - print *, i, ": ", d, " => ", d/(2**3)**(ml-1) - end do - -contains - subroutine box_conn(ba) - use bl_IO_module - type(boxarray), intent(in) :: ba - integer :: i, j - type(box):: b1, b2 - integer :: cnt - integer :: vol - integer :: un - un = unit_new() - open(un,file='conn', status = 'replace', action = 'write') - write(un,fmt='(1x,i10)') nboxes(ba) - do i = 1, nboxes(ba) - b1 = grow(get_box(ba,i),1) - cnt = 0 - do j = 1, nboxes(ba) - if ( i == j ) cycle - b2 = get_box(ba,j) - if ( intersects(b1, b2) ) then - cnt = cnt + 1 - end if - end do - vol = box_dvolume(get_box(ba,i)) - write(un,fmt='(1x,i10,1x,i10,1x,i10)', advance='no') i, vol, cnt - do j = 1, nboxes(ba) - if ( i == j ) cycle - b2 = get_box(ba,j) - if ( intersects(b1, b2) ) then - write(un,fmt='(1x,i5)',advance='no') j - end if - end do - write(un,fmt='()') - end do - close(un) - end subroutine box_conn - function local_max_mg_levels(ba, min_size) result(r) - type(boxarray), intent(in) :: ba - integer, intent(in), optional :: min_size - integer :: r - integer, parameter :: rrr = 2 - type(box) :: bx, bx1 - integer :: i, rr, lmn - lmn = 1; if ( present(min_size) ) lmn = min_size - r = 1 - rr = rrr - do - do i = 1, nboxes(ba) - bx = get_box(ba,i) - bx1 = coarsen(bx, rr) - if ( any(extent(bx1) < lmn) ) return - if ( bx /= refine(bx1, rr) ) then - return - end if - end do - rr = rr*rrr - r = r + 1 - end do - end function local_max_mg_levels -end subroutine t_box_conn - -subroutine t_boxarray - use boxarray_module - type(boxarray) :: bao, ba - type(box) :: pd - integer :: dm - integer :: pd_xyz(MAX_SPACEDIM) - integer :: ba_maxsize - - dm = 2 - pd_xyz = 32 - ba_maxsize = 32 - - call box_build_2(pd, (/(0,i=1,dm)/), pd_xyz(1:dm)-1) - call boxarray_build_bx(ba, pd) - call boxarray_maxsize(ba, ba_maxsize) - call boxarray_print(ba, "boxarray") - - call boxarray_boundary_n_d_f(bao, ba, 1, 1, 1) - - call boxarray_print(bao, "boundary") - -end subroutine t_boxarray - -subroutine t_mf - use multifab_module - use bl_IO_module - use fabio_module - implicit none - integer, parameter :: dm = 2 -! integer, parameter :: dm = 3 - type (box) :: pd - type (box), dimension(4) :: bxs - type (boxarray):: ba - type (layout) :: la - type (multifab) :: mf - logical :: pmask(2),nodal(2) -! logical :: pmask(3),nodal(3) - -!pmask = (/.false.,.true./) -pmask = .false. -pmask = .true. -pmask = (/.true.,.false./) -nodal = .false. - -!pmask = (/.false.,.false.,.true./) -!pmask = (/.true.,.false.,.true./) - -! bxs(1) = make_box((/0,0,0/), (/0,0,0/)) -! bxs(2) = make_box((/152, 72/), (/231,103/)) - -! bxs(1) = make_box((/0,0/), (/1,1/)) -! bxs(2) = make_box((/0,2/), (/1,3/)) -! bxs(3) = make_box((/2,0/), (/3,1/)) -! bxs(4) = make_box((/2,2/), (/3,3/)) - -! bxs(1) = make_box((/0,0,0/), (/3,3,3/)) -! bxs(1) = make_box((/0,0,0/), (/3,3,3/)) - -! bxs(1) = make_box((/0,0/), (/0,0/)) -! bxs(2) = make_box((/1,0/), (/1,0/)) -! bxs(3) = make_box((/2,0/), (/2,0/)) -! bxs(4) = make_box((/3,0/), (/3,0/)) - - bxs(1) = make_box((/0,0/), (/7,7/)) - bxs(2) = make_box((/8,8/), (/15,15/)) - -! bxs(1) = make_box((/0,0/), (/3,3/)) - - call build(ba, bxs(1:2)) - -! pd = make_box((/0,0/), (/511,255/)) -! pd = make_box((/0,0/), (/7,7/)) -! pd = make_box((/0,0,0/), (/3,3,3/)) -! pd = make_box((/0,0/), (/0,0/)) -! pd = make_box((/0,0/), (/3,0/)) -! pd = make_box((/0,0/), (/1,1/)) - pd = make_box((/0,0/), (/15,15/)) - -!call multifab_set_behavior(fb_fancy = .false.) - - call parallel_barrier() -! call boxarray_print(ba, "ba") - call build(la, ba, pd = pd, pmask = pmask) - call parallel_barrier() - - call multifab_build(mf, la, nc = 1, ng = 1, nodal = nodal) - - call parallel_barrier() - call print(mf, "before") - -! call multifab_internal_sync(mf) - - call multifab_fill_boundary(mf, cross = .false.) - call parallel_barrier() - call print(mf, "after") - call destroy(mf) - call destroy(la) - call destroy(ba) - -contains - - subroutine mf_print(mf, str) - type(multifab), intent(in) :: mf - character(len=*), intent(in) :: str - integer n - real(kind=dp_t), pointer :: fp(:,:,:,:) - type(box) :: pbx, bx - print *, "MF: ", str - do n = 1, nfabs(mf) - fp => dataptr(mf, n) - bx = get_box(mf, n) - pbx = get_pbox(mf, n) - call array_print_2d(fp(:,:,1,1), 6, lwb(pbx), lwb(bx), upb(bx)) - end do - end subroutine mf_print - - subroutine array_print_2d(ar, unit, plo, lo, hi) - use bl_types - integer, intent(in) :: plo(:), lo(:), hi(:) - real(kind=dp_t), intent(in) :: ar(plo(1):,plo(2):) - integer, intent(in) :: unit - integer :: i, j - integer :: wid - character :: c - wid = size(ar,dim=1)*10 - do j = ubound(ar,2), lbound(ar,2), -1 - if ( j == hi(2) .or. j == lo(2)-1 ) then - write(unit=unit,fmt='(a)') repeat('-',wid) - end if - do i = lbound(ar,1), ubound(ar,1) - c = ' ' - if ( i == lo(1)-1 .or. i == hi(1) ) c = '|' - write(unit=unit,fmt='(f9.4,a1)',advance = 'no') ar(i,j), c - end do - write(unit=unit,fmt='()') - end do - write(unit=unit,fmt='()') - end subroutine array_print_2d -end subroutine t_mf - -subroutine t_mf_fabio - use multifab_module - use bl_IO_module - use fabio_module - implicit none - type (box) :: bx - type (box), dimension(4) :: bxs - type (boxarray):: ba - type (layout) :: la - type (multifab) :: mf - type (boxassoc) :: bxasc - integer :: rrs(1) - logical :: nodal(MAX_SPACEDIM) - - nodal = .false. - - rrs = 2 - bx = refine(unit_box(dim=2),2) - bxs(1) = bx - bxs(2) = shift(bx,2,dim=1) - bxs(3) = shift(bx,2,dim=2) - bxs(4) = shift(bx,2) - call build(ba, bxs) - call boxarray_print(ba, "BOXARRAY") - call build(la, ba, boxarray_bbox(ba)) - bxasc = layout_boxassoc(la, 1, nodal = nodal, cross = .false.) - call multifab_build(mf, la, nc = 1, ng=1) - call setval(mf, -1.0_dp_t, ALL=.True.) -! do n = 1, nfabs(mf) -! fp => dataptr(mf, n, get_ibox(mf, n)) -! nx = size(fp,1) -! ny = size(fp,2) -! do j = 1, ny -! do i = 1, nx -! fp(i,j,1,1) = (i-1) + 10*(j-1) -! end do -! end do -! end do - call print(mf, "before") - call fabio_multifab_write_d(mf, "tdir", "flan") - call fabio_ml_multifab_write_d((/mf/), rrs(1:0), "tdir1") - call destroy(mf) - call destroy(la) - call destroy(ba) - -end subroutine t_mf_fabio -subroutine t_nodal_mf_fabio - use multifab_module - use bl_IO_module - use fabio_module - implicit none - type (box) :: bx - type (box), dimension(4) :: bxs - type (boxarray):: ba - type (layout) :: la - type (multifab) :: mf - type (multifab) :: mfc - integer :: dm - logical, allocatable :: nodal(:) - - dm = 2 - allocate(nodal(dm)); nodal = .true. - bx = refine(unit_box(dim=dm),16) - bxs(1) = bx - bxs(2) = shift(bx,16,dim=1) - bxs(3) = shift(bx,16,dim=2) - bxs(4) = shift(bx,16) - call build(ba, bxs) - call boxarray_print(ba, "BOXARRAY") - call build(la, ba, boxarray_bbox(ba)) - call destroy(ba) - call multifab_build(mf, la, nc = 1, ng=1, nodal = nodal) - call setval(mf, 1.0_dp_t, ALL=.True.) - call fabio_multifab_write_d(mf, "tdir", "nd_flan", all = .true.) - call fabio_multifab_read_d(mfc, "tdir", "nd_flan") - ba = get_boxarray(mfc) - call boxarray_print(ba, "BA2") - call destroy(mf) - call destroy(la) -end subroutine t_nodal_mf_fabio - -subroutine t_nodal_mf_fabio_1 - use multifab_module - use bl_IO_module - use fabio_module - implicit none - type (box) :: bx - type (box), dimension(1) :: bxs - type (boxarray):: ba - type (layout) :: la - type (multifab) :: mf - type (multifab) :: mfc - type (boxassoc) :: bxasc - integer :: i, j, n, nx, ny, dm - logical, allocatable :: nodal(:) - real(kind=dp_t), pointer :: fp(:,:,:,:) - - dm = 2 - allocate(nodal(dm)); nodal = .true. - bx = refine(unit_box(dim=dm),4) - bxs(1) = bx -! bxs(2) = shift(bx,2,dim=1) -! bxs(3) = shift(bx,2,dim=2) -! bxs(4) = shift(bx,2) - call build(ba, bxs) - call boxarray_print(ba, "BOXARRAY") - call build(la, ba, boxarray_bbox(ba)) - bxasc = layout_boxassoc(la, 1, nodal = nodal, cross = .false.) - call multifab_build(mf, la, nc = 1, ng=1, nodal = nodal) - call multifab_build(mfc, la, nc = 1, ng=1) - call setval(mf, -1.0_dp_t, ALL=.True.) - call setval(mfc, -1.0_dp_t, ALL=.True.) - do n = 1, nfabs(mf) - fp => dataptr(mf, n, get_ibox(mf, n)) - nx = size(fp,1) - ny = size(fp,2) - do j = 1, ny - do i = 1, nx - fp(i,j,1,1) = (i-1) !+ 10*(j-1) - end do - end do - fp => dataptr(mfc, n, get_ibox(mf, n)) - nx = size(fp,1) - ny = size(fp,2) - do j = 1, ny - do i = 1, nx - fp(i,j,1,1) = (i-1) !+ 10*(j-1) - end do - end do - end do - call print(mf, "before") - call print(mfc, "before") - call fabio_multifab_write_d(mf, "tdir", "nd_flan") - call fabio_multifab_write_d(mfc, "tdir", "cc_flan") - call destroy(mf) - call destroy(mfc) - call destroy(la) -end subroutine t_nodal_mf_fabio_1 - -subroutine t_ba - use boxarray_module - use list_box_module - use sort_box_module - implicit none - integer chunk(2), i - type(boxarray) bxa - - call build(bxa, make_box((/2,8/), (/127,127/))) - chunk = 64 - call print(bxa, "before maxsize") - call boxarray_maxsize(bxa, chunk) - call print(bxa, "after maxsize") - print *, 'volume(bxa) = ', volume(bxa) - do i = 1, nboxes(bxa) - print *, 'vol', volume(get_box(bxa,i)) - end do - call boxarray_simplify(bxa) - print *, 'simplified volume(bxa) = ', volume(bxa) - do i = 1, nboxes(bxa) - print *, 'simplified vol', volume(get_box(bxa,i)) - end do - call destroy(bxa) -end subroutine t_ba - -subroutine t_box_mod - use box_module - use boxarray_module - implicit none - type(box) :: bx, pd, bxi - type(box), allocatable :: r(:,:) - type(boxarray) :: ba - integer, parameter :: dm = 2 - integer :: lo(dm), hi(dm), hi1(dm) - integer :: m - logical :: pmask(dm) - - allocate(r(3**dm,2)) - lo = 0 - hi = 3 - hi1 = 7 - pmask = .true. - if ( dm > 1 ) pmask(2) = .false. - - call build(bxi, lo, hi) - call build(pd, lo, hi1) - - call print(bxi, "bx") - call print(pd, "pd") - - call boxarray_box_boundary_n(ba, bxi, 1) - do m = 1, nboxes(ba) - bx = get_box(ba, m) - print *, 'm = ', m - call print(bx, "bx") - end do - call destroy(ba) - -end subroutine t_box_mod - - -subroutine t_domain - use bl_error_module - use parallel - use f2kcli - use bl_IO_module - use ml_boxarray_module - use box_util_module - use mt19937_module - implicit none - type(ml_boxarray) :: mba - character(len=128) :: test_set - logical :: test_set_mglib - logical :: test_set_hgproj - integer :: narg, farg - integer :: test_lev - character(len=128) :: fname - logical :: test_random_boxes - integer :: random_min_size, random_max_size - integer :: random_blocking_factor, random_num_boxes, random_iseed - integer :: pd_xyz(MAX_SPACEDIM) - integer :: dm - integer :: i, un - logical :: verbose - logical :: lexist - type(box) :: pd - type(box), dimension(:), pointer :: bxp - type(boxarray) :: ba, bado - - namelist /probin/ verbose - namelist /probin/ dm - namelist /probin/ test_random_boxes - namelist /probin/ random_blocking_factor, random_min_size - namelist /probin/ random_max_size, random_num_boxes, random_iseed - namelist /probin/ test_set - namelist /probin/ test_set_mglib - namelist /probin/ test_set_hgproj - namelist /probin/ test_lev - namelist /probin/ pd_xyz - - verbose = .true. - dm = 2 - pd_xyz = 32 - - test_set_mglib = .FALSE. - test_set_hgproj = .FALSE. - test_lev = 0 - test_set = '' - - test_random_boxes = .false. - random_blocking_factor = 8 - random_blocking_factor = 1 - random_min_size = 8 - random_max_size = 32 - random_num_boxes = 1 - random_iseed = 1 - - narg = command_argument_count() - farg = 1 - - if ( narg >= 1 ) then - call get_command_argument(farg, value = fname) - inquire(file = fname, exist = lexist ) - if ( lexist ) then - farg = farg + 1 - un = unit_new() - open(unit=un, file = fname, status = 'old', action = 'read') - read(unit=un, nml = probin) - close(unit=un) - end if - end if - - do while ( farg <= narg ) - - call get_command_argument(farg, value = fname) - - select case (fname) - case ('--dim') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) dm - case ('--verbose') - verbose = .true. - - case ('--test_set') - farg = farg + 1 - call get_command_argument(farg, value = test_set) - case ('--test_lev') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) test_lev - case ('--test_set_mglib') - test_set_mglib = .True. - case ('--test_set_hgproj') - test_set_hgproj = .True. - - case ('--test_random_boxes') - test_random_boxes = .True. - case ('--random_blocking_factor') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_blocking_factor - case ('--random_min_size') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_min_size - case ('--random_max_size') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_max_size - case ('--random_num_boxes') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_num_boxes - case ('--random_iseed') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_iseed - - case ('--pd_x') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_xyz(1) - case ('--pd_y') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_xyz(2) - case ('--pd_z') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_xyz(3) - case ('--pd_xyz') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) i - pd_xyz = i - - case ('--') - farg = farg + 1 - exit - - case default - if ( .not. parallel_q() ) then - write(*,*) 'UNKNOWN option = ', fname - call bl_error("MAIN") - end if - end select - - farg = farg + 1 - end do - - if ( test_set_hgproj ) then - call read_a_hgproj_grid(mba, test_set) - else if ( test_set_mglib ) then - call read_a_mglib_grid(mba, test_set) - else if ( test_random_boxes ) then - call box_build_2(pd, (/(0,i=1,dm)/), pd_xyz(1:dm)-1) - call init_genrand(random_iseed) - call build_random_boxarray(ba, pd, & - random_num_boxes, random_min_size, & - random_max_size, random_blocking_factor) - call build(mba, ba, pd) - call destroy(ba) - else if ( test_set /= '' ) then - call ml_boxarray_read_boxes(mba, test_set) - else - call box_build_2(pd, (/(0,i=1,dm)/), pd_xyz(1:dm)-1) - call build(ba, pd) - call build(mba, ba) - call destroy(ba) - end if - - if ( test_lev == 0 ) test_lev = mba%nlevel - - if ( .false. .and. verbose ) then - call print(mba) - end if - - call copy(ba, mba%bas(test_lev)) - pd = mba%pd(test_lev) - - call boxarray_simplify(ba) - - call boxarray_sort(ba) - -! call print(ba, "BA") - - bxp => dataptr(ba) - - if ( .not. boxarray_clean(bxp) ) then - print *, 'ba is not clean' - end if - - print *, 'volume(ba) = ', volume(ba), ' nboxes = ', nboxes(ba) - - call destroy(bado) - call destroy(mba) - call destroy(ba) - - call print(boxarray_mem_stats(), " boxarray") - call print(ml_boxarray_mem_stats(), "ml_boxarray") - -end subroutine t_domain - -subroutine t_box_chop - use box_module - implicit none - type(box) :: bx, bxl, bxr - - bx = make_box((/0,0/), (/3,3/)) - call box_chop(bx, bxl, bxr, 1, 0) - call print(bxl) - call print(bxr) - - bx = make_box((/0,0/), (/3,3/)) - call box_chop(bx, bxl, bxr, 1, 3) - call print(bxl) - call print(bxr) - -end subroutine t_box_chop - -subroutine t_knap - use knapsack_module - implicit none - call t_knapsack -end subroutine t_knap - -subroutine t_timer - use bl_timer_module - implicit none - real(kind=dp_t) d - print *, 'MY_CPU_SECOND_TICK = ', MY_CPU_SECOND_TICK() - print *, 'MY_WALL_SECOND_TICK = ', MY_WALL_SECOND_TICK() - call cpu_second_tick(d) - print *, 'CPU_SECOND_TICK = ', d - call wall_second_tick(d) - print *, 'WALL_SECOND_TICK = ', d -end subroutine t_timer - -subroutine t_bl_types - use bl_types - use bl_IO_module - implicit none - call bl_types_info(unit_stdout()) -end subroutine t_bl_types - -subroutine t_box_read - use box_module - implicit none - type(box) :: bx - open(1, file = "tbox", status="old") - call box_read(bx, 1) - print *, 'bx = ', bx - close(1) -end subroutine t_box_read - -subroutine t_ml_mf_read - use fabio_module - implicit none - character(len=128) root - type(multifab), pointer :: mmf(:) - type(layout) :: la - integer :: n - root = 'plt0000' - allocate(mmf(2)) - call fabio_ml_multifab_read_d(mmf, root, ng = 1) - call fabio_ml_multifab_write_d(mmf, (/2/), "plogo") - do n = 1, size(mmf) - la = get_layout(mmf(n)) - call destroy(mmf(n)) - call destroy(la) - end do - deallocate(mmf) -end subroutine t_ml_mf_read - -subroutine t_fabio_ml_boxarray - use fabio_module - implicit none - type(ml_boxarray) :: mba - call fabio_ml_boxarray_read(mba, "tdir_eig_x") - call ml_boxarray_print(mba) - call destroy(mba) -end subroutine t_fabio_ml_boxarray diff --git a/Tests/F_BaseLib/t_particles.f90 b/Tests/F_BaseLib/t_particles.f90 deleted file mode 100644 index a6b3b4335..000000000 --- a/Tests/F_BaseLib/t_particles.f90 +++ /dev/null @@ -1,292 +0,0 @@ -subroutine t_particle - - use fabio_module - use particle_module - use multifab_module - - integer i, id - type(particle_container) :: v, tv - - type(box) :: bx,bx2 - type(ml_boxarray) :: mba - type(ml_layout) :: mla - type(boxarray) :: ba - double precision :: dx(1,MAX_SPACEDIM), dx2(2,MAX_SPACEDIM) - double precision :: problo(MAX_SPACEDIM) - double precision :: probhi(MAX_SPACEDIM), time - logical :: pmask(MAX_SPACEDIM) - character(len=256):: check_file_name - character(len=5) :: check_index - - type(multifab), allocatable :: mf(:) - - id = 1 - - pmask = .true. - - problo = -1.0d0 - probhi = +1.0d0 - - call particle_setverbose(.true.) - - call particle_container_setdebugging(.true.) - ! - ! Uncomment one of the following lines. - ! - ! Due to having some static storage in the particles code - ! you can only run 2D or 3D but not both in the same executable. - ! -! call test(dm=2, npart=10000) - - call test(dm=3, npart=1000) - -contains - - subroutine test(dm,npart) - - integer, intent(in) :: dm - integer, intent(in) :: npart - - type(particle), pointer :: pp(:) - ! - ! Let's build a single level mla - ! - call bl_assert(dm == 2 .or. dm == 3, 'only 2 or 3-D supported') - - if (parallel_IOProcessor()) then - print*, 'Entered test() with dm = ', dm, ', npart = ', npart - end if - - call build(v) - - if (dm == 2) then - bx = make_box( (/0,0/), (/63,63/) ) - call build(ba,bx) - call boxarray_maxsize(ba,32) - else - bx = make_box( (/0,0,0/), (/31,31,31/) ) - call build(ba,bx) - call boxarray_maxsize(ba,16) - end if - - if (parallel_IOProcessor()) call print(ba) - - do i = 1, dm - dx(1,i) = (probhi(i) - problo(i)) / extent(bx,i) - end do - - call build(mba, ba, bx) - - call destroy(ba) - - if (parallel_IOProcessor()) print*, 'pmask: ', pmask(1:dm) - - call build(mla, mba, pmask(1:dm)) - - call destroy(mba) - - allocate(mf(1)) - - call build(mf(1), mla%la(1), 5, 1) - - call setval(mf(1), 1.0d0) - - call init_random(v,npart,17971,mla,dx,problo,probhi) - ! - ! A quick test of dataptr() - ! - pp => dataptr(v) - - call bl_assert(size(pp) == capacity(v), 'dataptr does not appear to be correct') - - if (parallel_IOProcessor()) then - print*, '' - print*, 'size(v): ', size(v) - print*, '' - ! call print(v, 'after init_random') - print*, '' - end if - - call parallel_barrier() - ! - ! Let's move the particles a bit. - ! - time = 1.0d0 - - do i = 1,10 - if (parallel_IOProcessor()) then - print*, i, 'Calling move_random(one-level mla) ...' - call flush(6) - end if - call move_random(v,mla,dx,problo,probhi) - - write(unit=check_index,fmt='(i5.5)') i - check_file_name = 'chk' // check_index - - if ( parallel_IOProcessor() ) then - call fabio_mkdir(check_file_name) - end if - call parallel_barrier() - - if (parallel_IOProcessor()) then - print*, 'check_file_name: ', check_file_name - end if - - call particle_container_checkpoint(v,check_file_name,mla) - - call build(tv) - - call particle_container_restart(tv,check_file_name,mla,dx,problo) - - call bl_assert(size(tv) == size(v), 'v and tv are NOT the same size') - - call destroy(tv) - - call timestamp(v, 'timestamp_onelev', mf, (/1,3,5/), (/"a", "b", "c"/), time) - - time = time + 0.1d0 - end do - - if (parallel_IOProcessor()) then - print*, '' - print*, 'size(v): ', size(v) - print*, '' - ! call print(v, 'after move_random') - print*, '' - call flush(6) - end if - - call parallel_barrier() - -! call bl_error('Got Here') - - call destroy(mf(1)) - - deallocate(mf) - - call destroy(mla) - ! - ! Now let's try for a multi-level mla - ! - call clear(v) - - call build(v) - - call destroy(ba) - - call build(mba,2,dm) - - mba%rr(1,1:dm) = 2 - - call build(ba,bx) - - if (dm == 2) then - call boxarray_maxsize(ba,32) - else - call boxarray_maxsize(ba,16) - end if - - if (parallel_IOProcessor()) call print(ba, 'level 1') - - do i = 1, dm - dx2(1,i) = (probhi(i) - problo(i)) / extent(bx,i) - dx2(2,i) = dx2(1,i) / 2.0d0 - end do - - call copy(mba%bas(1),ba) - mba%pd(1) = bx - - if (parallel_IOProcessor()) call print(mba%pd(1), 'pd(1)') - - call destroy(ba) - - if (dm == 2) then - bx2 = make_box( (/32,32/), (/95,95/) ) - call build(ba,bx2) - call boxarray_maxsize(ba,32) - else - bx2 = make_box( (/16,16,16/), (/47,47,47/) ) - call build(ba,bx2) - call boxarray_maxsize(ba,16) - end if - - if (parallel_IOProcessor()) call print(ba, 'level 2') - - call copy(mba%bas(2),ba) - mba%pd(2) = refine(mba%pd(1),2) - - if (parallel_IOProcessor()) call print(mba%pd(2), 'pd(2)') - - call destroy(ba) - - call build(mla, mba, pmask(1:dm)) - - call destroy(mba) - - allocate(mf(2)) - - call build(mf(1), mla%la(1), 6, 2) - call build(mf(2), mla%la(2), 6, 2) - - call setval(mf(1), 1.0d0) - call setval(mf(2), 2.0d0) - - call init_random(v,npart,171717171,mla,dx2,problo,probhi) - - if (parallel_IOProcessor()) then - print*, '' - print*, 'size(v): ', size(v) - print*, '' - ! call print(v, 'after init_random using 2-level mla') - print*, '' - call flush(6) - end if - ! - ! Let's move the particles a bit. - ! - do i = 1,10 - if (parallel_IOProcessor()) then - print*, i, 'Calling move_random(two-level mla) ...' - call flush(6) - end if - call move_random(v,mla,dx2,problo,probhi) - - write(unit=check_index,fmt='(i5.5)') i - check_file_name = 'chk' // check_index - - if ( parallel_IOProcessor() ) then - call fabio_mkdir(check_file_name) - end if - call parallel_barrier() - - if (parallel_IOProcessor()) then - print*, 'check_file_name: ', check_file_name - end if - - call particle_container_checkpoint(v,check_file_name,mla) - - call build(tv) - - call particle_container_restart(tv,check_file_name,mla,dx2,problo) - - call bl_assert(size(tv) == size(v), 'v and tv are NOT the same size') - - call destroy(tv) - - call timestamp(v, 'timestamp_twolev', mf, (/1,3,5/), (/"a", "b", "c"/), time) - - time = time + 0.1d0 - end do - - call destroy(mf(1)) - call destroy(mf(2)) - - deallocate(mf) - - call destroy(mla) - - call destroy(v) - - end subroutine test - -end subroutine t_particle diff --git a/Tests/FillBoundaryComparison/GNUmakefile b/Tests/FillBoundaryComparison/GNUmakefile index ebf4c6a3c..df20668fe 100644 --- a/Tests/FillBoundaryComparison/GNUmakefile +++ b/Tests/FillBoundaryComparison/GNUmakefile @@ -1,8 +1,7 @@ DIM = 3 -COMP = Intel -FCOMP = Intel +COMP = gnu DEBUG = FALSE @@ -16,13 +15,13 @@ EBASE = main include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib +vpathdir += $(BOXLIB_HOME)/Src/Base vpath %.c : . $(vpathdir) vpath %.h : . $(vpathdir) @@ -34,4 +33,4 @@ vpath %.f90 : . $(vpathdir) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/FillBoundaryComparison/main.cpp b/Tests/FillBoundaryComparison/main.cpp index 929c1260d..4a35ce055 100644 --- a/Tests/FillBoundaryComparison/main.cpp +++ b/Tests/FillBoundaryComparison/main.cpp @@ -1,8 +1,7 @@ -#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -101,21 +100,21 @@ main (int argc, char* argv[]) ParallelDescriptor::Barrier(); - PArray mfs(nlevels, PArrayManage); - PArray bas(nlevels, PArrayManage); - bas.set(0, new BoxArray(ba)); - mfs.set(0, new MultiFab(ba, 1, 1)); - mfs[0].setVal(1.0); + Array > mfs(nlevels); + Array bas(nlevels); + bas[0] = ba; + mfs[0].reset(new MultiFab(ba, 1, 1)); + mfs[0]->setVal(1.0); for (int lev=1; levsetVal(1.0); } Array points(nlevels); for (int lev=0; levnorm1(); if (ParallelDescriptor::IOProcessor()) { std::cout << points[lev] << " points on level " << lev << std::endl; } @@ -135,12 +134,12 @@ main (int argc, char* argv[]) for (int iround = 0; iround < nrounds; ++iround) { for (int c=0; c<2; ++c) { for (int lev = 0; lev < nlevels; ++lev) { - mfs[lev].FillBoundary_nowait(true); - mfs[lev].FillBoundary_finish(); + mfs[lev]->FillBoundary_nowait(true); + mfs[lev]->FillBoundary_finish(); } for (int lev = nlevels-1; lev >= 0; --lev) { - mfs[lev].FillBoundary_nowait(true); - mfs[lev].FillBoundary_finish(); + mfs[lev]->FillBoundary_nowait(true); + mfs[lev]->FillBoundary_finish(); } } Real e = double(iround+ParallelDescriptor::MyProc()); @@ -168,10 +167,10 @@ main (int argc, char* argv[]) } // - // When MPI3 shared memory is used, the dtor of MultiFab calls MPI functions. - // Because the scope of PArray < MultiFab > mfs is beyond the call to - // BoxLib::Finalize(), which in turn calls MPI_Finalize(), we destroy these - // MultiFabs by hand now. + // When MPI3 shared memory is used, the dtor of MultiFab calls MPI + // functions. Because the scope of mfs is beyond the call to + // BoxLib::Finalize(), which in turn calls MPI_Finalize(), we + // destroy these MultiFabs by hand now. // mfs.clear(); diff --git a/Tests/IOBenchmark/GNUmakefile b/Tests/IOBenchmark/GNUmakefile index 703707cd1..ec1fcb354 100644 --- a/Tests/IOBenchmark/GNUmakefile +++ b/Tests/IOBenchmark/GNUmakefile @@ -16,26 +16,26 @@ USE_CXX11 = TRUE #TRACE_PROFILE = TRUE #COMM_PROFILE = FALSE -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs EBASE = iotest HERE = . -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package INCLUDE_LOCATIONS += $(HERE) -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base CEXE_sources += IOTestDriver.cpp IOTest.cpp -vpath %.H $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.cpp $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.F $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.f $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib -vpath %.f90 $(HERE) $(BOXLIB_HOME)/Src/C_BaseLib +vpath %.H $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.cpp $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.F $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.f $(HERE) $(BOXLIB_HOME)/Src/Base +vpath %.f90 $(HERE) $(BOXLIB_HOME)/Src/Base all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/IOBenchmark/IOTest.cpp b/Tests/IOBenchmark/IOTest.cpp index eb9809ea6..2c62e937d 100644 --- a/Tests/IOBenchmark/IOTest.cpp +++ b/Tests/IOBenchmark/IOTest.cpp @@ -1,16 +1,16 @@ // ------------------------------------------------------------- // IOTest.cpp // ------------------------------------------------------------- -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/Tests/IOBenchmark/IOTestDriver.cpp b/Tests/IOBenchmark/IOTestDriver.cpp index de21b518b..1fc2fc7f4 100644 --- a/Tests/IOBenchmark/IOTestDriver.cpp +++ b/Tests/IOBenchmark/IOTestDriver.cpp @@ -10,12 +10,12 @@ using std::ios; #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include using std::cout; using std::cerr; diff --git a/Tests/LinearSolvers/C_CellMG/COEF_2D.F b/Tests/LinearSolvers/C_CellMG/COEF_2D.F index 2e6b717e9..c22de5861 100644 --- a/Tests/LinearSolvers/C_CellMG/COEF_2D.F +++ b/Tests/LinearSolvers/C_CellMG/COEF_2D.F @@ -3,9 +3,9 @@ #define BL_LANG_FORT #endif -#include +#include #include "COEF_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" c----------------------------------------------------------------------- subroutine FORT_SET_CC_COEF ( diff --git a/Tests/LinearSolvers/C_CellMG/COEF_3D.F b/Tests/LinearSolvers/C_CellMG/COEF_3D.F index 7be4c0bc2..291bebbd9 100644 --- a/Tests/LinearSolvers/C_CellMG/COEF_3D.F +++ b/Tests/LinearSolvers/C_CellMG/COEF_3D.F @@ -3,8 +3,8 @@ #define BL_LANG_FORT #endif -#include -#include "ArrayLim.H" +#include +#include "AMReX_ArrayLim.H" #include "COEF_F.H" c----------------------------------------------------------------------- diff --git a/Tests/LinearSolvers/C_CellMG/COEF_F.H b/Tests/LinearSolvers/C_CellMG/COEF_F.H index 56c02cbe4..8360567b1 100644 --- a/Tests/LinearSolvers/C_CellMG/COEF_F.H +++ b/Tests/LinearSolvers/C_CellMG/COEF_F.H @@ -1,7 +1,7 @@ #ifndef _COEFF_H_ #define _COEFF_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -42,7 +42,7 @@ #endif -#include +#include extern "C" { diff --git a/Tests/LinearSolvers/C_CellMG/GNUmakefile b/Tests/LinearSolvers/C_CellMG/GNUmakefile index 266b7e401..1f499e2e1 100644 --- a/Tests/LinearSolvers/C_CellMG/GNUmakefile +++ b/Tests/LinearSolvers/C_CellMG/GNUmakefile @@ -15,19 +15,19 @@ USE_MPI=FALSE EBASE = main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CEXE_sources += $(EBASE).cpp include ./Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -include $(BOXLIB_HOME)/Src/C_AmrCoreLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package +include $(BOXLIB_HOME)/Src/AmrCore/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_to_F_MG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/F_MG/FParallelMG.mak include $(BOXLIB_HOME)/Src/F_BaseLib/FParallelMG.mak -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/LinearSolvers/C_CellMG/GNUmakefile.dumpi b/Tests/LinearSolvers/C_CellMG/GNUmakefile.dumpi index ee3ab3e79..a5151dd92 100644 --- a/Tests/LinearSolvers/C_CellMG/GNUmakefile.dumpi +++ b/Tests/LinearSolvers/C_CellMG/GNUmakefile.dumpi @@ -17,7 +17,7 @@ EBASE = main LIBRARIES += -ldumpi -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CEXE_sources += $(EBASE).cpp @@ -25,20 +25,20 @@ include ./Make.package #LIBRARIES += /global/homes/j/jpkenny/install-hopper/dumpi-sstmacro-1.1.0/lib -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package LIBRARY_LOCATIONS += /global/homes/j/jpkenny/install-hopper/dumpi-sstmacro-1.1.0/lib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -vpathdir += $(BOXLIB_HOME)/Src/C_BoundaryLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary +vpathdir += $(BOXLIB_HOME)/Src/Boundary -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +vpathdir += $(BOXLIB_HOME)/Src/Base -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib -vpathdir += $(BOXLIB_HOME)/Src/C_AMRLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr +vpathdir += $(BOXLIB_HOME)/Src/Amr INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG vpathdir += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG @@ -56,4 +56,4 @@ vpath %.f90 : . $(vpathdir) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/LinearSolvers/C_CellMG/MACOPERATOR_2D.F b/Tests/LinearSolvers/C_CellMG/MACOPERATOR_2D.F index bf027c9fd..f4d522010 100644 --- a/Tests/LinearSolvers/C_CellMG/MACOPERATOR_2D.F +++ b/Tests/LinearSolvers/C_CellMG/MACOPERATOR_2D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" #include "MACOPERATOR_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Tests/LinearSolvers/C_CellMG/MACOPERATOR_3D.F b/Tests/LinearSolvers/C_CellMG/MACOPERATOR_3D.F index 285c09929..2b27ef76f 100644 --- a/Tests/LinearSolvers/C_CellMG/MACOPERATOR_3D.F +++ b/Tests/LinearSolvers/C_CellMG/MACOPERATOR_3D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" #include "MACOPERATOR_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 diff --git a/Tests/LinearSolvers/C_CellMG/MACOPERATOR_F.H b/Tests/LinearSolvers/C_CellMG/MACOPERATOR_F.H index 747f7e31f..9823d5df6 100644 --- a/Tests/LinearSolvers/C_CellMG/MACOPERATOR_F.H +++ b/Tests/LinearSolvers/C_CellMG/MACOPERATOR_F.H @@ -25,7 +25,7 @@ # define FORT_MACSYNCRHS macsyncrhs_ #endif -#include +#include extern "C" { diff --git a/Tests/LinearSolvers/C_CellMG/MACPROJ_2D.F b/Tests/LinearSolvers/C_CellMG/MACPROJ_2D.F index 940152750..3be83a0ed 100644 --- a/Tests/LinearSolvers/C_CellMG/MACPROJ_2D.F +++ b/Tests/LinearSolvers/C_CellMG/MACPROJ_2D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" #include "MACPROJ_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Tests/LinearSolvers/C_CellMG/MACPROJ_3D.F b/Tests/LinearSolvers/C_CellMG/MACPROJ_3D.F index c634f9c50..452c30ee8 100644 --- a/Tests/LinearSolvers/C_CellMG/MACPROJ_3D.F +++ b/Tests/LinearSolvers/C_CellMG/MACPROJ_3D.F @@ -4,11 +4,11 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" #include "MACPROJ_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 diff --git a/Tests/LinearSolvers/C_CellMG/MacOperator.H b/Tests/LinearSolvers/C_CellMG/MacOperator.H index 38d2ea41a..05a34b960 100644 --- a/Tests/LinearSolvers/C_CellMG/MacOperator.H +++ b/Tests/LinearSolvers/C_CellMG/MacOperator.H @@ -9,9 +9,9 @@ // through a few driver functions which scale variables. //========================================================================== -#include -#include -#include +#include +#include +#include class MacOperator : diff --git a/Tests/LinearSolvers/C_CellMG/MacOperator.cpp b/Tests/LinearSolvers/C_CellMG/MacOperator.cpp index e028db1f6..dde826ad4 100644 --- a/Tests/LinearSolvers/C_CellMG/MacOperator.cpp +++ b/Tests/LinearSolvers/C_CellMG/MacOperator.cpp @@ -1,20 +1,20 @@ -#include +#include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #ifdef MG_USE_HYPRE #include #endif -#include -#include +#include +#include #include #ifndef _NavierStokes_H_ @@ -351,7 +351,7 @@ MacOperator::syncRhs (const MultiFab& Volume, // void -mac_level_driver (AmrCore* parent, +mac_level_driver (AmrCore* parent, const MacBndry& mac_bndry, const BCRec& phys_bc, const BoxArray& grids, @@ -408,13 +408,13 @@ mac_level_driver (AmrCore* parent, } else if (the_solver == 3 ) { - std::vector bav(1); + Array bav(1); bav[0] = mac_phi->boxArray(); - std::vector dmv(1); + Array dmv(1); dmv[0] = Rhs.DistributionMap(); bool nodal = false; int stencil = CC_CROSS_STENCIL; - std::vector geom(1); + Array geom(1); geom[0] = mac_bndry.getGeom(); int mg_bc[2*BL_SPACEDIM]; @@ -454,19 +454,17 @@ mac_level_driver (AmrCore* parent, } // Set alpha and beta as in (alpha - del dot beta grad) - Array > bb_p(1); - bb_p[0].resize(BL_SPACEDIM, PArrayNoManage); + Array > bb_p(1); + bb_p[0].resize(BL_SPACEDIM); for ( int i = 0; i < BL_SPACEDIM; ++i ) { - bb_p[0].set(i, &(mac_op.bCoefficients(i))); + bb_p[0][i] = const_cast(&(mac_op.bCoefficients(i))); } mgt_solver.set_mac_coefficients(bb_p, xa, xb); - MultiFab* mac_phi_p[1]; - MultiFab* Rhs_p[1]; - mac_phi_p[0] = mac_phi; - Rhs_p[0] = &Rhs; + Array mac_phi_p = { mac_phi }; + Array Rhs_p = { &Rhs }; int always_use_bnorm = 0; Real final_resnorm; @@ -543,13 +541,13 @@ mac_sync_driver (AmrCore* parent, } else if (the_solver == 3 ) { - std::vector bav(1); + Array bav(1); bav[0] = mac_sync_phi->boxArray(); - std::vector dmv(1); + Array dmv(1); dmv[0] = Rhs.DistributionMap(); bool nodal = false; int stencil = CC_CROSS_STENCIL; - std::vector geom(1); + Array geom(1); geom[0] = mac_bndry.getGeom(); int mg_bc[2*BL_SPACEDIM]; @@ -590,19 +588,17 @@ mac_sync_driver (AmrCore* parent, } // Set alpha and beta as in (alpha - del dot beta grad) - Array > bb_p(1); - bb_p[0].resize(BL_SPACEDIM, PArrayNoManage); + Array > bb_p(1); + bb_p[0].resize(BL_SPACEDIM); for ( int i = 0; i < BL_SPACEDIM; ++i ) { - bb_p[0].set(i, &(mac_op.bCoefficients(i))); + bb_p[0][i] = const_cast(&(mac_op.bCoefficients(i))); } mgt_solver.set_mac_coefficients(bb_p, xa, xb); - MultiFab* mac_phi_p[1]; - MultiFab* Rhs_p[1]; - mac_phi_p[0] = mac_sync_phi; - Rhs_p[0] = &Rhs; + Array mac_phi_p = { mac_sync_phi }; + Array Rhs_p = { &Rhs }; int always_use_bnorm = 0; Real final_resnorm; diff --git a/Tests/LinearSolvers/C_CellMG/Make.package b/Tests/LinearSolvers/C_CellMG/Make.package index 85522055a..e2ebfc11e 100644 --- a/Tests/LinearSolvers/C_CellMG/Make.package +++ b/Tests/LinearSolvers/C_CellMG/Make.package @@ -1,5 +1,5 @@ -CEXE_sources += MacOperator.cpp MacBndry.cpp +CEXE_sources += MacOperator.cpp CEXE_headers += MacOperator.H FEXE_headers += COEF_F.H FEXE_sources += MACPROJ_$(DIM)D.F MACOPERATOR_$(DIM)D.F COEF_$(DIM)D.F diff --git a/Tests/LinearSolvers/C_CellMG/macprojTest.cpp b/Tests/LinearSolvers/C_CellMG/macprojTest.cpp index 2c7a5ef20..7ea996b24 100644 --- a/Tests/LinearSolvers/C_CellMG/macprojTest.cpp +++ b/Tests/LinearSolvers/C_CellMG/macprojTest.cpp @@ -23,16 +23,16 @@ // // -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #include diff --git a/Tests/LinearSolvers/C_CellMG/main.cpp b/Tests/LinearSolvers/C_CellMG/main.cpp index 8cdeb7098..9c50ae487 100644 --- a/Tests/LinearSolvers/C_CellMG/main.cpp +++ b/Tests/LinearSolvers/C_CellMG/main.cpp @@ -2,16 +2,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include static diff --git a/Tests/LinearSolvers/C_TensorMG/GNUmakefile b/Tests/LinearSolvers/C_TensorMG/GNUmakefile index 116086a56..96be76491 100644 --- a/Tests/LinearSolvers/C_TensorMG/GNUmakefile +++ b/Tests/LinearSolvers/C_TensorMG/GNUmakefile @@ -14,7 +14,7 @@ USE_MPI = FALSE EBASE = main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CXXFLAGS += CXXOPTF += @@ -24,37 +24,11 @@ include ./Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_TensorMG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package - -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_TensorMG -vpathdir += $(BOXLIB_HOME)/Src/LinearSolvers/C_TensorMG - -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -vpathdir += $(BOXLIB_HOME)/Src/C_BoundaryLib - -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib - -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib -vpathdir += $(BOXLIB_HOME)/Src/C_AMRLib - -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG -vpathdir += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG - -CEXE_sources += BCRec.cpp -CEXE_headers += BCRec.H BC_TYPES.H - -vpath %.c : . $(vpathdir) -vpath %.h : . $(vpathdir) -vpath %.cpp : . $(vpathdir) -vpath %.H : . $(vpathdir) -vpath %.F : . $(vpathdir) -vpath %.f : . $(vpathdir) -vpath %.f90 : . $(vpathdir) +include $(BOXLIB_HOME)/Src/Base/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.H b/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.H index c8f025047..20584110b 100644 --- a/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.H +++ b/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.H @@ -1,8 +1,8 @@ #ifndef _MCVISCBNDRY_H_ #define _MCVISCBNDRY_H_ -#include -#include +#include +#include class MCViscBndry : public MCInterpBndryData { diff --git a/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.cpp b/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.cpp index 5a1578b0c..3b36d8b75 100644 --- a/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.cpp +++ b/Tests/LinearSolvers/C_TensorMG/TestMCViscBndry.cpp @@ -1,4 +1,4 @@ -#include +#include #include void @@ -17,7 +17,7 @@ MCViscBndry::setBndryConds (const BCRec& bc, for (OrientationIter fi; fi; ++fi) { - Array &bloc = bcloc[fi()]; + RealTuple &bloc = bcloc[fi()]; Array< Array >& bctag = bcond[fi()]; int dir = fi().coordDir(); diff --git a/Tests/LinearSolvers/C_TensorMG/main_2D.F b/Tests/LinearSolvers/C_TensorMG/main_2D.F index c43274fdc..e399c7d6b 100644 --- a/Tests/LinearSolvers/C_TensorMG/main_2D.F +++ b/Tests/LinearSolvers/C_TensorMG/main_2D.F @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "main_F.H" @@ -19,7 +19,7 @@ subroutine FORT_FILLCRSE ( $ crse, DIMS(crse), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(crse) REAL_T crse(DIMV(crse),nc) @@ -74,7 +74,7 @@ subroutine FORT_FILLCRSE ( subroutine FORT_FILLFINE ( $ fine, DIMS(fine), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(fine) REAL_T fine(DIMV(fine),nc) @@ -142,7 +142,7 @@ subroutine FORT_FILLFINE ( subroutine FORT_FILLCRSE ( $ crse, DIMS(crse), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(crse) REAL_T crse(DIMV(crse),nc) @@ -178,7 +178,7 @@ subroutine FORT_FILLCRSE ( subroutine FORT_FILLFINE ( $ fine, DIMS(fine), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(fine) REAL_T fine(DIMV(fine),nc) @@ -219,7 +219,7 @@ subroutine FORT_FILLFINE ( subroutine FORT_FILLRHS ( $ rhs, DIMS(rhs), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(rhs) REAL_T rhs(DIMV(rhs),nc) @@ -275,7 +275,7 @@ subroutine FORT_FILLRHS ( subroutine FORT_MAKEMU( $ mu,DIMS(mu), - $ h, idir ) + $ h, idir ) bind(c) integer idir integer DIMDEC(mu) diff --git a/Tests/LinearSolvers/C_TensorMG/main_3D.F b/Tests/LinearSolvers/C_TensorMG/main_3D.F index 0d8672635..28cb47ec6 100644 --- a/Tests/LinearSolvers/C_TensorMG/main_3D.F +++ b/Tests/LinearSolvers/C_TensorMG/main_3D.F @@ -1,6 +1,5 @@ -#include -#include -#include +#include +#include #include "main_F.H" @@ -13,7 +12,7 @@ subroutine FORT_FILLCRSE ( $ crse, DIMS(crse), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(crse) REAL_T crse(DIMV(crse),nc) @@ -53,7 +52,7 @@ subroutine FORT_FILLCRSE ( subroutine FORT_FILLFINE ( $ fine, DIMS(fine), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(fine) REAL_T fine(DIMV(fine),nc) @@ -101,7 +100,7 @@ subroutine FORT_FILLFINE ( subroutine FORT_FILLRHS ( $ rhs, DIMS(rhs), $ h, nc - $ ) + $ ) bind(c) integer nc integer DIMDEC(rhs) REAL_T rhs(DIMV(rhs),nc) @@ -183,7 +182,7 @@ subroutine FORT_FILLRHS ( subroutine FORT_MAKEMU( $ mu,DIMS(mu), - $ h, idir ) + $ h, idir ) bind(c) integer idir integer DIMDEC(mu) diff --git a/Tests/LinearSolvers/C_TensorMG/main_F.H b/Tests/LinearSolvers/C_TensorMG/main_F.H index 32e4c95fc..16f34b1c4 100644 --- a/Tests/LinearSolvers/C_TensorMG/main_F.H +++ b/Tests/LinearSolvers/C_TensorMG/main_F.H @@ -1,9 +1,7 @@ #ifndef _main_F_H_ #define _main_F_H_ -#include - -#if defined(BL_LANG_FORT) +#include #if (BL_SPACEDIM == 2) #define FORT_FILLCRSE fillcrse2d @@ -19,39 +17,7 @@ #define FORT_FILLRHS fillrhs3d #endif -#else - -#if (BL_SPACEDIM == 2) -#ifdef BL_FORT_USE_UPPERCASE -#define FORT_FILLCRSE FILLCRSE2D -#define FORT_FILLFINE FILLFINE2D -#define FORT_MAKEMU MAKEMU2D -#define FORT_FILLRHS FILLRHS2D -#endif -#ifdef BL_FORT_USE_UNDERSCORE -#define FORT_FILLCRSE fillcrse2d_ -#define FORT_FILLFINE fillfine2d_ -#define FORT_MAKEMU makemu2d_ -#define FORT_FILLRHS fillrhs2d_ -#endif -#endif - -#if (BL_SPACEDIM == 3) -#ifdef BL_FORT_USE_UPPERCASE -#define FORT_FILLCRSE FILLCRSE3D -#define FORT_FILLFINE FILLFINE3D -#define FORT_MAKEMU MAKEMU2D -#define FORT_FILLRHS FILLRHS2D -#endif -#ifdef BL_FORT_USE_UNDERSCORE -#define FORT_FILLCRSE fillcrse3d_ -#define FORT_FILLFINE fillfine3d_ -#define FORT_MAKEMU makemu3d_ -#define FORT_FILLRHS fillrhs3d_ -#endif - -#endif - +#if !defined(BL_LANG_FORT) extern "C" { void FORT_FILLCRSE ( @@ -70,6 +36,6 @@ extern "C" Real*mu, ARLIM_P(mulo),ARLIM_P(muhi), const Real* h, int&idir ); }; - #endif + #endif diff --git a/Tests/LinearSolvers/C_TensorMG/testVI.cpp b/Tests/LinearSolvers/C_TensorMG/testVI.cpp index f1cfc7f14..3e274f5b1 100644 --- a/Tests/LinearSolvers/C_TensorMG/testVI.cpp +++ b/Tests/LinearSolvers/C_TensorMG/testVI.cpp @@ -9,12 +9,12 @@ #include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef NDEBUG #ifdef BL_USE_ARRAYVIEW #include @@ -22,11 +22,11 @@ #endif #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/Tests/LinearSolvers/ComparisonTest/COEF_1D.F b/Tests/LinearSolvers/ComparisonTest/COEF_1D.F index 0fef7ccb9..fe72737be 100644 --- a/Tests/LinearSolvers/ComparisonTest/COEF_1D.F +++ b/Tests/LinearSolvers/ComparisonTest/COEF_1D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include -#include +#include +#include -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #include "COEF_F.H" c----------------------------------------------------------------------- diff --git a/Tests/LinearSolvers/ComparisonTest/COEF_3D.F b/Tests/LinearSolvers/ComparisonTest/COEF_3D.F index 87564ee86..8367695cc 100644 --- a/Tests/LinearSolvers/ComparisonTest/COEF_3D.F +++ b/Tests/LinearSolvers/ComparisonTest/COEF_3D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include -#include +#include +#include -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #include "COEF_F.H" c----------------------------------------------------------------------- diff --git a/Tests/LinearSolvers/ComparisonTest/COEF_F.H b/Tests/LinearSolvers/ComparisonTest/COEF_F.H index c7cfa3b97..ae88e53e2 100644 --- a/Tests/LinearSolvers/ComparisonTest/COEF_F.H +++ b/Tests/LinearSolvers/ComparisonTest/COEF_F.H @@ -1,7 +1,7 @@ #ifndef _COEFF_H_ #define _COEFF_H_ -#include +#include #if defined(BL_LANG_FORT) #define FORT_SET_COEF set_coef @@ -15,7 +15,7 @@ #define FORT_SET_COEF set_coef_ #endif -#include +#include extern "C" { diff --git a/Tests/LinearSolvers/ComparisonTest/COMP_NORM_F.H b/Tests/LinearSolvers/ComparisonTest/COMP_NORM_F.H index b10805efa..9002b895c 100644 --- a/Tests/LinearSolvers/ComparisonTest/COMP_NORM_F.H +++ b/Tests/LinearSolvers/ComparisonTest/COMP_NORM_F.H @@ -1,7 +1,7 @@ #ifndef _COMP_NORM_F_H_ #define _COMP_NORM_F_H_ -#include +#include BL_FORT_PROC_DECL(LST_COMP_NORM, lst_comp_norm) (const int* lo, const int* hi, diff --git a/Tests/LinearSolvers/ComparisonTest/GNUmakefile b/Tests/LinearSolvers/ComparisonTest/GNUmakefile index fe6aa61a2..e59d8eb75 100644 --- a/Tests/LinearSolvers/ComparisonTest/GNUmakefile +++ b/Tests/LinearSolvers/ComparisonTest/GNUmakefile @@ -34,15 +34,15 @@ USE_MPI=TRUE EBASE = LST -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CEXE_sources += main.cpp include Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -include $(BOXLIB_HOME)/Src/C_AmrCoreLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package +include $(BOXLIB_HOME)/Src/AmrCore/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_to_F_MG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/F_MG/FParallelMG.mak @@ -69,4 +69,4 @@ endif all: $(executable) @echo SUCCESS -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.H b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.H index 9e92b546d..9996c2a7c 100644 --- a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.H +++ b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.H @@ -4,11 +4,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include "HYPRE_sstruct_ls.h" diff --git a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.cpp b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.cpp index c74a60140..ec143ae14 100644 --- a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.cpp +++ b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABecLap.cpp @@ -2,7 +2,7 @@ #include #include -#include "LO_BCTYPES.H" +#include "AMReX_LO_BCTYPES.H" #include "_hypre_sstruct_mv.h" #include "HYPRE_krylov.h" diff --git a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_3D.F b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_3D.F index 783a3b558..1097a6347 100644 --- a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_3D.F +++ b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_3D.F @@ -3,9 +3,9 @@ #define BL_LANG_FORT #endif -#include -#include "ArrayLim.H" -#include "LO_BCTYPES.H" +#include +#include "AMReX_ArrayLim.H" +#include "AMReX_LO_BCTYPES.H" #include "HypreABec_F.H" diff --git a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_F.H b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_F.H index 06b319070..5d1441d67 100644 --- a/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_F.H +++ b/Tests/LinearSolvers/ComparisonTest/HypreABecLap/HypreABec_F.H @@ -1,7 +1,7 @@ #ifndef _HYPREABEC_F_H_ #define _HYPREABEC_F_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -37,7 +37,7 @@ #define FORT_HPBVEC3 hpbvec3_ #endif -#include +#include extern "C" { void FORT_HPACOEF(Real* mat, Real* acoefs, ARLIM_P(alo), ARLIM_P(ahi), diff --git a/Tests/LinearSolvers/ComparisonTest/compute_norm.cpp b/Tests/LinearSolvers/ComparisonTest/compute_norm.cpp index 693327917..9b9f73494 100644 --- a/Tests/LinearSolvers/ComparisonTest/compute_norm.cpp +++ b/Tests/LinearSolvers/ComparisonTest/compute_norm.cpp @@ -1,14 +1,15 @@ #include -#include -#include -#include -#include +#include +#include +#include #include -void compute_norm(const PArray& soln, const PArray& exac, - const std::vector& geom, const std::vector& grids, +void compute_norm(const Array& soln, + const Array& exac, + const Array& geom, + const Array& grids, int nsoln, int iCpp, int iF90, int iHyp) { Array twonorm(nsoln, 0.0); @@ -27,7 +28,7 @@ void compute_norm(const PArray& soln, const PArray& exac, baf.coarsen(ref_ratio); } - for (MFIter mfi(soln[ilev]); mfi.isValid(); ++mfi) { + for (MFIter mfi(*soln[ilev]); mfi.isValid(); ++mfi) { int i = mfi.index(); const Box& bx = grids[ilev][i]; @@ -35,7 +36,7 @@ void compute_norm(const PArray& soln, const PArray& exac, FArrayBox mask(bx, 1); mask.setVal(1.0); if (ilev < nlevel-1) { - std::vector< std::pair > isects = baf.intersections(bx); + const std::vector< std::pair > isects = baf.intersections(bx); for (int ii = 0; ii < isects.size(); ii++) { mask.setVal(0.0, isects[ii].second, 0); @@ -47,8 +48,8 @@ void compute_norm(const PArray& soln, const PArray& exac, BL_FORT_PROC_CALL(LST_COMP_NORM, lst_comp_norm) (bx.loVect(), bx.hiVect(), - BL_TO_FORTRAN(soln[ilev][mfi]), - BL_TO_FORTRAN(exac[ilev][mfi]), + BL_TO_FORTRAN((*soln[ilev])[mfi]), + BL_TO_FORTRAN((*exac[ilev])[mfi]), BL_TO_FORTRAN(mask), BL_TO_FORTRAN(volbox), twonorm.dataPtr(), @@ -62,7 +63,7 @@ void compute_norm(const PArray& soln, const PArray& exac, ParallelDescriptor::ReduceRealMax(maxnorm.dataPtr(), nsoln); for (int i=0; i -#include -#include -#include +#include +#include +#include -#include +#include #ifdef USEHYPRE #include @@ -22,31 +21,34 @@ enum bc_t {Periodic = 0, solver_t solver_type = All; bc_t bc_type = Periodic; -void build_grids(std::vector& geom, - std::vector& grids); -void setup_coef(PArray &exac, PArray &alph, - PArray &beta, PArray &rhs, - const std::vector& geom, - const std::vector& grids, +void build_grids(Array& geom, + Array& grids); +void setup_coef(const Array &exac, + const Array &alph, + const Array &beta, + const Array &rhs, + const Array& geom, + const Array& grids, Real a, Real b, Real sigma, Real w); -void solve_with_F90(PArray& soln, Real a, Real b, - const PArray& alph, - const PArray& beta, - PArray& rhs, - const std::vector& geom, - const std::vector& grids, +void solve_with_F90(const Array& soln, Real a, Real b, + const Array& alph, + const Array& beta, + const Array& rhs, + const Array& geom, + const Array& grids, int ibnd); #ifdef USEHYPRE -void solve_with_hypre(PArray& soln, Real a, Real b, - const PArray& alph, - const PArray& beta, - PArray& rhs, - const std::vector& geom, - const std::vector& grids, +void solve_with_hypre(const Array& soln, Real a, Real b, + const Array& alph, + const Array& beta, + const Array& rhs, + const Array& geom, + const Array& grids, int ibnd); #endif -void compute_norm(const PArray& soln, const PArray& exac, - const std::vector& geom, const std::vector& grids, +void compute_norm(const Array& soln, + const Array& exac, + const Array& geom, const Array& grids, int nsoln, int iCpp, int iF90, int iHyp); int main(int argc, char* argv[]) @@ -106,17 +108,17 @@ int main(int argc, char* argv[]) pp.query("max_level", max_level); int nlevel = max_level+1; - std::vector geom(nlevel); - std::vector grids(nlevel); + Array geom(nlevel); + Array grids(nlevel); build_grids(geom, grids); - PArray soln(nlevel, PArrayManage); - PArray soln1(nlevel, PArrayNoManage); - PArray exac(nlevel, PArrayManage); - PArray alph(nlevel, PArrayManage); - PArray beta(nlevel, PArrayManage); - PArray rhs(nlevel, PArrayManage); + Array > soln(nlevel); + Array > soln1(nlevel); + Array > exac(nlevel); + Array > alph(nlevel); + Array > beta(nlevel); + Array > rhs(nlevel); int nsoln=-1, iF90=-1, iCpp=-1, iHyp=-1; switch (solver_type) @@ -148,96 +150,85 @@ int main(int argc, char* argv[]) } for (int ilev=0; ilev < nlevel; ilev++) { - soln.set(ilev, new MultiFab(grids[ilev], nsoln, 1)); - if (nsoln == 1) { - soln1.set(ilev, &(soln.get(ilev))); - } - else { - soln1.set(ilev, new MultiFab(grids[ilev], 1, 1)); - } - exac.set(ilev, new MultiFab(grids[ilev], 1, 0)); - alph.set(ilev, new MultiFab(grids[ilev], 1, 0)); - beta.set(ilev, new MultiFab(grids[ilev], 1, 1)); // one ghost cell - rhs.set (ilev, new MultiFab(grids[ilev], 1, 0)); + soln [ilev].reset(new MultiFab(grids[ilev], nsoln, 1)); + soln1[ilev].reset(new MultiFab(grids[ilev], 1, 1)); + exac [ilev].reset(new MultiFab(grids[ilev], 1, 0)); + alph [ilev].reset(new MultiFab(grids[ilev], 1, 0)); + beta [ilev].reset(new MultiFab(grids[ilev], 1, 1)); // one ghost cell + rhs [ilev].reset(new MultiFab(grids[ilev], 1, 0)); } + auto psoln = BoxLib::GetArrOfPtrs(soln); + auto psoln1 = BoxLib::GetArrOfPtrs(soln1); + auto pexac = BoxLib::GetArrOfPtrs(exac); + auto palph = BoxLib::GetArrOfPtrs(alph); + auto pbeta = BoxLib::GetArrOfPtrs(beta); + auto prhs = BoxLib::GetArrOfPtrs(rhs); + Real a, b, sigma, w; pp.get("a", a); pp.get("b", b); pp.get("sigma", sigma); pp.get("w", w); - setup_coef(exac, alph, beta, rhs, geom, grids, a, b, sigma, w); + setup_coef(pexac, palph, pbeta, prhs, geom, grids, a, b, sigma, w); int ibnd = static_cast(bc_type); if (solver_type == BoxLib_C || solver_type == All) { for (int ilev=0; ilev < nlevel; ilev++) { - soln1[ilev].setVal(0.0); + soln1[ilev]->setVal(0.0); } // solve_with_Cpp(soln1, a, b, alph, beta, rhs, geom, grids, nlevel, ibnd); - if (nsoln > 1) { // soln1 doesn't point to the same multifabs as soln - for (int ilev=0; ilev < nlevel; ilev++) { - MultiFab::Copy(soln[ilev], soln1[ilev], 0, iCpp, 1, 1); - } + for (int ilev=0; ilev < nlevel; ilev++) { + MultiFab::Copy(*soln[ilev], *soln1[ilev], 0, iCpp, 1, 1); } } if (solver_type == BoxLib_F || solver_type == All) { for (int ilev=0; ilev < nlevel; ilev++) { - soln1[ilev].setVal(0.0); + soln1[ilev]->setVal(0.0); } - solve_with_F90(soln1, a, b, alph, beta, rhs, geom, grids, ibnd); + solve_with_F90(psoln1, a, b, palph, pbeta, prhs, geom, grids, ibnd); - if (nsoln > 1) { // soln1 doesn't point to the same multifabs as soln - for (int ilev=0; ilev < nlevel; ilev++) { - MultiFab::Copy(soln[ilev], soln1[ilev], 0, iF90, 1, 1); - } + for (int ilev=0; ilev < nlevel; ilev++) { + MultiFab::Copy(*soln[ilev], *soln1[ilev], 0, iF90, 1, 1); } } #ifdef USEHYPRE if (solver_type == Hypre || solver_type == All) { for (int ilev=0; ilev < nlevel; ilev++) { - soln1[ilev].setVal(0.0); + soln1[ilev]->setVal(0.0); } - solve_with_hypre(soln1, a, b, alph, beta, rhs, geom, grids, ibnd); + solve_with_hypre(psoln1, a, b, palph, pbeta, prhs, geom, grids, ibnd); - if (nsoln > 1) { // soln1 doesn't point to the same multifabs as soln - for (int ilev=0; ilev < nlevel; ilev++) { - MultiFab::Copy(soln[ilev], soln1[ilev], 0, iHyp, 1, 1); - } - } - } -#endif - - if (nsoln > 1) { // soln1 doesn't point to the same multifabs as soln, - // and soln1 is defined with PArrayNoManage for (int ilev=0; ilev < nlevel; ilev++) { - delete &(soln1[ilev]); + MultiFab::Copy(*soln[ilev], *soln1[ilev], 0, iHyp, 1, 1); } } +#endif int write_plot = 0; pp.query("write_plot", write_plot); if (write_plot) { - writePlotFile("plot", soln, exac, alph, beta, rhs, geom, grids, nsoln, iCpp, iF90, iHyp); + writePlotFile("plot", psoln, pexac, palph, pbeta, prhs, geom, grids, nsoln, iCpp, iF90, iHyp); } int comp_norm = 1; pp.query("comp_norm", comp_norm); if (comp_norm) { - compute_norm(soln, exac, geom, grids, nsoln, iCpp, iF90, iHyp); + compute_norm(psoln, pexac, geom, grids, nsoln, iCpp, iF90, iHyp); } BoxLib::Finalize(); } -void build_grids(std::vector& geom, std::vector& grids) +void build_grids(Array& geom, Array& grids) { ParmParse pp; @@ -305,10 +296,12 @@ void build_grids(std::vector& geom, std::vector& grids) } } -void setup_coef(PArray &exac, PArray &alph, - PArray &beta, PArray &rhs, - const std::vector& geom, - const std::vector& grids, +void setup_coef(const Array &exac, + const Array &alph, + const Array &beta, + const Array &rhs, + const Array& geom, + const Array& grids, Real a, Real b, Real sigma, Real w) { int ibnd = static_cast(bc_type); @@ -318,12 +311,12 @@ void setup_coef(PArray &exac, PArray &alph, const Geometry& geo = geom[ilev]; const Real* dx = geo.CellSize(); - for (MFIter mfi(alph[ilev]); mfi.isValid(); ++mfi) { + for (MFIter mfi(*alph[ilev]); mfi.isValid(); ++mfi) { int i = mfi.index(); const Box& bx = grids[ilev][i]; - FORT_SET_COEF(exac[ilev][mfi].dataPtr(), alph[ilev][mfi].dataPtr(), - beta[ilev][mfi].dataPtr(), rhs[ilev][mfi].dataPtr(), + FORT_SET_COEF((*exac[ilev])[mfi].dataPtr(), (*alph[ilev])[mfi].dataPtr(), + (*beta[ilev])[mfi].dataPtr(), (*rhs[ilev])[mfi].dataPtr(), bx.loVect(), bx.hiVect(), geo.ProbLo(), geo.ProbHi(), dx, a, b, sigma, w, ibnd); } diff --git a/Tests/LinearSolvers/ComparisonTest/solve_with_F90.cpp b/Tests/LinearSolvers/ComparisonTest/solve_with_F90.cpp index e9daac5c4..c69e95570 100644 --- a/Tests/LinearSolvers/ComparisonTest/solve_with_F90.cpp +++ b/Tests/LinearSolvers/ComparisonTest/solve_with_F90.cpp @@ -1,19 +1,18 @@ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include +#include -void solve_with_F90(PArray& soln, Real a, Real b, - const PArray& alph, - const PArray& beta, - PArray& rhs, - const std::vector& geom, - const std::vector& grids, +void solve_with_F90(const Array& soln, Real a, Real b, + const Array& alph, + const Array& beta, + const Array& rhs, + const Array& geom, + const Array& grids, int ibnd) { const Real run_strt = ParallelDescriptor::second(); @@ -56,31 +55,32 @@ void solve_with_F90(PArray& soln, Real a, Real b, } } - Array< PArray > bcoeffs(nlevel); + Array< Array > > bcoeffs(nlevel); for (int ilev=0; ilev&>(alph), bcoeffs); + fmg.set_coefficients(alph, BoxLib::GetArrOfArrOfPtrs(bcoeffs)); fmg.solve(soln, rhs, tolerance_rel, tolerance_abs); } @@ -92,16 +92,16 @@ void solve_with_F90(PArray& soln, Real a, Real b, FMultiGrid fmg(geom[ilev], ilev, crse_ratio); if (ilev == 0) { - fmg.set_bc(mg_bc, soln[0]); + fmg.set_bc(mg_bc, *soln[0]); } else { - fmg.set_bc(mg_bc, soln[ilev-1], soln[ilev]); + fmg.set_bc(mg_bc, *soln[ilev-1], *soln[ilev]); } fmg.set_maxorder(maxorder); fmg.set_scalars(a, b); - fmg.set_coefficients(const_cast(alph[ilev]), bcoeffs[ilev]); + fmg.set_coefficients(*alph[ilev], BoxLib::GetArrOfPtrs(bcoeffs[ilev])); - fmg.solve(soln[ilev], rhs[ilev], tolerance_rel, tolerance_abs); + fmg.solve(*soln[ilev], *rhs[ilev], tolerance_rel, tolerance_abs); } } diff --git a/Tests/LinearSolvers/ComparisonTest/solve_with_hypre.cpp b/Tests/LinearSolvers/ComparisonTest/solve_with_hypre.cpp index db46a7afe..ff5197214 100644 --- a/Tests/LinearSolvers/ComparisonTest/solve_with_hypre.cpp +++ b/Tests/LinearSolvers/ComparisonTest/solve_with_hypre.cpp @@ -1,25 +1,24 @@ #ifdef USEHYPRE -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include void setBndryConds(BndryData& levelbd, int ibnd, IntVect ratio); -void solve_with_hypre(PArray& soln, Real a, Real b, - const PArray& alph, - const PArray& beta, - PArray& rhs, - const std::vector& geom, - const std::vector& grids, +void solve_with_hypre(const Array& soln, Real a, Real b, + const Array& alph, + const Array& beta, + const Array& rhs, + const Array& geom, + const Array& grids, int ibnd) { const Real run_strt = ParallelDescriptor::second(); @@ -67,26 +66,26 @@ void solve_with_hypre(PArray& soln, Real a, Real b, for (int level = 0; level < nlevel; level++) { - hypreSolver.setACoeffs(level, alph[level]); + hypreSolver.setACoeffs(level, *alph[level]); - PArray bcoeffs(BL_SPACEDIM, PArrayManage); + Array > bcoeffs(BL_SPACEDIM); for (int n = 0; n < BL_SPACEDIM ; n++) { BoxArray edge_boxes(grids[level]); edge_boxes.surroundingNodes(n); - bcoeffs.set(n, new MultiFab(edge_boxes, 1, 0)); + bcoeffs[n].reset(new MultiFab(edge_boxes, 1, 0)); } - BoxLib::average_cellcenter_to_face(bcoeffs, beta[level], geom[level]); + BoxLib::average_cellcenter_to_face(BoxLib::GetArrOfPtrs(bcoeffs), *beta[level], geom[level]); for (int n = 0; n < BL_SPACEDIM ; n++) { - hypreSolver.setBCoeffs(level, bcoeffs[n], n); + hypreSolver.setBCoeffs(level, *bcoeffs[n], n); } - hypreSolver.setRhs(level, rhs[level]); + hypreSolver.setRhs(level, *rhs[level]); - hypreSolver.setInitGuess(level, soln[level]); + hypreSolver.setInitGuess(level, *soln[level]); } hypreSolver.solve(soln, tolerance_rel, tolerance_abs, max_iter); diff --git a/Tests/LinearSolvers/ComparisonTest/writePlotFile.H b/Tests/LinearSolvers/ComparisonTest/writePlotFile.H index 8d2055391..b7a71187d 100644 --- a/Tests/LinearSolvers/ComparisonTest/writePlotFile.H +++ b/Tests/LinearSolvers/ComparisonTest/writePlotFile.H @@ -1,12 +1,13 @@ -#include -#include -#include -#include +#include +#include +#include void writePlotFile (const std::string& dir, - const PArray& soln, const PArray& exac, - const PArray& alph, const PArray& beta, - const PArray& rhs, + const Array& soln, + const Array& exac, + const Array& alph, + const Array& beta, + const Array& rhs, const std::vector& geom, const std::vector& grids, int nsoln, int iCpp, int iF90, int iHyp); diff --git a/Tests/LinearSolvers/ComparisonTest/writePlotFile.cpp b/Tests/LinearSolvers/ComparisonTest/writePlotFile.cpp index f6b01ce88..4c7d4d443 100644 --- a/Tests/LinearSolvers/ComparisonTest/writePlotFile.cpp +++ b/Tests/LinearSolvers/ComparisonTest/writePlotFile.cpp @@ -2,19 +2,21 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include void writePlotFile (const std::string& dir, - const PArray& soln, const PArray& exac, - const PArray& alph, const PArray& beta, - const PArray& rhs, + const Array& soln, + const Array& exac, + const Array& alph, + const Array& beta, + const Array& rhs, const std::vector& geom, const std::vector& grids, int nsoln, int iCpp, int iF90, int iHyp) @@ -159,16 +161,16 @@ void writePlotFile (const std::string& dir, // int cnt=0; for (int isoln=0; isoln < nsoln; isoln++) { - MultiFab::Copy(plotMF, soln[ilev], isoln, cnt, 1, 0); + MultiFab::Copy(plotMF, *soln[ilev], isoln, cnt, 1, 0); cnt++; } - MultiFab::Copy(plotMF, exac[ilev], 0, cnt, 1, 0); + MultiFab::Copy(plotMF, *exac[ilev], 0, cnt, 1, 0); cnt++; - MultiFab::Copy(plotMF, alph[ilev], 0, cnt, 1, 0); + MultiFab::Copy(plotMF, *alph[ilev], 0, cnt, 1, 0); cnt++; - MultiFab::Copy(plotMF, beta[ilev], 0, cnt, 1, 0); + MultiFab::Copy(plotMF, *beta[ilev], 0, cnt, 1, 0); cnt++; - MultiFab::Copy(plotMF, rhs[ilev], 0, cnt, 1, 0); + MultiFab::Copy(plotMF, *rhs[ilev], 0, cnt, 1, 0); // // Use the Full pathname when naming the MultiFab. diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/GNUmakefile b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/GNUmakefile deleted file mode 100644 index 24f7d47df..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/GNUmakefile +++ /dev/null @@ -1,40 +0,0 @@ -BOXLIB_HOME := ../../.. - -NDEBUG := t -MPI := t -OMP := -PROF := - -USE_MG_CPP := - -COMP := gfortran - -MKVERBOSE := t - -include $(BOXLIB_HOME)/Tools/F_mk/GMakedefs.mak - -programs += main.f90 - -f90sources += wrapper.f90 -f90sources += cc_multi.f90 -f90sources += cc_edge_coeffs.f90 -f90sources += cc_rhs.f90 -f90sources += nodal_multi.f90 -f90sources += nodal_rhs.f90 -f90sources += mt19937ar.f90 -f90sources += init_cell_coeffs.f90 - -VPATH_LOCATIONS += . -INCLUDE_LOCATIONS += . - -include $(BOXLIB_HOME)/Src/LinearSolvers/F_MG/GPackage.mak -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/F_MG -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/F_MG - -include $(BOXLIB_HOME)/Src/F_BaseLib/GPackage.mak -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib - -all: $(pnames) - -include $(BOXLIB_HOME)/Tools/F_mk/GMakerules.mak diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/bc_interp.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/bc_interp.f90 deleted file mode 100644 index 97caeff5c..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/bc_interp.f90 +++ /dev/null @@ -1,87 +0,0 @@ -module intrp_module - - use bl_types - - implicit none - - integer, parameter, private :: d = dp_t - - real(d), parameter :: dirichlet(5,7) = & - reshape((/ & - 2.0_d, -1.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, & - 8.0_d/3.0_d, -2.0_d, 1.0_d/3.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, & - 16.0_d/5.0_d, -3.0_d, 1.0_d, -1.0_d/5.0_d, 0.0_d, 0.0_d, 0.0_d, & - 128.0_d/35.0_d, -4.0_d, 2.0_d, -4.0_d/5.0_d, 1.0_d/7.0_d, 0.0_d, 0.0_d, & - 256.0_d/63.0_d, -5.0_d, 10.0_d/3.0_d, -2.0_d, 5.0_d/7.0_d, -1.0_d/9.0_d, 0.0_d & - /), (/5,7/)) - - real(d), parameter :: neumann(5,7) = & - reshape((/ & - -1.0_d, 1.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, & - -1.0_d, 1.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, & - -24.0_d/23.0_d, 21.0_d/23.0_d, 3.0_d/23.0_d, -1.0_d/23.0_d, 0.0_d, 0.0_d, 0.0_d, & - -12.0_d/11.0_d, 17.0_d/22.0_d, 9.0_d/22.0_d, -5.0_d/22.0_d, 1.0_d/22.0_d, 0.0_d, 0.0_d, & - -640.0_d/563.0_d, 335.0_d/563.0_d, 1430.0_d/1689.0_d, -370.0_d/563.0_d, 145.0_d/563.0_d, -71.0_d/1689.0_d, 0.0_d & - /), (/5,7/)) - - real(d), parameter :: corn(5,6) = & - reshape((/ & - 1.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, & - 2.0_d, -1.0_d, 0.0_d, 0.0_d, 0.0_d, 0.0_d, & - 3.0_d, -3.0_d, 1.0_d, 0.0_d, 0.0_d, 0.0_d, & - 4.0_d, -6.0_d, 4.0_d, -1.0_d, 0.0_d, 0.0_d, & - 5.0_d, -10.0_d, 10.0_d, -5.0_d, 1.0_d, 0.0_d & - /), (/5,6/)) - - type bc_rec - integer :: dim = 0 - integer, pointer :: ord(:) => Null() - real(dp_t), pointer :: cf(:,:) => Null() - logical, pointer :: m_xl(:) => Null() - logical, pointer :: m_xh(:) => Null() - logical, pointer :: m_yl(:) => Null() - logical, pointer :: m_yh(:) => Null() - end type bc_rec - -contains - - subroutine bc_interp_2d(ff, lo, bcr, & - v_xl, v_xh, & - v_yl, v_yh & - ) - - integer, intent(in) :: lo(:) - real(dp_t), intent(inout) :: ff(lo(1)-1:,lo(2)-1:) - real(dp_t), intent(in) :: v_xl(lo(2):) - real(dp_t), intent(in) :: v_xh(lo(2):) - real(dp_t), intent(in) :: v_yl(lo(2):) - real(dp_t), intent(in) :: v_yh(lo(2):) - type(bc_rec), intent(in) :: bcr - integer :: n, i, j - integer :: hi(size(lo)) - - hi(1) = ubound(ff,1)-1; hi(2) = ubound(ff,2)-1 - - ! X Face - do j = lo(2), hi(2) - if ( bcr%m_xl(j) ) then - ff(lo(1)-1, j) = v_xl(j)*bcr%cf(1,0) + sum(ff(lo(1):lo(1)+bcr%ord(1):+1,j)*bcr%cf(1,1:bcr%ord(1))) - end if - if ( bcr%m_xh(j) ) then - ff(hi(1)+1, j) = v_xh(j)*bcr%cf(1,0) + sum(ff(hi(1):hi(1)-bcr%ord(1)+1:-1,j)*bcr%cf(1,1:bcr%ord(1))) - end if - end do - - ! Y Face - do i = lo(1), hi(1) - if ( bcr%m_yl(i) ) then - ff(i,lo(2)-1) = v_yl(i)*bcr%cf(2,0) + sum(ff(i,lo(2):lo(2)+bcr%ord(2):+1)*bcr%cf(2,1:bcr%ord(2))) - end if - if ( bcr%m_yh(i) ) then - ff(i,hi(2)+1) = v_yh(i)*bcr%cf(2,0) + sum(ff(i,hi(2):hi(2)-bcr%ord(2)+1:-1)*bcr%cf(2,1:bcr%ord(2))) - end if - end do - - end subroutine bc_interp_2d - -end module intrp_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_edge_coeffs.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_edge_coeffs.f90 deleted file mode 100644 index 2cf2c2565..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_edge_coeffs.f90 +++ /dev/null @@ -1,102 +0,0 @@ -module cc_edge_coeffs_module - - use BoxLib - use ml_layout_module - use multifab_module - use bl_error_module - - implicit none - -contains - - subroutine cell_to_edge_coeffs(cell_coeffs,edge_coeffs) - - type(multifab ), intent(in ) :: cell_coeffs - type(multifab ), intent(inout) :: edge_coeffs(:) - - type(box) :: bx - real(kind=dp_t), pointer :: cp(:,:,:,:) - real(kind=dp_t), pointer :: epx(:,:,:,:) - real(kind=dp_t), pointer :: epy(:,:,:,:) - real(kind=dp_t), pointer :: epz(:,:,:,:) - - integer :: i, dm - - dm = cell_coeffs%dim - - do i = 1, nfabs(cell_coeffs) - bx = get_ibox(cell_coeffs, i) - cp => dataptr(cell_coeffs,i) - epx => dataptr(edge_coeffs(1),i) - epy => dataptr(edge_coeffs(2),i) - if (dm.eq.2) then - call cc_to_edges_2d(cp(:,:,1,1),epx(:,:,1,1),epy(:,:,1,1),bx) - else if (dm.eq.3) then - epz => dataptr(edge_coeffs(3),i) - call cc_to_edges_3d(cp(:,:,:,1),epx(:,:,:,1),epy(:,:,:,1),epz(:,:,:,1),bx) - end if - end do - - end subroutine cell_to_edge_coeffs - - subroutine cc_to_edges_2d(cc_coeffs,x_edges,y_edges,bx) - - type(box) , intent(in ) :: bx - double precision, intent(in ) :: cc_coeffs(bx%lo(1)-1:,bx%lo(2)-1:) - double precision, intent(inout) :: x_edges(bx%lo(1):,bx%lo(2):) - double precision, intent(inout) :: y_edges(bx%lo(1):,bx%lo(2):) - - integer :: i,j - - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1)+1 - x_edges(i,j) = 0.5d0 * (cc_coeffs(i,j) + cc_coeffs(i-1,j)) - end do - end do - - do i = bx%lo(1),bx%hi(1) - do j = bx%lo(2),bx%hi(2)+1 - y_edges(i,j) = 0.5d0 * (cc_coeffs(i,j) + cc_coeffs(i,j-1)) - end do - end do - - end subroutine cc_to_edges_2d - - subroutine cc_to_edges_3d(cc_coeffs,x_edges,y_edges,z_edges,bx) - - type(box) , intent(in ) :: bx - double precision, intent(in ) :: cc_coeffs(bx%lo(1)-1:,bx%lo(2)-1:,bx%lo(3)-1:) - double precision, intent(inout) :: x_edges(bx%lo(1):,bx%lo(2):,bx%lo(3):) - double precision, intent(inout) :: y_edges(bx%lo(1):,bx%lo(2):,bx%lo(3):) - double precision, intent(inout) :: z_edges(bx%lo(1):,bx%lo(2):,bx%lo(3):) - - integer :: i,j,k - - do k = bx%lo(3),bx%hi(3) - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1)+1 - x_edges(i,j,k) = 0.5d0 * (cc_coeffs(i,j,k) + cc_coeffs(i-1,j,k)) - end do - end do - end do - - do k = bx%lo(3),bx%hi(3) - do j = bx%lo(2),bx%hi(2)+1 - do i = bx%lo(1),bx%hi(1) - y_edges(i,j,k) = 0.5d0 * (cc_coeffs(i,j,k) + cc_coeffs(i,j-1,k)) - end do - end do - end do - - do k = bx%lo(3),bx%hi(3)+1 - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1) - z_edges(i,j,k) = 0.5d0 * (cc_coeffs(i,j,k) + cc_coeffs(i,j,k-1)) - end do - end do - end do - - end subroutine cc_to_edges_3d - - -end module cc_edge_coeffs_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_multi.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_multi.f90 deleted file mode 100644 index dfd2b821f..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_multi.f90 +++ /dev/null @@ -1,182 +0,0 @@ - -subroutine t_cc_ml_multigrid(mla, mgt, rh, coeffs_type, domain_bc, do_diagnostics, eps, stencil_order, fabio) - - use BoxLib - use cc_stencil_module - use cc_stencil_fill_module - use ml_norm_module - use mg_module - use list_box_module - use ml_boxarray_module - use ml_layout_module - use itsol_module - use bl_mem_stat_module - use bl_timer_module - use box_util_module - use bl_IO_module - use fabio_module - use ml_restriction_module - use ml_prolongation_module - use ml_cc_module - - use bndry_reg_module - - use cc_rhs_module - use cc_edge_coeffs_module - use init_cell_coeffs_module - - implicit none - - type(ml_layout), intent(inout) :: mla - type(mg_tower) , intent(inout) :: mgt(:) - type( multifab), intent(inout) :: rh(:) - - integer , intent(in ) :: coeffs_type - integer , intent(in ) :: domain_bc(:,:) - integer , intent(in ) :: do_diagnostics - real(dp_t) , intent(in ) :: eps - integer , intent(in ) :: stencil_order - logical , intent(in ) :: fabio - - type(box ) :: pd - - type(multifab), allocatable :: alpha(:) - type(multifab), allocatable :: edge_coeffs(:,:) - - type( multifab), allocatable :: full_soln(:) - - type(multifab) :: cell_coeffs - - type(layout) :: la - real(dp_t) , allocatable :: xa(:), xb(:), pxa(:), pxb(:) - - integer , allocatable :: ref_ratio(:,:) - integer :: d, n, dm, nlevs - - real(dp_t) :: snrm(2) - - real(dp_t) :: mac_beta - - dm = mla%dim - - nlevs = mla%nlevel - - allocate(full_soln(nlevs)) - allocate(xa(dm), xb(dm), pxa(dm), pxb(dm)) - - allocate(ref_ratio(nlevs-1,dm)) - do n = 1,nlevs-1 - ref_ratio(n,:) = mla%mba%rr(n,:) - end do - - ! NOTE THIS CHANGE: we now have stencil values which reach outside the - ! grid in the case of Dirichlet bc's and skewed stencils - - do n = nlevs, 1, -1 - - call multifab_build(full_soln(n), mla%la(n), 1, 1) - call setval(full_soln(n), val = ZERO, all=.true.) - - end do - - !! Fill coefficient arrays - - mac_beta = 1.0_dp_t - - do n = nlevs, 1, -1 - - la = mla%la(n) - - allocate(alpha(mgt(n)%nlevels)) - allocate(edge_coeffs(mgt(n)%nlevels,dm)) - - call multifab_build(alpha(mgt(n)%nlevels),la,nc=1,ng=1) - call setval(alpha(mgt(n)%nlevels),0.d0,all=.true.) - - do d = 1,dm - call multifab_build_edge(edge_coeffs(mgt(n)%nlevels,d), la, nc=1, ng=0, dir=d) - end do - - if (coeffs_type .eq. 0) then - do d = 1,dm - call setval(edge_coeffs(mgt(n)%nlevels,d),mac_beta,all=.true.) - end do - else - pd = mla%mba%pd(n) - call multifab_build(cell_coeffs,mla%la(n),nc=1,ng=1) - call init_cell_coeffs(mla,cell_coeffs,pd,coeffs_type,fabio) - call cell_to_edge_coeffs(cell_coeffs,edge_coeffs(mgt(n)%nlevels,:)) - call multifab_destroy(cell_coeffs) - end if - - end do - - do n = nlevs,2,-1 - do d = 1,dm - call ml_edge_restriction(edge_coeffs(n-1,d),edge_coeffs(n,d),mla%mba%rr(n-1,:),d) - end do - end do - - do n = nlevs, 1, -1 - - pxa = ZERO - pxb = ZERO - if (n > 1) then - xa = HALF*ref_ratio(n-1,:)*mgt(n)%dh(:,mgt(n)%nlevels) - xb = HALF*ref_ratio(n-1,:)*mgt(n)%dh(:,mgt(n)%nlevels) - else - xa = ZERO - xb = ZERO - end if - - call stencil_fill_cc_all_mglevels(mgt(n), alpha, edge_coeffs, xa, xb, pxa, pxb, & - stencil_order, domain_bc) - end do - - do n = nlevs, 1, -1 - call destroy(alpha(mgt(n)%nlevels)) - deallocate(alpha) - - do d = 1, dm - call destroy(edge_coeffs(mgt(n)%nlevels,d)) - end do - deallocate(edge_coeffs) - end do - - if ( fabio ) then - call fabio_ml_write(rh, ref_ratio(:,1), "rh-init_cc") - end if - - snrm(2) = ml_norm_inf(rh,mla%mask) - -! **************************************************************************** - - call ml_cc(mla, mgt, rh, full_soln, mla%mask, ref_ratio, do_diagnostics, eps) - -! **************************************************************************** - - if ( fabio ) then - call fabio_ml_write(full_soln, ref_ratio(:,1), "soln_cc") - end if - -! snrm(1) = ml_norm_l2(full_soln,ref_ratio,mla%mask) -! snrm(2) = ml_norm_inf(full_soln,mla%mask) -! if ( parallel_IOProcessor() ) then -! print *, 'SOLUTION MAX NORM ', snrm(2) -! print *, 'SOLUTION L2 NORM ', snrm(1) -! end if - -! if ( parallel_IOProcessor() ) print *, 'MEMORY STATS' -! call print(multifab_mem_stats(), " multifab before") -! call print(imultifab_mem_stats(), "imultifab before") -! call print(fab_mem_stats(), " fab before") -! call print(ifab_mem_stats(), " ifab before") -! call print(boxarray_mem_stats(), " boxarray before") -! call print(boxassoc_mem_stats(), " boxassoc before") -! call print(layout_mem_stats(), " layout before") - - do n = 1,nlevs - call multifab_destroy(full_soln(n)) - end do - -end subroutine t_cc_ml_multigrid diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_rhs.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_rhs.f90 deleted file mode 100644 index 76d3eef1c..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/cc_rhs.f90 +++ /dev/null @@ -1,397 +0,0 @@ -module cc_rhs_module - use BoxLib - use ml_layout_module - use multifab_module - use mt19937_module - - implicit none - -contains - - subroutine cc_rhs(mla, pd, rh, rhs_type) - - type(ml_layout), intent(inout) :: mla - type(box ), intent(in ) :: pd - type( multifab), intent(inout) :: rh(:) - integer , intent(in ) :: rhs_type - - integer :: n, dm, nlevs - - dm = mla%dim - - nlevs = mla%nlevel - - do n = nlevs, 1, -1 - call setval(rh(n), val = 0.d0, all=.true.) - end do - - if (rhs_type .eq. 1) then - call mf_init_1(rh(nlevs),pd) - else if (rhs_type .eq. 2) then - call mf_init_2(rh(nlevs),pd) - else if (rhs_type .eq. 3) then - call mf_init_3(rh(nlevs),pd) - else if (rhs_type .eq. 4) then - call mf_init_sins(rh(nlevs),pd) - else if (rhs_type .eq. 5) then - call mf_init_exact(rh(nlevs),pd) - else if (rhs_type .eq. 6) then - call mf_init_rand(rh(nlevs),pd) - end if - - end subroutine cc_rhs - - subroutine mf_init_1(mf,pd) - - type(multifab), intent(inout) :: mf - type(box) , intent(in ) :: pd - type(box) :: bx - - bx = pd - bx%lo(1:bx%dim) = (bx%hi(1:bx%dim) + bx%lo(1:bx%dim))/4 - bx%hi(1:bx%dim) = bx%lo(1:bx%dim) - call setval(mf, 1.d0, bx) - - call print(bx,'Setting to 1 here ') - - bx = pd - bx%lo(1:bx%dim) = 3*(bx%hi(1:bx%dim) + bx%lo(1:bx%dim))/4 - bx%hi(1:bx%dim) = bx%lo(1:bx%dim) - call setval(mf, -1.d0, bx) - - call print(bx,'Setting to -1 here ') - - end subroutine mf_init_1 - - subroutine mf_init_2(mf,pd) - - type(multifab), intent(inout) :: mf - type(box ), intent(in ) :: pd - - integer :: i - type(box) :: bx - - do i = 1, nfabs(mf) - - bx = get_box(mf,i) - bx%lo(1:bx%dim) = (bx%hi(1:bx%dim) + bx%lo(1:bx%dim))/2 - bx%hi(1:bx%dim) = bx%lo(1:bx%dim) - call setval(mf%fbs(i), 1.0_dp_t, bx) - -! Single point of non-zero RHS: use this to make system solvable - bx = get_box(mf,i) - bx%lo(1 ) = (bx%hi(1 ) + bx%lo(1 ))/2 + 1 - bx%lo(2:bx%dim) = (bx%hi(2:bx%dim) + bx%lo(2:bx%dim))/2 - bx%hi(1:bx%dim) = bx%lo(1:bx%dim) - call setval(mf%fbs(i), -1.0_dp_t, bx) - -! 1-d Strip: Variation in x-direction -! bx%lo(1) = (bx%hi(1) + bx%lo(1))/2 -! bx%hi(1) = bx%lo(1)+1 - -! 1-d Strip: Variation in y-direction -! bx%lo(2) = (bx%hi(2) + bx%lo(2))/2 -! bx%hi(2) = bx%lo(2)+1 - -! 1-d Strip: Variation in z-direction -! bx%lo(3) = (bx%hi(3) + bx%lo(3))/2 -! bx%hi(3) = bx%lo(3)+1 - - end do - end subroutine mf_init_2 - - subroutine mf_init_3(mf,pd) - - type(multifab), intent(inout) :: mf - type(box ) , intent(in ) :: pd - - integer :: i - type(box) :: bx, rhs_box, rhs_intersect_box - - rhs_box%dim = mf%dim - rhs_box%lo(1:rhs_box%dim) = 7 - rhs_box%hi(1:rhs_box%dim) = 8 - - do i = 1, nfabs(mf) - bx = get_ibox(mf,i) - rhs_intersect_box = box_intersection(bx,rhs_box) - if (.not. empty(rhs_intersect_box)) then - bx%lo(1:bx%dim) = lwb(rhs_intersect_box) - bx%hi(1:bx%dim) = upb(rhs_intersect_box) -! print *,'SETTING RHS IN BOX ',i,' : ', bx%lo(1:bx%dim),bx%hi(1:bx%dim) - call setval(mf%fbs(i), 1.d0, bx) - end if - end do - - end subroutine mf_init_3 - - subroutine mf_init_sins(mf,pd) - - type(multifab) , intent(inout) :: mf - type(box ) , intent(in ) :: pd - - type(box) :: bx - real(kind=dp_t) :: dx - real(kind=dp_t), pointer :: rp(:,:,:,:) - - integer :: i,dm,nx,ny - - nx = pd%hi(1) - pd%lo(1) + 1 - ny = pd%hi(2) - pd%lo(2) + 1 - - if (nx .ne. ny) then - print *,'Not sure what to do with nx .neq. ny in mf_init_sins' - stop - end if - - dx = 1.d0 / dble(nx) - - dm = mf%dim - - print *,'Setting rhs to a sum of sins ' - do i = 1, nfabs(mf) - bx = get_ibox(mf, i) - rp => dataptr(mf,i,bx) - if (dm.eq.2) then - call init_sin_2d(rp(:,:,1,1),bx,dx) - else if (dm.eq.3) then - call init_sin_3d(rp(:,:,:,1),bx,dx) - end if - end do - - end subroutine mf_init_sins - - subroutine init_sin_2d(rhs,bx,dx) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: rhs(bx%lo(1):,bx%lo(2):) - double precision, intent(in ) :: dx - - integer :: i,j - double precision :: tpi, epi, spi - double precision :: x, y - - tpi = 8.d0 * datan(1.d0) - - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1) - x = (dble(i)+0.5d0) * dx - y = (dble(j)+0.5d0) * dx - rhs(i,j) = sin(tpi*x) + sin(tpi*y) - end do - end do - - end subroutine init_sin_2d - - subroutine init_sin_3d(rhs,bx,dx) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: rhs(bx%lo(1):,bx%lo(2):,bx%lo(3):) - double precision, intent(in ) :: dx - - integer :: i,j,k - double precision :: tpi, epi, spi - double precision :: x, y, z - - tpi = 8.d0 * datan(1.d0) - epi = 4.d0 * tpi - spi = 16.d0 * tpi - - do k = bx%lo(3),bx%hi(3) - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1) - x = (dble(i)+0.5d0) * dx - y = (dble(j)+0.5d0) * dx - z = (dble(k)+0.5d0) * dx - rhs(i,j,k) = sin(tpi*x) + sin(tpi*y) + sin(tpi*z) - end do - end do - end do - - end subroutine init_sin_3d - - subroutine mf_init_exact(mf,pd) - - type(multifab) , intent(inout) :: mf - type(box ) , intent(in ) :: pd - - type(multifab) :: phi - type(box) :: bx - real(kind=dp_t) :: dx - real(kind=dp_t), pointer :: rp(:,:,:,:) - real(kind=dp_t), pointer :: pp(:,:,:,:) - - integer :: i,dm,nx,ny - - nx = pd%hi(1) - pd%lo(1) + 1 - ny = pd%hi(2) - pd%lo(2) + 1 - - call multifab_build(phi,mf%la,1,1) - - if (nx .ne. ny) then - print *,'Not sure what to do with nx .neq. ny in mf_init_exact' - stop - end if - - dx = 1.d0 / dble(nx) - - dm = mf%dim - - print *,'Setting rhs to Lap(phi) where phi = (x^4 - x^2) * (y^4 - y^2) * (z^4 - z^2)' - do i = 1, nfabs(mf) - bx = get_ibox(mf, i) - rp => dataptr(mf,i) - pp => dataptr(phi,i) - if (dm.eq.2) then - call init_exact_2d(rp(:,:,1,1),pp(:,:,1,1),bx,dx) - else if (dm.eq.3) then - call init_exact_3d(rp(:,:,:,1),pp(:,:,:,1),bx,dx) - end if - end do - - end subroutine mf_init_exact - - subroutine init_exact_2d(rhs,phi,bx,dx) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: rhs(bx%lo(1) :,bx%lo(2) :) - double precision, intent(inout) :: phi(bx%lo(1)-1:,bx%lo(2)-1:) - double precision, intent(in ) :: dx - - integer :: i,j - double precision :: tpi, epi, spi - double precision :: x, y - - tpi = 8.d0 * datan(1.d0) - - do j = bx%lo(2)-1,bx%hi(2)+1 - do i = bx%lo(1)-1,bx%hi(1)+1 - x = (dble(i)+0.5d0) * dx - y = (dble(j)+0.5d0) * dx - phi(i,j) = (x**4 - x**2) * (y**4 - y**2) - end do - end do - - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1) - rhs(i,j) = (phi(i+1,j) + phi(i-1,j) + phi(i,j+1) + phi(i,j-1) - 4.d0 * phi(i,j)) / (dx*dx) - end do - end do - - end subroutine init_exact_2d - - subroutine init_exact_3d(rhs,phi,bx,dx) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: rhs(bx%lo(1) :,bx%lo(2) :,bx%lo(3) :) - double precision, intent(inout) :: phi(bx%lo(1)-1:,bx%lo(2)-1:,bx%lo(3)-1:) - double precision, intent(in ) :: dx - - integer :: i,j,k - double precision :: tpi, epi, spi - double precision :: x, y, z - - tpi = 8.d0 * datan(1.d0) - epi = 4.d0 * tpi - spi = 16.d0 * tpi - - do k = bx%lo(3)-1,bx%hi(3)+1 - do j = bx%lo(2)-1,bx%hi(2)+1 - do i = bx%lo(1)-1,bx%hi(1)+1 - x = (dble(i)+0.5d0) * dx - y = (dble(j)+0.5d0) * dx - z = (dble(k)+0.5d0) * dx - phi(i,j,k) = (x**4 - x**2) * (y**4 - y**2) * (z**4 - z**2) - end do - end do - end do - - do k = bx%lo(3),bx%hi(3) - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1) - rhs(i,j,k) = (phi(i+1,j,k) + phi(i-1,j,k) + phi(i,j+1,k) + phi(i,j-1,k) & - +phi(i,j,k+1) + phi(i,j,k-1) - 6.d0 * phi(i,j,k)) / (dx*dx) - end do - end do - end do - - end subroutine init_exact_3d - - subroutine mf_init_rand(mf,pd) - - type(multifab) , intent(inout) :: mf - type(box ) , intent(in ) :: pd - - type(box) :: bx - real(kind=dp_t) :: dx - real(kind=dp_t), pointer :: rp(:,:,:,:) - - integer :: i,dm,nx,ny - - nx = pd%hi(1) - pd%lo(1) + 1 - ny = pd%hi(2) - pd%lo(2) + 1 - - dx = 1.d0 / dble(nx) - - dm = mf%dim - - print *,'Setting rhs to random numbers on the interval [-0.5,0.5], dm = ', dm - do i = 1, nfabs(mf) - bx = get_ibox(mf, i) - rp => dataptr(mf,i,bx) - if (dm.eq.2) then - call init_rand_2d(rp(:,:,1,1),bx,dx) - else if (dm.eq.3) then - call init_rand_3d(rp(:,:,:,1),bx,dx) - end if - end do - - end subroutine mf_init_rand - - subroutine init_rand_2d(rhs,bx,dx) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: rhs(bx%lo(1):,bx%lo(2):) - double precision, intent(in ) :: dx - - integer :: i,j - double precision :: rhsAvg - - call init_genrand(1) - - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1) - rhs(i,j) = genrand_real3() - end do - end do - - rhsAvg = sum(rhs)/((bx%hi(1)-bx%lo(1)+1)*(bx%hi(2)-bx%lo(2)+1)) - rhs = rhs - rhsAvg - - end subroutine init_rand_2d - - subroutine init_rand_3d(rhs,bx,dx) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: rhs(bx%lo(1):,bx%lo(2):,bx%lo(3):) - double precision, intent(in ) :: dx - - integer :: i,j,k - double precision :: rhsAvg - - call init_genrand(1) - - do k = bx%lo(3),bx%hi(3) - do j = bx%lo(2),bx%hi(2) - do i = bx%lo(1),bx%hi(1) - rhs(i,j,k) = genrand_real3() - end do - end do - end do - - rhsAvg = sum(rhs)/((bx%hi(1)-bx%lo(1)+1)*(bx%hi(2)-bx%lo(2)+1)*(bx%hi(3)-bx%lo(3)+1)) - rhs = rhs - rhsAvg - - end subroutine init_rand_3d - -end module cc_rhs_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/compute_defect.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/compute_defect.f90 deleted file mode 100644 index dc07aad0a..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/compute_defect.f90 +++ /dev/null @@ -1,115 +0,0 @@ -module stencil_defect_module - - use bl_types - use multifab_module - use cc_stencil_module - use stencil_types_module - - implicit none - -contains - - ! Computes dd = ff - ss * uu - subroutine compute_defect(ss, dd, ff, uu, mm, stencil_type, lcross, & - uniform_dh, bottom_solver) - - use bl_prof_module - - type(multifab), intent(in) :: ff, ss - type(multifab), intent(inout) :: dd, uu - type(imultifab), intent(in) :: mm - integer, intent(in) :: stencil_type - logical, intent(in) :: lcross - logical, intent(in), optional :: uniform_dh, bottom_solver - type(bl_prof_timer), save :: bpt - - call build(bpt, "compute_defect") - call stencil_apply(ss, dd, uu, mm, stencil_type, lcross, & - uniform_dh, bottom_solver) - call saxpy(dd, ff, -1.0_dp_t, dd) - call destroy(bpt) - - end subroutine compute_defect - - ! - ! Computes rr = aa * uu - ! - subroutine stencil_apply(aa, rr, uu, mm, stencil_type, lcross, & - uniform_dh, bottom_solver) - - use bl_prof_module - - use cc_stencil_apply_module - use nodal_stencil_apply_module, only: stencil_apply_1d_nodal, & - stencil_apply_2d_nodal, & - stencil_apply_3d_nodal - - type(multifab), intent(in) :: aa - type(multifab), intent(inout) :: rr - type(multifab), intent(inout) :: uu - type(imultifab), intent(in) :: mm - integer, intent(in) :: stencil_type - logical, intent(in) :: lcross - logical, intent(in),optional :: uniform_dh, bottom_solver - - real(kind=dp_t), pointer :: rp(:,:,:,:), up(:,:,:,:), ap(:,:,:,:) - integer , pointer :: mp(:,:,:,:) - integer :: i, n, lo(get_dim(rr)), hi(get_dim(rr)), dm - logical :: nodal_flag, luniform_dh, lbottom_solver - - type(bl_prof_timer), save :: bpt - - call build(bpt, "its_stencil_apply") - - luniform_dh = .false. ; if ( present(uniform_dh) ) luniform_dh = uniform_dh - lbottom_solver = .false. ; if ( present(bottom_solver) ) lbottom_solver = bottom_solver - - call bl_assert(ncomp(uu).ge.ncomp(rr), 'uu must have at least as many components as rr') - - call fill_boundary(uu, 1, ncomp(rr), cross = lcross) - - dm = get_dim(rr) - nodal_flag = nodal_q(uu) - - do i = 1, nfabs(rr) - rp => dataptr(rr, i) - up => dataptr(uu, i) - ap => dataptr(aa, i) - mp => dataptr(mm, i) - lo = lwb(get_box(uu,i)) - hi = upb(get_box(uu,i)) - do n = 1, ncomp(rr) - select case(dm) - case (1) - if ( .not. nodal_flag) then - call stencil_apply_1d(ap(:,:,1,1), rp(:,1,1,n), nghost(rr), up(:,1,1,n), nghost(uu), & - mp(:,1,1,1), lo, hi) - else - call stencil_apply_1d_nodal(ap(:,:,1,1), rp(:,1,1,n), up(:,1,1,n), & - mp(:,1,1,1), nghost(uu)) - end if - case (2) - if ( .not. nodal_flag) then - call stencil_apply_2d(ap(:,:,:,1), rp(:,:,1,n), nghost(rr), up(:,:,1,n), nghost(uu), & - mp(:,:,1,1), lo, hi) - else - call stencil_apply_2d_nodal(ap(:,:,:,1), rp(:,:,1,n), up(:,:,1,n), & - mp(:,:,1,1), nghost(uu), stencil_type) - end if - case (3) - if ( .not. nodal_flag) then - call stencil_apply_3d(ap(:,:,:,:), rp(:,:,:,n), nghost(rr), up(:,:,:,n), nghost(uu), & - mp(:,:,:,1), bottom_solver=lbottom_solver) - else - call stencil_apply_3d_nodal(ap(:,:,:,:), rp(:,:,:,n), up(:,:,:,n), & - mp(:,:,:,1), nghost(uu), stencil_type, luniform_dh, lbottom_solver) - end if - end select - end do - end do - - call destroy(bpt) - - end subroutine stencil_apply - -end module stencil_defect_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_2d_1lev b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_2d_1lev deleted file mode 100644 index fd05d973d..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_2d_1lev +++ /dev/null @@ -1,9 +0,0 @@ -2 -1 - -4 -0 0 7 7 -8 0 15 7 -0 8 7 15 -8 8 15 15 - diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_2d_2lev b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_2d_2lev deleted file mode 100644 index 8856393f5..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_2d_2lev +++ /dev/null @@ -1,13 +0,0 @@ -2 -2 -2 -4 -0 0 7 7 -8 0 15 7 -0 8 7 15 -8 8 15 15 -3 - 4 4 11 11 - 8 12 11 15 -12 8 19 19 - diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_3d_1lev b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_3d_1lev deleted file mode 100644 index fa52d5e84..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_3d_1lev +++ /dev/null @@ -1,13 +0,0 @@ -3 -1 - -8 - 0 0 0 15 15 15 -16 0 0 31 15 15 - 0 16 0 15 31 15 -16 16 0 31 31 15 - 0 0 16 15 15 31 -16 0 16 31 15 31 - 0 16 16 15 31 31 -16 16 16 31 31 31 - diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_3d_2lev b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_3d_2lev deleted file mode 100644 index 124f4e7ec..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/grids_3d_2lev +++ /dev/null @@ -1,20 +0,0 @@ -3 -2 -2 -8 - 0 0 0 15 15 15 -16 0 0 31 15 15 - 0 16 0 15 31 15 -16 16 0 31 31 15 - 0 0 16 15 15 31 -16 0 16 31 15 31 - 0 16 16 15 31 31 -16 16 16 31 31 31 -6 - 8 8 8 23 23 23 -16 24 8 23 31 23 -24 16 8 39 39 23 - 8 8 24 23 23 39 -24 8 24 31 15 39 -24 16 24 39 23 39 - diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/init_cell_coeffs.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/init_cell_coeffs.f90 deleted file mode 100644 index 2504752aa..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/init_cell_coeffs.f90 +++ /dev/null @@ -1,123 +0,0 @@ -module init_cell_coeffs_module - - use BoxLib - use fabio_module - use ml_layout_module - use multifab_module - use bl_error_module - - implicit none - -contains - - subroutine init_cell_coeffs(mla, cell_coeffs, pd, coeffs_type, fabio) - - type(ml_layout), intent(inout) :: mla - type(multifab ), intent(inout) :: cell_coeffs - type(box) , intent(in ) :: pd - integer , intent(in ) :: coeffs_type - logical , intent(in ) :: fabio - - real(kind=dp_t) :: c_norm - - if (coeffs_type .eq. 1 .or. coeffs_type .eq. 2) then - call coeffs_init_1(cell_coeffs,pd,coeffs_type) - else - call bl_error("Dont know this coeffs type") - end if - - call multifab_fill_boundary(cell_coeffs) - - c_norm = norm_inf(cell_coeffs) - if ( parallel_ioprocessor() ) & - print *,'Max norm of coefficient array ',c_norm - - if ( fabio ) then - call fabio_write(cell_coeffs, "coeffs","Header") - end if - - end subroutine init_cell_coeffs - - subroutine coeffs_init_1(cell_coeffs,pd,coeffs_type) - - type( multifab), intent(inout) :: cell_coeffs - type(box) , intent(in ) :: pd - integer , intent(in ) :: coeffs_type - - type(box) :: bx - real(kind=dp_t) :: dx - real(kind=dp_t), pointer :: cp(:,:,:,:) - - integer :: i,dm,nx,ny - real(kind=dp_t) :: fac_2d, fac_3d - - nx = pd%hi(1) - pd%lo(1) + 1 - ny = pd%hi(2) - pd%lo(2) + 1 - - dm = cell_coeffs%dim - dx = 1.d0 / dble(nx) - - if (coeffs_type .eq. 1) then - fac_2d = 160.d0 - fac_3d = 640.d0 - else if (coeffs_type .eq. 2) then - fac_2d = 1600.d0 - fac_3d = 6400.d0 - end if - - do i = 1, nfabs(cell_coeffs) - bx = get_ibox(cell_coeffs, i) - cp => dataptr(cell_coeffs,i) - if (dm.eq.2) then - call init_coeffs_2d(cp(:,:,1,1),bx,dx,fac_2d) - else if (dm.eq.3) then - call init_coeffs_3d(cp(:,:,:,1),bx,dx,fac_3d) - end if - end do - - end subroutine coeffs_init_1 - - subroutine init_coeffs_2d(cc_coeffs,bx,dx,fac) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: cc_coeffs(bx%lo(1)-1:,bx%lo(2)-1:) - double precision, intent(in ) :: dx,fac - - integer :: i,j - double precision :: x, y - - do j = bx%lo(2)-1,bx%hi(2)+1 - do i = bx%lo(1)-1,bx%hi(1)+1 - x = (dble(i)+0.5d0) * dx - y = (dble(j)+0.5d0) * dx - cc_coeffs(i,j) = 1.d0 + fac * (x**4 - x**2) * (y**4 - y**2) - end do - end do - - end subroutine init_coeffs_2d - - subroutine init_coeffs_3d(cell_coeffs,bx,dx,fac) - - type(box) , intent(in ) :: bx - double precision, intent(inout) :: cell_coeffs(bx%lo(1)-1:,& - bx%lo(2)-1:,bx%lo(3)-1:) - double precision, intent(in ) :: dx,fac - - integer :: i,j,k - double precision :: x, y, z - - do k = bx%lo(3)-1,bx%hi(3)+1 - do j = bx%lo(2)-1,bx%hi(2)+1 - do i = bx%lo(1)-1,bx%hi(1)+1 - x = (dble(i)+0.5d0) * dx - y = (dble(j)+0.5d0) * dx - z = (dble(k)+0.5d0) * dx - cell_coeffs(i,j,k) = 1.d0 - fac * (x**4 - x**2) & - * (y**4 - y**2) * (z**4 - z**2) - end do - end do - end do - - end subroutine init_coeffs_3d - -end module init_cell_coeffs_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.2d.nodal.cross b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.2d.nodal.cross deleted file mode 100644 index ffe76305c..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.2d.nodal.cross +++ /dev/null @@ -1,53 +0,0 @@ -&PROBIN - - ! 2-d - dm = 2 - - ! By setting this we tell the code to read the multilevel boxarray from this file - test_set = "grids_2d_2lev" - - ! Number of relaxations per level on the way down - nu1 = 2 - - ! Number of relaxations per level on the way up - nu2 = 2 - - ! Verbosity of the solver - verbose = 2 - cg_verbose = 0 - - ! Use a BiCG bottom solver at the bottom of the V- or F-cycle. - bottom_solver = 1 - - ! Maximum number of allowed iterations - max_iter = 100 - - ! Number of grid cells in each direction - pd_xyz = 128, 128, 128 - - ! This is the maximum allowed number of cells in each grid - ! If this is set equal to (or greater than) the values of pd_xyz - ! then there will be only one grid covering the entire domain - ba_maxsize = 64 - - ! V-cycle - cycle_type = 3 - - ! Don't output the rhs or solution as a FAB. - fabio = F - - ! This is a nodal solve - nodal_in = t - - ! ... using the dense (as opposed to cross) stencil - dense_in = F - - ! This problem is triply periodic - pd_pmask = T, T, T - - ! Convergence is defined as |Res| < eps * |Rhs| - eps = 1.e-10 - - ! type = 1: Coefficients = 1; type = 2: Coefficients = polynomial - coeffs_type = 2 -/ diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.2d.nodal.dense b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.2d.nodal.dense deleted file mode 100644 index 865de9a8a..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.2d.nodal.dense +++ /dev/null @@ -1,53 +0,0 @@ -&PROBIN - - ! 2-d - dm = 2 - - ! By setting this we tell the code to read the multilevel boxarray from this file - test_set = "grids_2d_2lev" - - ! Number of relaxations per level on the way down - nu1 = 2 - - ! Number of relaxations per level on the way up - nu2 = 2 - - ! Verbosity of the solver - verbose = 2 - cg_verbose = 0 - - ! Use a BiCG bottom solver at the bottom of the V- or F-cycle. - bottom_solver = 1 - - ! Maximum number of allowed iterations - max_iter = 100 - - ! Number of grid cells in each direction - pd_xyz = 128, 128, 128 - - ! This is the maximum allowed number of cells in each grid - ! If this is set equal to (or greater than) the values of pd_xyz - ! then there will be only one grid covering the entire domain - ba_maxsize = 64 - - ! V-cycle - cycle_type = 3 - - ! Don't output the rhs or solution as a FAB. - fabio = F - - ! This is a nodal solve - nodal_in = T - - ! ... using the dense (as opposed to cross) stencil - dense_in = T - - ! This problem is triply periodic - pd_pmask = T, T, T - - ! Convergence is defined as |Res| < eps * |Rhs| - eps = 1.e-10 - - ! type = 1: Coefficients = 1; type = 2: Coefficients = polynomial - coeffs_type = 2 -/ diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.3d.nodal.cross b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.3d.nodal.cross deleted file mode 100644 index ba54f1c6a..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.3d.nodal.cross +++ /dev/null @@ -1,54 +0,0 @@ -&PROBIN - - ! 3-d - dm = 3 - - ! By setting this we tell the code to read the multilevel boxarray from this file - test_set = "grids_3d_2lev" - - ! Number of relaxations per level on the way down - nu1 = 2 - - ! Number of relaxations per level on the way up - nu2 = 2 - - ! Verbosity of the solver - verbose = 2 - cg_verbose = 0 - - ! Use a BiCG bottom solver at the bottom of the V- or F-cycle. - bottom_solver = 1 - - ! Maximum number of allowed iterations - max_iter = 100 - - ! Number of grid cells in each direction - pd_xyz = 128, 128, 128 - - ! This is the maximum allowed number of cells in each grid - ! If this is set equal to (or greater than) the values of pd_xyz - ! then there will be only one grid covering the entire domain - ba_maxsize = 64 - - ! V-cycle - cycle_type = 3 - - ! Don't output the rhs or solution as a FAB. - fabio = F - - ! This is a nodal solve - nodal_in = T - - ! ... using the dense (as opposed to cross) stencil - dense_in = F - - ! This problem is triply periodic - pd_pmask = T, T, T - - ! Convergence is defined as |Res| < eps * |Rhs| - eps = 1.e-10 - - ! type = 1: Coefficients = 1; type = 2: Coefficients = polynomial - coeffs_type = 2 - -/ diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.3d.nodal.dense b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.3d.nodal.dense deleted file mode 100644 index e993c87d7..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/inputs.3d.nodal.dense +++ /dev/null @@ -1,54 +0,0 @@ -&PROBIN - - ! 3-d - dm = 3 - - ! By setting this we tell the code to read the multilevel boxarray from this file - test_set = "grids_3d_2lev" - - ! Number of relaxations per level on the way down - nu1 = 2 - - ! Number of relaxations per level on the way up - nu2 = 2 - - ! Verbosity of the solver - verbose = 2 - cg_verbose = 0 - - ! Use a BiCG bottom solver at the bottom of the V- or F-cycle. - bottom_solver = 1 - - ! Maximum number of allowed iterations - max_iter = 100 - - ! Number of grid cells in each direction - pd_xyz = 128, 128, 128 - - ! This is the maximum allowed number of cells in each grid - ! If this is set equal to (or greater than) the values of pd_xyz - ! then there will be only one grid covering the entire domain - ba_maxsize = 64 - - ! V-cycle - cycle_type = 3 - - ! Don't output the rhs or solution as a FAB. - fabio = F - - ! This is a nodal solve - nodal_in = T - - ! ... using the dense (as opposed to cross) stencil - dense_in = T - - ! This problem is triply periodic - pd_pmask = T, T, T - - ! Convergence is defined as |Res| < eps * |Rhs| - eps = 1.e-10 - - ! type = 1: Coefficients = 1; type = 2: Coefficients = polynomial - coeffs_type = 2 - -/ diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/itsol.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/itsol.f90 deleted file mode 100644 index 5a4f090f5..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/itsol.f90 +++ /dev/null @@ -1,1402 +0,0 @@ -module itsol_module - - use bl_types - use multifab_module - use cc_stencil_module - use stencil_types_module - use stencil_defect_module - - implicit none - - integer, private, parameter :: def_bicg_max_iter = 1000 - integer, private, parameter :: def_cg_max_iter = 1000 - - private :: dgemv - private :: itsol_precon - private :: jacobi_precon_1d, jacobi_precon_2d, jacobi_precon_3d - private :: nodal_precon_1d, nodal_precon_2d, nodal_precon_3d - -contains - - subroutine jacobi_precon_1d(a, u, r, ng) - integer, intent(in) :: ng - real(kind=dp_t), intent(in) :: a(0:,:) - real(kind=dp_t), intent(inout) :: u(1-ng:) - real(kind=dp_t), intent(in) :: r(:) - integer :: i, nx - nx = size(a,dim=2) - do i = 1, nx - u(i) = r(i)/a(0,i) - end do - end subroutine jacobi_precon_1d - - subroutine jacobi_precon_2d(a, u, r, ng) - integer, intent(in) :: ng - real(kind=dp_t), intent(in) :: a(0:,:,:) - real(kind=dp_t), intent(inout) :: u(1-ng:,1-ng:) - real(kind=dp_t), intent(in) :: r(:,:) - integer :: i, j, nx, ny - ny = size(a,dim=3) - nx = size(a,dim=2) - do j = 1, ny - do i = 1, nx - u(i,j) = r(i,j)/a(0,i,j) - end do - end do - end subroutine jacobi_precon_2d - - subroutine jacobi_precon_3d(a, u, r, ng) - integer, intent(in) :: ng - real(kind=dp_t), intent(in) :: a(0:,:,:,:) - real(kind=dp_t), intent(inout) :: u(1-ng:,1-ng:,1-ng:) - real(kind=dp_t), intent(in) :: r(:,:,:) - integer i, j, k, nx, ny, nz - nz = size(a,dim=4) - ny = size(a,dim=3) - nx = size(a,dim=2) - do k = 1, nz - do j = 1, ny - do i = 1, nx - u(i,j,k) = r(i,j,k)/a(0,i,j,k) - end do - end do - end do - end subroutine jacobi_precon_3d - - subroutine nodal_precon_1d(a, u, r, mm, ng) - integer, intent(in) :: ng - real(kind=dp_t), intent(in) :: a(0:,:) - real(kind=dp_t), intent(inout) :: u(1-ng:) - real(kind=dp_t), intent(in) :: r(0:) - integer, intent(in) :: mm(:) - integer :: i, nx - nx = size(a,dim=2) - do i = 1, nx - if (.not. bc_dirichlet(mm(i),1,0)) & - u(i) = r(i)/a(0,i) - end do - end subroutine nodal_precon_1d - - subroutine nodal_precon_2d(a, u, r, mm, ng) - integer, intent(in) :: ng - real(kind=dp_t), intent(in) :: a(0:,:,:) - real(kind=dp_t), intent(inout) :: u(1-ng:,1-ng:) - real(kind=dp_t), intent(in) :: r(0:,0:) - integer, intent(in) :: mm(:,:) - integer :: i, j, nx, ny - ny = size(a,dim=3) - nx = size(a,dim=2) - do j = 1, ny - do i = 1, nx - if (.not. bc_dirichlet(mm(i,j),1,0)) then - u(i,j) = r(i,j)/a(0,i,j) - end if - end do - end do - end subroutine nodal_precon_2d - - subroutine nodal_precon_3d(a, u, r, mm, ng) - integer, intent(in) :: ng - real(kind=dp_t), intent(in) :: a(0:,:,:,:) - real(kind=dp_t), intent(inout) :: u(1-ng:,1-ng:,1-ng:) - real(kind=dp_t), intent(in) :: r(0:,0:,0:) - integer, intent(in) :: mm(:,:,:) - integer :: i, j, k, nx, ny, nz - nz = size(a,dim=4) - ny = size(a,dim=3) - nx = size(a,dim=2) - do k = 1, nz - do j = 1, ny - do i = 1, nx - if (.not. bc_dirichlet(mm(i,j,k),1,0)) then - u(i,j,k) = r(i,j,k)/a(0,i,j,k) - end if - end do - end do - end do - end subroutine nodal_precon_3d - - subroutine diag_init_cc_1d(a, ng_a, r, ng_r, lo, hi) - integer , intent(in ) :: ng_a, ng_r - integer , intent(in ) :: lo(:),hi(:) - real(kind=dp_t), intent(inout) :: a(0:,lo(1)-ng_a:) - real(kind=dp_t), intent(inout) :: r(lo(1)-ng_r: ) - - integer :: i, nc - real(kind=dp_t) :: denom - - nc = size(a,dim=1)-1 - ! - ! Protect against divide by zero -- necessary for embedded boundary problems. - ! - do i = lo(1),hi(1) - if (abs(a(0,i)) .gt. zero) then - denom = one / a(0,i) - r(i ) = r(i ) * denom - a(1:nc,i) = a(1:nc,i) * denom - a(0,i ) = one - end if - end do - - end subroutine diag_init_cc_1d - - subroutine diag_init_cc_2d(a, ng_a, r, ng_r, lo, hi) - integer , intent(in ) :: ng_a, ng_r - integer , intent(in ) :: lo(:),hi(:) - real(kind=dp_t), intent(inout) :: a(0:,lo(1)-ng_a:,lo(2)-ng_a:) - real(kind=dp_t), intent(inout) :: r(lo(1)-ng_r:,lo(2)-ng_r: ) - - integer :: i, j, nc - real(kind=dp_t) :: denom - - nc = size(a,dim=1)-1 - ! - ! Protect against divide by zero -- necessary for embedded boundary problems. - ! - do j = lo(2),hi(2) - do i = lo(1),hi(1) - if (abs(a(0,i,j)) .gt. zero) then - denom = one / a(0,i,j) - r(i,j ) = r(i,j ) * denom - a(1:nc,i,j) = a(1:nc,i,j) * denom - a(0,i,j ) = one - end if - end do - end do - - end subroutine diag_init_cc_2d - - subroutine diag_init_cc_3d(a, ng_a, r, ng_r, lo, hi) - integer , intent(in ) :: ng_a, ng_r - integer , intent(in ) :: lo(:),hi(:) - real(kind=dp_t), intent(inout) :: a(0:,lo(1)-ng_a:,lo(2)-ng_a:,lo(3)-ng_a:) - real(kind=dp_t), intent(inout) :: r(lo(1)-ng_r:,lo(2)-ng_r:,lo(3)-ng_r: ) - - integer :: i, j, k, nc - real(kind=dp_t) :: denom - - nc = size(a,dim=1)-1 - ! - ! Protect against divide by zero -- necessary for embedded boundary problems. - ! - do k = lo(3),hi(3) - do j = lo(2),hi(2) - do i = lo(1),hi(1) - if (abs(a(0,i,j,k)) .gt. zero) then - denom = one / a(0,i,j,k) - r(i,j,k ) = r(i,j,k ) * denom - a(1:nc,i,j,k) = a(1:nc,i,j,k) * denom - a(0,i,j,k ) = one - end if - end do - end do - end do - - end subroutine diag_init_cc_3d - - subroutine diag_init_nd_1d(a, ng_a, r, ng_r, mm, ng_m, lo, hi) - integer , intent(in ) :: ng_a, ng_r, ng_m - integer , intent(in ) :: lo(:),hi(:) - real(kind=dp_t), intent(inout) :: a(0:,lo(1)-ng_a:) - real(kind=dp_t), intent(inout) :: r(lo(1)-ng_r: ) - integer , intent(inout) :: mm(lo(1)-ng_m: ) - - integer :: i, nc - real(kind=dp_t) :: denom - - nc = size(a,dim=1)-1 - - do i = lo(1),hi(1)+1 - if (.not. bc_dirichlet(mm(i),1,0)) then - denom = one / a(0,i) - r(i ) = r(i ) * denom - a(1:nc,i) = a(1:nc,i) * denom - a(0,i ) = one - end if - end do - - end subroutine diag_init_nd_1d - - subroutine diag_init_nd_2d(a, ng_a, r, ng_r, mm, ng_m, lo, hi) - integer , intent(in ) :: ng_a, ng_r, ng_m - integer , intent(in ) :: lo(:),hi(:) - real(kind=dp_t), intent(inout) :: a(0:,lo(1)-ng_a:,lo(2)-ng_a:) - real(kind=dp_t), intent(inout) :: r(lo(1)-ng_r:,lo(2)-ng_r: ) - integer , intent(inout) :: mm(lo(1)-ng_m:,lo(2)-ng_m: ) - - integer :: i, j, nc - real(kind=dp_t) :: denom - - nc = size(a,dim=1)-1 - - do j = lo(2),hi(2)+1 - do i = lo(1),hi(1)+1 - if (.not. bc_dirichlet(mm(i,j),1,0)) then - denom = one / a(0,i,j) - r(i,j ) = r(i,j ) * denom - a(1:nc,i,j) = a(1:nc,i,j) * denom - a(0,i,j ) = one - end if - end do - end do - - end subroutine diag_init_nd_2d - - subroutine diag_init_nd_3d(a, ng_a, r, ng_r, mm, ng_m, lo, hi) - integer , intent(in ) :: ng_a, ng_r, ng_m - integer , intent(in ) :: lo(:),hi(:) - real(kind=dp_t), intent(inout) :: a(0:,lo(1)-ng_a:,lo(2)-ng_a:,lo(3)-ng_a:) - real(kind=dp_t), intent(inout) :: r(lo(1)-ng_r:,lo(2)-ng_r:,lo(3)-ng_r: ) - integer , intent(inout) :: mm(lo(1)-ng_m:,lo(2)-ng_m:,lo(3)-ng_m: ) - - integer :: i, j, k, nc - real(kind=dp_t) :: denom - - nc = size(a,dim=1)-1 - - do k = lo(3),hi(3)+1 - do j = lo(2),hi(2)+1 - do i = lo(1),hi(1)+1 - if (.not. bc_dirichlet(mm(i,j,k),1,0)) then - denom = one / a(0,i,j,k) - r(i,j,k ) = r(i,j,k ) * denom - a(1:nc,i,j,k) = a(1:nc,i,j,k) * denom - a(0,i,j,k ) = one - end if - end do - end do - end do - - end subroutine diag_init_nd_3d - - function itsol_converged(rr, bnorm, eps, abs_eps, rrnorm, comm) result(r) - use bl_prof_module - - type(multifab), intent(in ) :: rr - real(dp_t), intent(in ) :: bnorm, eps - real(dp_t), intent(in ), optional :: abs_eps - real(dp_t), intent(out), optional :: rrnorm - integer, intent(in ), optional :: comm - - real(dp_t) :: norm_rr - logical :: r - - if ( present(comm) ) then - norm_rr = norm_inf(rr,comm=comm) - else - norm_rr = norm_inf(rr) - end if - - if ( present(rrnorm) ) rrnorm = norm_rr - - if ( present(abs_eps) ) then - r = (norm_rr <= eps*bnorm) .or. (norm_rr <= abs_eps) - else - r = (norm_rr <= eps*bnorm) - endif - - end function itsol_converged - - subroutine itsol_BiCGStab_solve(aa, uu, rh, mm, eps, max_iter, verbose, stencil_type, lcross, & - stat, singular_in, uniform_dh, nodal_mask, comm_in) - - use bl_prof_module - - integer, intent(in ) :: max_iter - type(imultifab), intent(in ) :: mm - type(multifab), intent(inout) :: uu - type(multifab), intent(in ) :: rh - type(multifab), intent(in ) :: aa - integer, intent(in ) :: stencil_type, verbose - logical, intent(in ) :: lcross - real(kind=dp_t), intent(in ) :: eps - - integer, intent(out), optional :: stat - logical, intent(in ), optional :: singular_in - logical, intent(in ), optional :: uniform_dh - type(multifab), intent(in ), optional :: nodal_mask - integer, intent(in ), optional :: comm_in - - type(layout) :: la - type(multifab) :: rr, rt, pp, ph, vv, tt, ss, rh_local, aa_local - real(kind=dp_t) :: rho_1, alpha, beta, omega, rho, bnorm, rnorm, den - real(dp_t) :: tres0, tnorms(2),rtnorms(2) - integer :: i, cnt, ng_for_res, comm - logical :: nodal_solve, singular, nodal(get_dim(rh)), ioproc - - real(dp_t), pointer :: pdst(:,:,:,:), psrc(:,:,:,:) - - type(bl_prof_timer), save :: bpt - - if ( present(stat) ) stat = 0 - - singular = .false. ; if ( present(singular_in) ) singular = singular_in - ng_for_res = 0 ; if ( nodal_q(rh) ) ng_for_res = 1 - nodal_solve = .false. ; if ( ng_for_res /= 0 ) nodal_solve = .true. - - comm = parallel_communicator() ; if ( present(comm_in) ) comm = comm_in - - if ( comm == parallel_null_communicator() ) return - - call build(bpt, "its_BiCGStab_solve") - - la = get_layout(aa) - nodal = nodal_flags(rh) - ioproc = parallel_IOProcessor(comm = comm) - - call multifab_build(rr, la, 1, ng_for_res, nodal) - call multifab_build(rt, la, 1, ng_for_res, nodal) - call multifab_build(pp, la, 1, ng_for_res, nodal) - call multifab_build(ph, la, 1, nghost(uu), nodal) - call multifab_build(vv, la, 1, ng_for_res, nodal) - call multifab_build(tt, la, 1, ng_for_res, nodal) - call multifab_build(ss, la, 1, ng_for_res, nodal) - ! - ! Use these for local preconditioning. - ! - call multifab_build(rh_local, la, ncomp(rh), nghost(rh), nodal) - call multifab_build(aa_local, la, ncomp(aa), nghost(aa), nodal_flags(aa), stencil = .true.) - - if ( nodal_solve ) then - call setval(rr, ZERO, all=.true.) - call setval(rt, ZERO, all=.true.) - call setval(pp, ZERO, all=.true.) - call setval(vv, ZERO, all=.true.) - call setval(tt, ZERO, all=.true.) - call setval(ss, ZERO, all=.true.) - end if - - call copy(rh_local, 1, rh, 1, nc = ncomp(rh), ng = nghost(rh)) - ! - ! Copy aa -> aa_local; gotta do it by hand since it's a stencil multifab. - ! - do i = 1, nfabs(aa) - pdst => dataptr(aa_local, i) - psrc => dataptr(aa , i) - call cpy_d(pdst, psrc) - end do - ! - ! Make sure to do singular adjustment *before* diagonalization. - ! - if ( singular ) then - call setval(ss,ONE) - tnorms(1) = dot(rh_local, ss, nodal_mask, local = .true.) - tnorms(2) = dot( ss, ss, nodal_mask, local = .true.) - call parallel_reduce(rtnorms, tnorms, MPI_SUM, comm = comm) - rho = rtnorms(1) / rtnorms(2) - if ( ioproc .and. verbose > 0 ) then - print *,' ...singular adjustment to rhs: ', rho - endif - call saxpy(rh_local,-rho,ss) - call setval(ss,ZERO,all=.true.) - end if - - call diag_initialize(aa_local,rh_local,mm) - - call copy(ph, uu, ng = nghost(ph)) - - cnt = 0 - ! - ! Compute rr = aa_local * uu - rh_local. - ! - call compute_defect(aa_local, rr, rh_local, uu, mm, stencil_type, lcross, & - uniform_dh, bottom_solver=.true.) - cnt = cnt + 1 - - call copy(rt, rr) - - rho = dot(rt, rr, nodal_mask, comm = comm) - ! - ! Elide some reductions by calculating local norms & then reducing all together. - ! - tnorms(1) = norm_inf(rr, local = .true.) - tnorms(2) = norm_inf(rh_local, local = .true.) - - call parallel_reduce(rtnorms, tnorms, MPI_MAX, comm = comm) - - tres0 = rtnorms(1) - bnorm = rtnorms(2) - - if ( ioproc .and. verbose > 0 ) then - write(*,*) " BiCGStab: A and rhs have been rescaled. So has the error." - write(unit=*, fmt='(" BiCGStab: Initial error (error0) = ",g15.8)') tres0 - end if - - if ( itsol_converged(rr, bnorm, eps, comm = comm) ) then - if ( ioproc .and. verbose > 0 ) then - if ( tres0 < eps*bnorm ) then - write(unit=*, fmt='(" BiCGStab: Zero iterations: rnorm ",g15.8," < eps*bnorm ",g15.8)') tres0,eps*bnorm - end if - end if - go to 100 - end if - - rho_1 = ZERO - - do i = 1, max_iter - rho = dot(rt, rr, nodal_mask, comm = comm) - if ( i == 1 ) then - call copy(pp, rr) - else - if ( rho_1 == ZERO ) then - if ( present(stat) ) then - call bl_warn("BiCGStab_SOLVE: failure 1"); stat = 2; goto 100 - end if - call bl_error("BiCGStab: failure 1") - end if - if ( omega == ZERO ) then - if ( present(stat) ) then - call bl_warn("BiCGStab_SOLVE: failure 2"); stat = 3; goto 100 - end if - call bl_error("BiCGStab: failure 2") - end if - beta = (rho/rho_1)*(alpha/omega) - call saxpy(pp, -omega, vv) - call saxpy(pp, rr, beta, pp) - end if - call copy(ph,pp) - call stencil_apply(aa_local, vv, ph, mm, stencil_type, lcross, uniform_dh, bottom_solver=.true.) - cnt = cnt + 1 - den = dot(rt, vv, nodal_mask, comm = comm) - if ( den == ZERO ) then - if ( present(stat) ) then - call bl_warn("BICGSTAB_solve: breakdown in bicg, going with what I have"); stat = 30; goto 100 - endif - call bl_error("BiCGStab: failure 3") - end if - alpha = rho/den - call saxpy(uu, alpha, ph) - call saxpy(ss, rr, -alpha, vv) - if ( verbose > 1 ) then - rnorm = norm_inf(ss, comm = comm) - if ( ioproc ) then - write(unit=*, fmt='(" BiCGStab: Half Iter ",i4," rel. err. ",g15.8)') cnt/2, rnorm/bnorm - end if - end if - if ( itsol_converged(ss, bnorm, eps, rrnorm = rnorm, comm = comm) ) exit - call copy(ph,ss) - call stencil_apply(aa_local, tt, ph, mm, stencil_type, lcross, uniform_dh, bottom_solver=.true.) - cnt = cnt + 1 - ! - ! Elide a reduction here by calculating the two dot-products - ! locally and then reducing them both in a single call. - ! - tnorms(1) = dot(tt, tt, nodal_mask, local = .true.) - tnorms(2) = dot(tt, ss, nodal_mask, local = .true.) - - call parallel_reduce(rtnorms, tnorms, MPI_SUM, comm = comm) - - den = rtnorms(1) - omega = rtnorms(2) - - if ( den == ZERO ) then - if ( present(stat) ) then - call bl_warn("BICGSTAB_solve: breakdown in bicg, going with what I have"); stat = 31; goto 100 - endif - call bl_error("BiCGStab: failure 3") - end if - omega = omega/den - call saxpy(uu, omega, ph) - call saxpy(rr, ss, -omega, tt) - if ( verbose > 1 ) then - rnorm = norm_inf(rr, comm = comm) - if ( ioproc ) then - write(unit=*, fmt='(" BiCGStab: Iteration ",i4," rel. err. ",g15.8)') cnt/2, rnorm/bnorm - end if - end if - if ( itsol_converged(rr, bnorm, eps, rrnorm = rnorm, comm = comm) ) exit - rho_1 = rho - end do - - if ( ioproc .and. verbose > 0 ) then - write(unit=*, fmt='(" BiCGStab: Final: Iteration ", i3, " rel. err. ",g15.8)') cnt/2, rnorm/bnorm - if ( rnorm < eps*bnorm ) then - write(unit=*, fmt='(" BiCGStab: Converged: rnorm ",g15.8," < eps*bnorm ",g15.8)') rnorm,eps*bnorm - end if - end if - - if ( rnorm > bnorm ) then - call setval(uu,ZERO,all=.true.) - if ( present(stat) ) stat = 1 - if ( verbose > 0 .and. ioproc ) print *,' BiCGStab: solution reset to zero' - end if - - if ( i > max_iter ) then - if ( present(stat) ) then - stat = 1 - else - call bl_error("BiCGSolve: failed to converge"); - end if - end if - -100 continue - - call destroy(rh_local) - call destroy(aa_local) - call destroy(rr) - call destroy(rt) - call destroy(pp) - call destroy(ph) - call destroy(vv) - call destroy(tt) - call destroy(ss) - - call destroy(bpt) - - end subroutine itsol_BiCGStab_solve - ! - ! This is a slightly simplified version of the BLAS 2 routine. - ! - subroutine dgemv(alpha,a,x,beta,y,m,n) - - integer, intent(in ) :: m,n - real(dp_t), intent(in ) :: a(m,n),x(n),alpha,beta - real(dp_t), intent(inout) :: y(m) - ! - ! dgemv performs - ! - ! y := alpha*A*x + beta*y - ! - ! where alpha and beta are scalars, x and y are vectors and A is an m x n matrix. - ! - ! The vector and matrix arguments are not referenced when N = 0, or M = 0 - ! - ! -- Written on 22-October-1986. - ! Jack Dongarra, Argonne National Lab. - ! Jeremy Du Croz, Nag Central Office. - ! Sven Hammarling, Nag Central Office. - ! Richard Hanson, Sandia National Labs. - ! - integer :: i,j - real(dp_t) :: temp - ! - ! Quick return if possible. - ! - if ( (m.eq.0) .or. (n.eq.0) .or. ((alpha.eq.zero).and.(beta.eq.one)) ) return - ! - ! Start the operations. In this version the elements of A are - ! accessed sequentially with one pass through A. - ! - ! First form y := beta*y. - ! - if ( beta.ne.one ) then - if ( beta.eq.zero ) then - do i = 1,m - y(i) = zero - end do - else - do i = 1,m - y(i) = beta*y(i) - end do - end if - end if - if ( alpha.eq.zero ) return - ! - ! Now form y := alpha*a*x + y. - ! - do j = 1,n - if ( x(j).ne.zero ) then - temp = alpha*x(j) - do i = 1,m - y(i) = y(i) + temp*a(i,j) - end do - end if - end do - - end subroutine dgemv - - subroutine itsol_CABiCGStab_solve(aa, uu, rh, mm, eps, max_iter, verbose, stencil_type, lcross, & - stat, singular_in, uniform_dh, nodal_mask, comm_in) - use bl_prof_module - integer, intent(in ) :: max_iter - type(imultifab), intent(in ) :: mm - type(multifab), intent(inout) :: uu - type(multifab), intent(in ) :: rh - type(multifab), intent(in ) :: aa - integer , intent(in ) :: stencil_type, verbose - logical , intent(in ) :: lcross - real(kind=dp_t), intent(in ) :: eps - - integer, intent(out), optional :: stat - logical, intent(in ), optional :: singular_in - logical, intent(in ), optional :: uniform_dh - type(multifab), intent(in ), optional :: nodal_mask - integer, intent(in ), optional :: comm_in - - type(layout) :: la - type(multifab) :: rr, rt, pp, pr, ss, rh_local, aa_local, ph, tt - real(kind=dp_t) :: alpha, beta, omega, rho, bnorm - real(dp_t) :: rnorm0, delta, delta_next, L2_norm_of_rt - real(dp_t) :: nrms(2),rnrms(2), L2_norm_of_resid, L2_norm_of_r - integer :: i, m, niters, ng_for_res, nit, comm - logical :: nodal_solve, singular, nodal(get_dim(rh)) - logical :: BiCGStabFailed, BiCGStabConverged, ioproc - real(dp_t) :: g_dot_Tpaj, omega_numerator, omega_denominator, L2_norm_of_s - - real(dp_t), pointer :: pdst(:,:,:,:), psrc(:,:,:,:) - - type(bl_prof_timer), save :: bpt - - integer, parameter :: SSS = 4 - - real(dp_t) temp1(4*SSS+1) - real(dp_t) temp2(4*SSS+1) - real(dp_t) temp3(4*SSS+1) - real(dp_t) Tp(4*SSS+1, 4*SSS+1) - real(dp_t) Tpp(4*SSS+1, 4*SSS+1) - real(dp_t) aj(4*SSS+1) - real(dp_t) cj(4*SSS+1) - real(dp_t) ej(4*SSS+1) - real(dp_t) Tpaj(4*SSS+1) - real(dp_t) Tpcj(4*SSS+1) - real(dp_t) Tppaj(4*SSS+1) - real(dp_t) G(4*SSS+1, 4*SSS+1) - real(dp_t) gg(4*SSS+1) - - if ( present(stat) ) stat = 0 - - singular = .false. ; if ( present(singular_in) ) singular = singular_in - ng_for_res = 0 ; if ( nodal_q(rh) ) ng_for_res = 1 - nodal_solve = .false. ; if ( ng_for_res /= 0 ) nodal_solve = .true. - - comm = parallel_communicator() ; if ( present(comm_in) ) comm = comm_in - - if ( comm == parallel_null_communicator() ) return - - call build(bpt, "its_CABiCGStab_solve") - - la = get_layout(aa) - nodal = nodal_flags(rh) - ioproc = parallel_IOProcessor(comm = comm) - - aj = zero - cj = zero - ej = zero - Tpaj = zero - Tpcj = zero - Tppaj = zero - temp1 = zero - temp2 = zero - temp3 = zero - - call SetMonomialBasis() - - call multifab_build(rr, la, 1, ng_for_res, nodal) - call multifab_build(rt, la, 1, ng_for_res, nodal) - call multifab_build(pp, la, 1, ng_for_res, nodal) - call multifab_build(tt, la, 2, ng_for_res, nodal) - call multifab_build(ph, la, 2, nghost(uu), nodal) - ! - ! Contains the matrix powers of pp[] and rr[]. - ! - ! First 2*SSS+1 components are powers of pp[]. - ! Next 2*SSS components are powers of rr[]. - ! - call multifab_build(PR, la, 4*SSS+1, 0, nodal) - ! - ! Use these for local preconditioning. - ! - call multifab_build(rh_local, la, ncomp(rh), nghost(rh), nodal) - call multifab_build(aa_local, la, ncomp(aa), nghost(aa), nodal_flags(aa), stencil = .true.) - - call copy(rh_local, 1, rh, 1, nc = ncomp(rh), ng = nghost(rh)) - - call copy(ph, 1, uu, 1, 1, ng = nghost(ph)) - call copy(ph, 2, uu, 1, 1, ng = nghost(ph)) - ! - ! Copy aa -> aa_local; gotta do it by hand since it's a stencil multifab. - ! - do i = 1, nfabs(aa) - pdst => dataptr(aa_local, i) - psrc => dataptr(aa , i) - call cpy_d(pdst, psrc) - end do - ! - ! Make sure to do singular adjustment *before* diagonalization. - ! - if ( singular ) then - call multifab_build(ss, la, 1, ng_for_res, nodal) - call setval(ss,ONE) - nrms(1) = dot(rh_local, ss, nodal_mask, local = .true.) - nrms(2) = dot( ss, ss, nodal_mask, local = .true.) - call parallel_reduce(rnrms, nrms, MPI_SUM, comm = comm) - rho = rnrms(1) / rnrms(2) - if ( ioproc .and. verbose > 0 ) then - print *,' ...singular adjustment to rhs: ', rho - endif - call saxpy(rh_local,-rho,ss) - call destroy(ss) - end if - - call diag_initialize(aa_local,rh_local,mm) - - !if (contains_nan(ph)) then; print*, '*** Got NaNs @ 1'; stop; endif - - ! - ! Compute rt = aa_local * uu - rh_local. - ! - call compute_defect(aa_local, rt, rh_local, uu, mm, stencil_type, lcross, & - uniform_dh, bottom_solver=.true.) - - call copy(rr,rt); call copy(pp,rt) - ! - ! Elide some reductions by calculating local norms & then reducing all together. - ! - nrms(1) = norm_inf(rt, local = .true.) - nrms(2) = norm_inf(rh_local, local = .true.) - - call parallel_reduce(rnrms, nrms, MPI_MAX, comm = comm) - - rnorm0 = rnrms(1) - bnorm = rnrms(2) - - delta = dot(rt,rt,nodal_mask, comm = comm) - L2_norm_of_rt = sqrt(delta) - - if ( ioproc .and. verbose > 0 ) then - write(*,*) " CABiCGStab: A and rhs have been rescaled. So has the error." - write(unit=*, fmt='(" CABiCGStab: Initial error (error0) = ",g15.8)') rnorm0 - end if - - if ( itsol_converged(rr, bnorm, eps, comm = comm) .or. (delta.eq.zero) ) then - if ( ioproc .and. verbose > 0 ) then - if ( rnorm0 < eps*bnorm ) then - write(unit=*, fmt='(" CABiCGStab: Zero iterations: rnorm ",g15.8," < eps*bnorm ",g15.8)') rnorm0,eps*bnorm - else if ( delta .eq. zero ) then - write(unit=*, fmt='(" CABiCGStab: Zero iterations: delta == 0")') - end if - end if - go to 100 - end if - - L2_norm_of_resid = 0 - - BiCGStabFailed = .false. ; BiCGStabConverged = .false. - - niters = 0; m = 1 - - do while (m <= max_iter .and. (.not. BiCGStabFailed) .and. (.not. BiCGStabConverged)) - - !if (contains_nan(ph)) then; print*, '*** Got NaNs @ 2'; stop; endif - - ! - ! Compute the matrix powers on pp[] & rr[] (monomial basis). - ! The 2*SSS+1 powers of pp[] followed by the 2*SSS powers of rr[]. - ! - call copy(PR,1,pp,1,1,0) - call copy(ph,1,pp,1,1,0) - - call copy(PR,2*SSS+2,rr,1,1,0) - call copy(ph,2, rr,1,1,0) - - do i = 2, 2*SSS - ! - ! apply the stencil to pp & rr at the same time to cut down on comm time. - ! - call stencil_apply(aa_local, tt, ph, mm, stencil_type, lcross, uniform_dh, bottom_solver=.true.) - - !if (contains_nan(ph)) then; print*, '*** Got NaNs @ 3'; stop; endif - - call copy(PR,i,tt,1,1,0) - call copy(ph,1,tt,1,1,0) - - call copy(PR,2*SSS+1+i,tt,2,1,0) - call copy(ph,2, tt,2,1,0) - end do - ! - ! And the final power of pp[]. - ! - call stencil_apply(aa_local, tt, ph, mm, stencil_type, lcross, uniform_dh, bottom_solver=.true.) - - call copy(PR,2*SSS+1,tt,1,1,0) - - !if (contains_nan(ph)) then; print*, '*** Got NaNs @ 4'; stop; endif - - call BuildGramMatrix() - - aj = 0; aj(1) = 1 - cj = 0; cj(2*SSS+2) = 1 - ej = 0 - - do nit = 1, SSS - call dgemv(one, Tp, aj, zero, Tpaj, 4*SSS+1, 4*SSS+1) - call dgemv(one, Tp, cj, zero, Tpcj, 4*SSS+1, 4*SSS+1) - call dgemv(one, Tpp, aj, zero, Tppaj, 4*SSS+1, 4*SSS+1) - - g_dot_Tpaj = dot_product(gg,Tpaj) - - if ( g_dot_Tpaj == zero ) then - if ( ioproc .and. verbose > 0 ) & - print*, "CGSolver_CABiCGStab: g_dot_Tpaj == 0, nit = ", nit - BiCGStabFailed = .true. ; exit - end if - - alpha = delta / g_dot_Tpaj - - if ( is_an_inf(alpha) ) then - if ( verbose > 1 .and. ioproc ) & - print*, "CGSolver_CABiCGStab: alpha == inf, nit = ", nit - BiCGStabFailed = .true. ; exit - end if - - temp1 = Tpcj - alpha * Tppaj - call dgemv(one, G, temp1, zero, temp2, 4*SSS+1, 4*SSS+1) - temp3 = cj - alpha * Tpaj - - omega_numerator = dot_product(temp3, temp2) - omega_denominator = dot_product(temp1, temp2) - ! - ! NOTE: omega_numerator/omega_denominator can be 0/x or 0/0, but should never be x/0. - ! - ! If omega_numerator==0, and ||s||==0, then convergence, x=x+alpha*aj. - ! If omega_numerator==0, and ||s||!=0, then stabilization breakdown. - ! - ! Partial update of ej must happen before the check on omega to ensure forward progress !!! - ! - ej = ej + alpha * aj - ! - ! ej has been updated so consider that we've done an iteration since - ! even if we break out of the loop we'll be able to update "uu". - ! - niters = niters + 1 - ! - ! Calculate the norm of Saad's vector 's' to check intra s-step convergence. - ! - temp1 = cj - alpha * Tpaj - - call dgemv(one, G, temp1, zero, temp2, 4*SSS+1, 4*SSS+1) - - L2_norm_of_s = dot_product(temp1,temp2) - - L2_norm_of_resid = zero; if ( L2_norm_of_s > 0 ) L2_norm_of_resid = sqrt(L2_norm_of_s) - - if ( L2_norm_of_resid < eps*L2_norm_of_rt ) then - if ( verbose > 1 .and. (L2_norm_of_resid .eq. zero) .and. ioproc ) & - print*, "CGSolver_CABiCGStab: L2 norm of s: ", L2_norm_of_s - BiCGStabConverged = .true. ; exit - end if - - if ( omega_denominator .eq. zero ) then - if ( verbose > 1 .and. ioproc ) & - print*, "CGSolver_CABiCGStab: omega_denominator == 0, nit = ", nit - BiCGStabFailed = .true. ; exit - end if - - omega = omega_numerator / omega_denominator - - if ( verbose > 1 .and. ioproc ) then - if ( omega .eq. zero ) print*, "CGSolver_CABiCGStab: omega == 0, nit = ", nit - if ( is_an_inf(omega) ) print*, "CGSolver_CABiCGStab: omega == inf, nit = ", nit - end if - - if ( omega .eq. zero ) then - BiCGStabFailed = .true. ; exit - end if - if ( is_an_inf(omega) ) then - BiCGStabFailed = .true. ; exit - end if - ! - ! Complete the update of ej & cj now that omega is known to be ok. - ! - ej = ej + omega * cj - ej = ej - (omega * alpha) * Tpaj - cj = cj - omega * Tpcj - cj = cj - alpha * Tpaj - cj = cj + (omega * alpha) * Tppaj - ! - ! Do an early check of the residual to determine convergence. - ! - call dgemv(one, G, cj, zero, temp1, 4*SSS+1, 4*SSS+1) - ! - ! sqrt( (cj,Gcj) ) == L2 norm of the intermediate residual in exact arithmetic. - ! However, finite precision can lead to the norm^2 being < 0 (Jim Demmel). - ! If cj_dot_Gcj < 0 we flush to zero and consider ourselves converged. - ! - L2_norm_of_r = dot_product(cj,temp1) - - L2_norm_of_resid = zero; if ( L2_norm_of_r > 0 ) L2_norm_of_resid = sqrt(L2_norm_of_r) - - if ( L2_norm_of_resid < eps*L2_norm_of_rt ) then - if ( verbose > 1 .and. (L2_norm_of_resid .eq. zero) .and. ioproc ) & - print*, "CGSolver_CABiCGStab: L2_norm_of_r: ", L2_norm_of_r - BiCGStabConverged = .true. ; exit - end if - - delta_next = dot_product(gg,cj) - - if ( verbose > 1 .and. ioproc ) then - if ( delta_next .eq. zero ) print*, "CGSolver_CABiCGStab: delta == 0, nit = ", nit - if ( is_an_inf(delta_next) ) print*, "CGSolver_CABiCGStab: delta == inf, nit = ", nit - end if - if ( delta_next .eq. zero ) then - BiCGStabFailed = .true. ; exit - end if - if ( is_an_inf(delta_next) ) then - BiCGStabFailed = .true. ; exit - end if - - beta = (delta_next/delta)*(alpha/omega) - - if ( verbose > 1 .and. ioproc ) then - if ( beta .eq. zero ) print*, "CGSolver_CABiCGStab: beta == 0, nit = ", nit - if ( is_an_inf(beta) ) print*, "CGSolver_CABiCGStab: beta == inf, nit = ", nit - end if - if ( beta .eq. zero ) then - BiCGStabFailed = .true. ; exit - end if - if ( is_an_inf(beta) ) then - BiCGStabFailed = .true. ; exit - end if - - aj = cj + beta * aj - aj = aj - (omega * beta) * Tpaj - - delta = delta_next - end do - ! - ! Update iterates. - ! - do i = 1,4*SSS+1 - call saxpy(uu,1,ej(i),PR,i,1) - end do - - call copy(pp,1,PR,1,1) - call mult_mult(pp,aj(1)) - - do i = 2,4*SSS+1 - call saxpy(pp,1,aj(i),PR,i,1) - end do - - call copy(rr,1,PR,1,1) - call mult_mult(rr,cj(1)) - - do i = 2,4*SSS+1 - call saxpy(rr,1,cj(i),PR,i,1) - end do - - if ( (.not. BiCGStabFailed) .and. (.not. BiCGStabConverged) ) m = m + SSS - end do - - if ( ioproc .and. verbose > 0 ) then - write(unit=*, fmt='(" CABiCGStab: Final: Iteration ", i3, " rel. err. ",g15.8)') niters, L2_norm_of_resid - if ( BiCGStabConverged ) then - write(unit=*, fmt='(" CABiCGStab: Converged: rnorm ",g15.8," < eps*bnorm ",g15.8)') & - L2_norm_of_resid,eps*L2_norm_of_rt - end if - end if - - if ( L2_norm_of_resid > L2_norm_of_rt ) then - call setval(uu,ZERO,all=.true.) - if ( present(stat) ) stat = 1 - if ( ioproc .and. verbose > 0 ) then - print *,' CABiCGStab: solution reset to zero' - end if - end if - - if ( m > max_iter .or. BiCGStabFailed ) then - if ( present(stat) ) then - stat = 1 - else - call bl_error("CABiCGSolve: failed to converge"); - end if - end if - -100 continue - - call destroy(rh_local) - call destroy(aa_local) - call destroy(rr) - call destroy(rt) - call destroy(pp) - call destroy(tt) - call destroy(ph) - call destroy(pr) - - call destroy(bpt) - - contains - - subroutine SetMonomialBasis () - - Tp = zero - - do i = 1,2*SSS - Tp(i+1,i) = one - end do - do i = 2*SSS+2, 4*SSS - Tp(i+1,i) = one - end do - - Tpp = zero - - do i = 1,2*SSS-1 - Tpp(i+2,i) = one - end do - do i = 2*SSS+2, 4*SSS-1 - Tpp(i+2,i) = one - end do - - end subroutine SetMonomialBasis - - subroutine BuildGramMatrix () - - integer, parameter :: Nrows = 4*SSS+1, Ncols = 4*SSS+2 - - integer :: mm, nn, cnt - real(dp_t) :: Gram(Nrows,Ncols) - real(dp_t) :: tmp((Ncols*(Ncols+1))/2-1), rtmp((Ncols*(Ncols+1))/2-1) - - !$OMP PARALLEL DO PRIVATE(mm,nn) SCHEDULE(static,1) - do mm = 1, Nrows - do nn = mm, Nrows - Gram(mm,nn) = dot(PR, mm, PR, nn, nodal_mask = nodal_mask, local = .true.) - end do - Gram(mm,Ncols) = dot(PR, mm, rt, 1, nodal_mask = nodal_mask, local = .true.) - end do - !$OMP END PARALLEL DO - ! - ! Put upper triangle into "tmp". - ! - cnt = 1 - do mm = 1, Nrows - do nn = mm, Nrows - tmp(cnt) = Gram(mm,nn) - cnt = cnt + 1 - end do - tmp(cnt) = Gram(mm,Ncols) - cnt = cnt + 1 - end do - ! - ! Reduce upper triangle into "rtmp" - ! - call parallel_reduce(rtmp, tmp, MPI_SUM, comm = comm) - ! - ! Fill in upper triangle with "rtmp". - ! - cnt = 1 - do mm = 1, Nrows - do nn = mm, Nrows - Gram(mm,nn) = rtmp(cnt) - cnt = cnt + 1 - end do - Gram(mm,Ncols) = rtmp(cnt) - cnt = cnt + 1 - end do - ! - ! Then fill in strict lower triangle using symmetry. - ! - do mm = 1, Nrows - do nn = 1, mm-1 - Gram(mm,nn) = Gram(nn,mm) - end do - end do - ! - ! Form G[][] and g[] from Gram[][]. - ! - G(1:Nrows,1:Nrows) = Gram(1:Nrows,1:Nrows) - ! - ! Last column goes to g[]. - ! - gg = Gram(:,Ncols) - - end subroutine BuildGramMatrix - - end subroutine itsol_CABiCGStab_solve - - subroutine itsol_CG_Solve(aa, uu, rh, mm, eps, max_iter, verbose, stencil_type, lcross, & - stat, singular_in, uniform_dh, nodal_mask) - use bl_prof_module - integer , intent(in ) :: max_iter, verbose, stencil_type - logical , intent(in ) :: lcross - real(dp_t) , intent(in ) :: eps - - integer, intent( out), optional :: stat - logical, intent(in ), optional :: singular_in - logical, intent(in ), optional :: uniform_dh - type(multifab), intent(in), optional :: nodal_mask - - type( multifab), intent(in) :: aa - type( multifab), intent(inout) :: uu - type( multifab), intent(in) :: rh - type(imultifab), intent(in) :: mm - - type(multifab) :: rr, zz, pp, qq - type(multifab) :: aa_local, rh_local - real(kind = dp_t) :: rho_1, alpha, beta, bnorm, rho, rnorm, den, tres0 - type(layout) :: la - integer :: i, ng_for_res - logical :: nodal_solve, nodal(get_dim(rh)) - logical :: singular - integer :: cnt - real(dp_t), pointer :: pdst(:,:,:,:), psrc(:,:,:,:) - real(dp_t) :: nrms(2), rnrms(2) - - type(bl_prof_timer), save :: bpt - - call build(bpt, "its_CG_Solve") - - if ( present(stat) ) stat = 0 - - singular = .false. ; if ( present(singular_in) ) singular = singular_in - ng_for_res = 0 ; if ( nodal_q(rh) ) ng_for_res = 1 - nodal_solve = .false. ; if ( ng_for_res /= 0 ) nodal_solve = .true. - - nodal = nodal_flags(rh) - - la = get_layout(aa) - call multifab_build(rr, la, 1, ng_for_res, nodal) - call multifab_build(zz, la, 1, ng_for_res, nodal) - call multifab_build(pp, la, 1, nghost(uu), nodal) - call multifab_build(qq, la, 1, ng_for_res, nodal) - - if ( nodal_solve ) then - call setval(rr,ZERO,all=.true.) - call setval(zz,ZERO,all=.true.) - call setval(qq,ZERO,all=.true.) - end if - call setval(pp, ZERO, all=.true.) - - ! Use these for local preconditioning - call multifab_build(rh_local, la, ncomp(rh), nghost(rh), nodal) - - call multifab_build(aa_local, la, ncomp(aa), nghost(aa), nodal_flags(aa), stencil = .true.) - - call copy(rh_local, 1, rh, 1, nc = ncomp(rh), ng = nghost(rh)) - ! - ! Copy aa -> aa_local; gotta do it by hand since it's a stencil multifab. - ! - do i = 1, nfabs(aa) - pdst => dataptr(aa_local, i) - psrc => dataptr(aa , i) - call cpy_d(pdst, psrc) - end do - - call diag_initialize(aa_local,rh_local,mm) - - cnt = 0 - ! - ! Compute rr = aa_local * uu - rh_local - ! - call compute_defect(aa_local, rr, rh_local, uu, mm, stencil_type, lcross, & - uniform_dh, bottom_solver=.true.) - cnt = cnt + 1 - - if ( singular .and. nodal_solve ) then - call setval(zz,ONE) - rho = dot(rr, zz, nodal_mask) / dot(zz,zz) - call saxpy(rr,-rho,zz) - call setval(zz,ZERO,all=.true.) - end if - ! - ! Elide some reductions by calculating local norms & then reducing all together. - ! - nrms(1) = norm_inf(rr, local=.true.) - nrms(2) = norm_inf(rh_local, local=.true.) - - call parallel_reduce(rnrms, nrms, MPI_MAX) - - tres0 = rnrms(1) - bnorm = rnrms(2) - - if ( parallel_IOProcessor() .and. verbose > 0) then - write(unit=*, fmt='(" CG: Initial error (error0) = ",g15.8)') tres0 - end if - - i = 0 - if ( itsol_converged(rr, bnorm, eps) ) then - if (parallel_IOProcessor() .and. verbose > 0) then - if (tres0 < eps*bnorm) then - write(unit=*, fmt='(" CG: Zero iterations: rnorm ",g15.8," < eps*bnorm ",g15.8)') tres0,eps*bnorm - end if - end if - go to 100 - end if - - rho_1 = ZERO - - do i = 1, max_iter - call copy(zz,rr) - rho = dot(rr, zz, nodal_mask) - if ( i == 1 ) then - call copy(pp, zz) - call itsol_precon(aa_local, zz, rr, mm) - else - if ( rho_1 == ZERO ) then - if ( present(stat) ) then - call bl_warn("CG_solve: failure 1"); stat = 1; goto 100 - end if - call bl_error("CG_solve: failure 1") - end if - beta = rho/rho_1 - call saxpy(pp, zz, beta, pp) - end if - call stencil_apply(aa_local, qq, pp, mm, stencil_type, lcross, uniform_dh, bottom_solver=.true.) - cnt = cnt + 1 - den = dot(pp, qq, nodal_mask) - if ( den == ZERO ) then - if ( present(stat) ) then - call bl_warn("CG_solve: breakdown in solver, going with what I have"); stat = 30; goto 100 - end if - call bl_error("CG_solve: failure 1") - end if - alpha = rho/den - call saxpy(uu, alpha, pp) - call saxpy(rr, -alpha, qq) - if ( verbose > 1 ) then - rnorm = norm_inf(rr) - if ( parallel_IOProcessor() ) then - write(unit=*, fmt='(" CG: Iteration ",i4," rel. err. ",g15.8)') i,rnorm/bnorm - end if - end if - if ( itsol_converged(rr, bnorm, eps, rrnorm = rnorm) ) exit - rho_1 = rho - end do - - if ( parallel_IOProcessor() .and. verbose > 0 ) then - write(unit=*, fmt='(" CG: Final: Iteration ", i3, " rel. err. ",g15.8)') i, rnorm/bnorm - if ( rnorm < eps*bnorm ) then - write(unit=*, fmt='(" CG: Converged: rnorm ",g15.8," < eps*bnorm ",g15.8)') rnorm,eps*bnorm - end if - end if - - if ( i > max_iter ) then - if ( present(stat) ) then - stat = 1 - else - call bl_error("CG_solve: failed to converge"); - end if - end if - -100 continue - - call destroy(rr) - call destroy(zz) - call destroy(pp) - call destroy(qq) - - call destroy(bpt) - - call destroy(aa_local) - call destroy(rh_local) - - end subroutine itsol_CG_Solve - - subroutine itsol_precon(aa, uu, rh, mm, method) - use bl_prof_module - type(multifab), intent(in) :: aa - type(multifab), intent(inout) :: uu - type(multifab), intent(in) :: rh - type(imultifab), intent(in) :: mm - real(kind=dp_t), pointer, dimension(:,:,:,:) :: ap, up, rp - integer, pointer, dimension(:,:,:,:) :: mp - integer :: i, n, dm - integer, intent(in), optional :: method - integer :: lm - type(bl_prof_timer), save :: bpt - - call build(bpt, "its_precon") - - lm = 1; if ( present(method) ) lm = method - - dm = get_dim(uu) - - select case (lm) - case (0) - call copy(uu, rh) - case (1) - !$OMP PARALLEL DO PRIVATE(i,n,rp,up,ap,mp) - do i = 1, nfabs(rh) - rp => dataptr(rh, i) - up => dataptr(uu, i) - ap => dataptr(aa, i) - mp => dataptr(mm, i) - do n = 1, ncomp(uu) - select case(dm) - case (1) - if ( cell_centered_q(rh) ) then - call jacobi_precon_1d(ap(:,:,1,1), up(:,1,1,n), rp(:,1,1,n), nghost(uu)) - else - call nodal_precon_1d(ap(:,:,1,1), up(:,1,1,n), rp(:,1,1,n), & - mp(:,1,1,1),nghost(uu)) - end if - case (2) - if ( cell_centered_q(rh) ) then - call jacobi_precon_2d(ap(:,:,:,1), up(:,:,1,n), rp(:,:,1,n), nghost(uu)) - else - call nodal_precon_2d(ap(:,:,:,1), up(:,:,1,n), rp(:,:,1,n), & - mp(:,:,1,1),nghost(uu)) - end if - case (3) - if ( cell_centered_q(rh) ) then - call jacobi_precon_3d(ap(:,:,:,:), up(:,:,:,n), rp(:,:,:,n), nghost(uu)) - else - call nodal_precon_3d(ap(:,:,:,:), up(:,:,:,n), rp(:,:,:,n), & - mp(:,:,:,1),nghost(uu)) - end if - end select - end do - end do - !$OMP END PARALLEL DO - end select - - call destroy(bpt) - - end subroutine itsol_precon - - subroutine diag_initialize(aa, rh, mm) - use bl_prof_module - type( multifab), intent(in) :: aa - type( multifab), intent(in) :: rh - type(imultifab), intent(in) :: mm - - real(kind=dp_t), pointer, dimension(:,:,:,:) :: ap, rp - integer , pointer, dimension(:,:,:,:) :: mp - integer :: i,dm - integer :: ng_a, ng_r, ng_m - integer :: lo(get_dim(rh)),hi(get_dim(rh)) - type(bl_prof_timer), save :: bpt - - call build(bpt, "diag_initialize") - - ng_a = nghost(aa) - ng_r = nghost(rh) - ng_m = nghost(mm) - - dm = get_dim(rh) - - !$OMP PARALLEL DO PRIVATE(i,rp,ap,mp,lo,hi) - do i = 1, nfabs(rh) - rp => dataptr(rh, i) - ap => dataptr(aa, i) - mp => dataptr(mm, i) - lo = lwb(get_box(rh,i)) - hi = upb(get_box(rh,i)) - select case(dm) - case (1) - if ( cell_centered_q(rh) ) then - call diag_init_cc_1d(ap(:,:,1,1), ng_a, rp(:,1,1,1), ng_r, lo, hi) - else - call diag_init_nd_1d(ap(:,:,1,1), ng_a, rp(:,1,1,1), ng_r, mp(:,1,1,1), ng_m, lo, hi) - end if - case (2) - if ( cell_centered_q(rh) ) then - call diag_init_cc_2d(ap(:,:,:,1), ng_a, rp(:,:,1,1), ng_r, lo, hi) - else - call diag_init_nd_2d(ap(:,:,:,1), ng_a, rp(:,:,1,1), ng_r, mp(:,:,1,1), ng_m, lo, hi) - end if - case (3) - if ( cell_centered_q(rh) ) then - call diag_init_cc_3d(ap(:,:,:,:), ng_a, rp(:,:,:,1), ng_r, lo, hi) - else - call diag_init_nd_3d(ap(:,:,:,:), ng_a, rp(:,:,:,1), ng_r, mp(:,:,:,1), ng_m, lo, hi) - end if - end select - end do - !$OMP END PARALLEL DO - - call destroy(bpt) - - end subroutine diag_initialize - -end module itsol_module - diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/main.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/main.f90 deleted file mode 100644 index 96f204ba3..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/main.f90 +++ /dev/null @@ -1,29 +0,0 @@ -program main - use BoxLib - use bl_prof_module - use layout_module - use multifab_module - - implicit none - - call boxlib_initialize() - call bl_prof_initialize(on = .true.) - - call layout_set_copyassoc_max(25) - - call wrapper() - call layout_flush_copyassoc_cache () - -! call print(multifab_mem_stats(), " multifab at end") -! call print(imultifab_mem_stats(), "imultifab at end") -! call print(fab_mem_stats(), " fab at end") -! call print(ifab_mem_stats(), " ifab at end") -! call print(boxarray_mem_stats(), " boxarray at end") -! call print(boxassoc_mem_stats(), " boxassoc at end") -! call print(layout_mem_stats(), " layout at end") - - call bl_prof_glean("bl_prof_res") - call bl_prof_finalize() - call boxlib_finalize() - -end program main diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/makefile b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/makefile deleted file mode 100644 index 1b1ce523a..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/makefile +++ /dev/null @@ -1,38 +0,0 @@ -TOP = ..\.. - -!INCLUDE $(TOP)\mk\NMakedefs.mak - -boxlib_dir=$(TOP)\boxlib -!INCLUDE $(boxlib_dir)\NPackage.mak -mg_dir=$(TOP)\mg -!INCLUDE $(mg_dir)\NPackage.mak -sparskit_dir=$(TOP)\extern\SPARSKIT -!INCLUDE $(sparskit_dir)\NPackage.mak -lapack_dir=$(TOP)\extern\LAPACK -!INCLUDE $(lapack_dir)\NPackage.mak - -f90sources = $(f90sources) main.f90 -f90objects = $(f90objects) main.obj - -f90sources = $(f90sources) wrapper.f90 -f90objects = $(f90objects) wrapper.obj - -f90sources = $(f90sources) cc_multi.f90 -f90objects = $(f90objects) cc_multi.obj - -f90sources = $(f90sources) cc_single.f90 -f90objects = $(f90objects) cc_single.obj - -f90sources = $(f90sources) nodal_single.f90 -f90objects = $(f90objects) nodal_single.obj - -f90sources = $(f90sources) t_smoother.f90 -f90objects = $(f90objects) t_smoother.obj - -f90sources = $(f90sources) nodal_multi.f90 -f90objects = $(f90objects) nodal_multi.obj - -main.exe: $(objects) - $(FOR) $(FFLAGS) $(LDFLAGS) /out:main.exe $(objects) - -!INCLUDE $(TOP)\mk\NMakerules.mak diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/mg.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/mg.f90 deleted file mode 100644 index c4b65d49d..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/mg.f90 +++ /dev/null @@ -1,1814 +0,0 @@ -module mg_module - - use multifab_module - use cc_stencil_module - use mg_tower_module - use stencil_defect_module - use cc_mg_tower_smoother_module - use nodal_mg_tower_smoother_module - - implicit none - - interface destroy - module procedure mg_tower_destroy - end interface - - private :: get_bottom_box_size, impose_physbc_cc_2d, impose_physbc_cc_3d - -contains - - recursive subroutine mg_tower_build(mgt, la, pd, domain_bc, stencil_type_in, & - nu1, nu2, nuf, nub, cycle_type, & - smoother, & - dh, & - ns, & - nc, ng, & - max_nlevel, max_bottom_nlevel, min_width, & - max_iter, abort_on_max_iter, eps, abs_eps, & - bottom_solver, bottom_max_iter, bottom_solver_eps, & - max_L0_growth, & - verbose, cg_verbose, nodal, use_hypre, is_singular, & - the_bottom_comm, fancy_bottom_type_in, use_lininterp, ptype) - use bl_IO_module - use bl_prof_module - - type(mg_tower), intent(inout) :: mgt - type(layout), intent(in ) :: la - type(box), intent(in) :: pd - integer, intent(in) :: domain_bc(:,:) - integer, intent(in) :: stencil_type_in - - integer, intent(in), optional :: ns - integer, intent(in), optional :: nc - integer, intent(in), optional :: ng - integer, intent(in), optional :: nu1, nu2, nuf, nub, cycle_type - integer, intent(in), optional :: smoother - logical, intent(in), optional :: nodal(:) - real(kind=dp_t), intent(in), optional :: dh(:) - real(kind=dp_t), intent(in), optional :: eps - real(kind=dp_t), intent(in), optional :: abs_eps - real(kind=dp_t), intent(in), optional :: bottom_solver_eps - real(kind=dp_t), intent(in), optional :: max_L0_growth - - integer, intent(in), optional :: max_nlevel - integer, intent(in), optional :: max_bottom_nlevel - integer, intent(in), optional :: min_width - integer, intent(in), optional :: max_iter - logical, intent(in), optional :: abort_on_max_iter - integer, intent(in), optional :: bottom_solver - integer, intent(in), optional :: bottom_max_iter - integer, intent(in), optional :: verbose - integer, intent(in), optional :: cg_verbose - integer, intent(in), optional :: use_hypre - logical, intent(in), optional :: is_singular - integer, intent(in), optional :: the_bottom_comm - integer, intent(in), optional :: fancy_bottom_type_in - logical, intent(in), optional :: use_lininterp - integer, intent(in), optional :: ptype - - integer :: n, i, id, vol, j, lo_grid, hi_grid, lo_dom, hi_dom, ng_for_res - integer :: fancy_bottom_type - type(layout) :: la1, la2 - type(box) :: bounding_box - type(boxarray) :: ba - logical :: nodal_flag - real(kind=dp_t) :: dvol, dvol_pd - type(bl_prof_timer), save :: bpt - - ! These are added to help build the bottom_mgt - type( layout) :: old_coarse_la, new_coarse_la - type( box) :: coarse_pd,bxs - type(boxarray) :: new_coarse_ba - integer :: bottom_box_size, success, communicator - real(kind=dp_t) :: coarse_dx(pd%dim) - real(dp_t), pointer :: p(:,:,:,:) - - call build(bpt, "mgt_build") - - ! Need to set this here because so many things below depend on it. - mgt%dim = get_dim(la) - - ! Paste in optional arguments - if ( present(ng) ) mgt%ng = ng - if ( present(nc) ) mgt%nc = nc - if ( present(max_nlevel) ) mgt%max_nlevel = max_nlevel - if ( present(max_bottom_nlevel) ) mgt%max_bottom_nlevel = max_bottom_nlevel - if ( present(max_iter) ) mgt%max_iter = max_iter - if ( present(abort_on_max_iter) ) mgt%abort_on_max_iter = abort_on_max_iter - if ( present(eps) ) mgt%eps = eps - if ( present(abs_eps) ) mgt%abs_eps = abs_eps - if ( present(smoother) ) mgt%smoother = smoother - if ( present(nu1) ) mgt%nu1 = nu1 - if ( present(nu2) ) mgt%nu2 = nu2 - if ( present(nuf) ) mgt%nuf = nuf - if ( present(nub) ) mgt%nub = nub - if ( present(cycle_type) ) mgt%cycle_type = cycle_type - if ( present(bottom_solver) ) mgt%bottom_solver = bottom_solver - if ( present(bottom_solver_eps) ) mgt%bottom_solver_eps = bottom_solver_eps - if ( present(bottom_max_iter) ) mgt%bottom_max_iter = bottom_max_iter - if ( present(min_width) ) mgt%min_width = min_width - if ( present(verbose) ) mgt%verbose = verbose - if ( present(cg_verbose) ) mgt%cg_verbose = cg_verbose - if ( present(use_hypre) ) mgt%use_hypre = use_hypre - if ( present(max_L0_growth) ) mgt%max_L0_growth = max_L0_growth - if ( present(use_lininterp) ) mgt%use_lininterp = use_lininterp - if ( present(ptype) ) mgt%ptype = ptype - - if ( present(the_bottom_comm) ) then - allocate(mgt%bottom_comm) - mgt%bottom_comm = the_bottom_comm - end if - - nodal_flag = .false. - if ( present(nodal) ) then - if ( all(nodal) ) then - nodal_flag = .true. - else if ( any(nodal) ) then - call bl_error("mixed nodal/not nodal forbidden") - end if - end if - - mgt%stencil_type = stencil_type_in - - ! "lcross" is used in the call to multifab_fill_boundary -- when true it means - ! that the corner cells do *not* need to be filled - if (mgt%stencil_type .eq. CC_CROSS_STENCIL .or. & - mgt%stencil_type .eq. HO_CROSS_STENCIL .or. & - mgt%stencil_type .eq. ND_CROSS_STENCIL) then - - mgt%lcross = .true. - - else if (mgt%stencil_type .eq. ND_DENSE_STENCIL .or. & - mgt%stencil_type .eq. HO_DENSE_STENCIL) then - - mgt%lcross = .false. - - else - - print *,'The stencil_type must be specified ' - print *, mgt%stencil_type,' is not a valid option' - call bl_error("") - - end if - - if ( present(ns) ) then - mgt%ns = ns - else - if ( nodal_flag ) then - mgt%ns = 3**mgt%dim - else - mgt%ns = 1 + 3*mgt%dim - end if - end if - - ng_for_res = 0; if ( nodal_flag ) ng_for_res = 1 - - n = max_mg_levels(get_boxarray(la), nodal_flag, mgt%min_width) - - mgt%nlevels = min(n,mgt%max_nlevel) - - n = mgt%nlevels - - allocate(mgt%cc(n), mgt%ff(n), mgt%dd(n), mgt%uu(n-1), mgt%ss(n), mgt%mm(n)) - allocate(mgt%pd(n),mgt%dh(mgt%dim,n)) - - la1 = la - - do i = n, 1, -1 - call multifab_build(mgt%cc(i), la1, mgt%nc, ng_for_res, nodal) - call multifab_build(mgt%ff(i), la1, mgt%nc, ng_for_res, nodal) - call multifab_build(mgt%dd(i), la1, mgt%nc, ng_for_res, nodal) - call multifab_build(mgt%ss(i), la1, mgt%ns, 0, nodal, stencil = .true.) - - call setval(mgt%cc(i), zero, all = .TRUE.) - call setval(mgt%ff(i), zero, all = .TRUE.) - call setval(mgt%dd(i), zero, all = .TRUE.) - ! - ! Set the stencil to zero; gotta do it by hand as multifab routines won't work. - ! - do j = 1, nfabs(mgt%ss(i)) - p => dataptr(mgt%ss(i), j) - p = zero - end do - - call imultifab_build(mgt%mm(i), la1, 1, 0, nodal) - if ( i /= n ) & - call multifab_build(mgt%uu(i), la1, mgt%nc, mgt%ng, nodal) - - mgt%pd(i) = coarsen(pd, 2**(n-i)) - if ( i > 1 ) call layout_build_coarse(la2, la1, (/(2,i=1,mgt%dim)/)) - la1 = la2 - end do - - mgt%uniform_dh = .true. - ! These are real not integer so we have to be careful how we test on equality - if ( present(dh) ) then - mgt%dh(:,mgt%nlevels) = dh(:) - select case ( mgt%dim ) - case (2) - if (dh(1) > (1.d0-1.d-8) * dh(2) .and. & - dh(1) < (1.d0+1.d-8) * dh(2)) then - mgt%uniform_dh = .true. - else - mgt%uniform_dh = .false. - end if - case (3) - mgt%uniform_dh = ((dh(1) == dh(2)) .and. (dh(1) == dh(3))) - if (dh(1) > (1.d0-1.d-8) * dh(2) .and. & - dh(1) < (1.d0+1.d-8) * dh(2) .and. & - dh(1) > (1.d0-1.d-8) * dh(3) .and. & - dh(1) < (1.d0+1.d-8) * dh(3) ) then - mgt%uniform_dh = .true. - else - mgt%uniform_dh = .false. - end if - end select - else - mgt%dh(:,mgt%nlevels) = 1.0_dp_t - end if - - if ( (.not. mgt%uniform_dh) .and. nodal_flag ) & - call bl_error("nodal solver does not support nonuniform dh") - - do i = mgt%nlevels-1, 1, -1 - mgt%dh(:,i) = mgt%dh(:,i+1)*2.0_dp_t - end do - - if ( .not. nodal_flag ) then - allocate(mgt%skewed(mgt%nlevels,nfabs(mgt%cc(n)))) - allocate(mgt%skewed_not_set(mgt%nlevels)) - mgt%skewed_not_set = .true. - end if - ! - ! Save copy of domain BCs. - ! - allocate(mgt%domain_bc(mgt%dim,1:2)) - - mgt%domain_bc = domain_bc(:,1:2) - - if ( nodal_flag ) then - ! - ! Set the face_type array to be BC_DIR or BC_NEU depending on domain_bc - ! - allocate(mgt%face_type(nfabs(mgt%cc(n)),mgt%dim,2)) - mgt%face_type = BC_INT - do id = 1,mgt%dim - lo_dom = lwb(pd,id) - hi_dom = upb(pd,id) - do i = 1,nfabs(mgt%ss(mgt%nlevels)) - lo_grid = lwb(get_box(mgt%ss(mgt%nlevels), i),id) - if (lo_grid == lo_dom) mgt%face_type(i,id,1) = domain_bc(id,1) - - hi_grid = upb(get_box(mgt%ss(mgt%nlevels), i),id) - if (hi_grid == hi_dom) mgt%face_type(i,id,2) = domain_bc(id,2) - end do - end do - end if - ! - ! Do we cover the entire domain? - ! Note that the volume is number of cells so it increments in units of 1, not dx*dy - ! Need these to be real, not int, so we can handle large numbers. - ! - ba = get_boxarray(get_layout(mgt%cc(mgt%nlevels))) - dvol = boxarray_dvolume(ba) - dvol_pd = box_dvolume(pd) - ! - ! Set both of these to false as default -- both must be true in order to subtract off sum(res) - ! - mgt%bottom_singular = .false. - mgt%coeffs_sum_to_zero = .false. - - if ( present(is_singular) ) then - mgt%bottom_singular = is_singular - else - ! If we cover the entire domain, then just test on the domain_bc values - if ( abs(dvol-dvol_pd).lt.1.d-2 ) then - mgt%bottom_singular = .true. - do id = 1,mgt%dim - if ( domain_bc(id,1) .eq. BC_DIR .or. domain_bc(id,2) .eq. BC_DIR ) & - mgt%bottom_singular = .false. - end do - else - ! If we don't cover the entire domain, then this wont be singular - mgt%bottom_singular = .false. - end if - end if - - ! if ( mgt%bottom_solver == 0 .and. .not. present(bottom_max_iter) ) mgt%bottom_max_iter = 20 - - ! if only the bottom solver is 'solving' make sure that its eps is - ! in effect - if ( mgt%nlevels == 1 ) then - ba = get_boxarray(get_layout(mgt%cc(1))) - vol = boxarray_volume(ba) - if (vol > 4**mgt%dim) & - mgt%bottom_solver_eps = mgt%eps - end if - - call destroy(bpt) - - ! If we're at a higher AMR level that coarsens to another mg_tower, - ! or if you're here as part of a cc_applyop instead of a solve - ! instead of coarsening within this one then don't bother - ! creating the special bottom solver stuff - if (mgt%nlevels == 1) mgt%bottom_solver = 1 - - if (mgt%bottom_solver == 4 .and. mgt%use_hypre == 0) then - - ! This is the original layout - old_coarse_la = get_layout(mgt%ss(1)) - - bounding_box = bbox(get_boxarray(old_coarse_la)); - - ! Does the boxarray fill the entire bounding box? If not then don't use this bottom solver - ! also make sure there are at least 2**dm boxes or else you can't use the fancy bottom solver - if (.not. contains(get_boxarray(old_coarse_la),bounding_box) & - .or. (nboxes(old_coarse_la) .lt. 2**mgt%dim) ) then - - mgt%bottom_solver = 1 - - if ( parallel_IOProcessor() .and. verbose > 1 ) then - print *,'F90mg: Do not use bottom_solver = 4 with this boxarray' - print *,'F90mg: Using bottom_solver = 1 instead' - end if - - else - - allocate(mgt%bottom_mgt) - - ! Get the old/new coarse problem domain - coarse_pd = layout_get_pd(old_coarse_la) - - ! Get the new coarse boxarray and layout - call box_build_2(bxs,bounding_box%lo(1:mgt%dim),bounding_box%hi(1:mgt%dim)) - call boxarray_build_bx(new_coarse_ba,bxs) - - ! compute the initial size of each of the boxes for the fancy - ! bottom solver. Each box will have bottom_box_size**dm cells - success = 0 - call get_bottom_box_size(success,bottom_box_size,get_box(new_coarse_ba,1), & - min_width, mgt%max_bottom_nlevel) - - if (success .eq. 1) then - - call boxarray_maxsize(new_coarse_ba,bottom_box_size) - call layout_build_ba(new_coarse_la,new_coarse_ba,coarse_pd, & - pmask=old_coarse_la%lap%pmask) - call boxarray_destroy(new_coarse_ba) - ! - ! Build a communicator on new_coarse_la%lap%prc. - ! - communicator = parallel_create_communicator(new_coarse_la%lap%prc) - - if ( parallel_IOProcessor() .and. verbose > 1 ) then - print *,'F90mg: Coarse problem domain for bottom_solver = 4: ' - print *,' ... Bounding box is' - call print(bounding_box) - print *,' ... Original boxes ',nboxes(old_coarse_la) - print *,' ... New boxes ',nboxes(new_coarse_la) - print *,'# cells on each side ',bottom_box_size - end if - - coarse_dx(:) = mgt%dh(:,1) - - if (present(fancy_bottom_type_in)) then - fancy_bottom_type = fancy_bottom_type_in - else - fancy_bottom_type = 1 - end if - - - call mg_tower_build(mgt%bottom_mgt, new_coarse_la, coarse_pd, & - domain_bc, mgt%stencil_type, & - dh = coarse_dx, & - ns = ns, & - nc = mgt%nc, & - ng = mgt%ng, & - smoother = smoother, & - nu1 = nu1, & - nu2 = nu2, & - nuf = nuf, & - cycle_type = MG_VCycle, & - bottom_solver = fancy_bottom_type, & - bottom_max_iter = bottom_max_iter, & - bottom_solver_eps = bottom_solver_eps, & - max_iter = max_iter, & - abort_on_max_iter = abort_on_max_iter, & - max_nlevel = max_nlevel, & - min_width = min_width, & - eps = eps, & - abs_eps = abs_eps, & - max_L0_growth = max_L0_growth, & - verbose = verbose, & - cg_verbose = cg_verbose, & - nodal = nodal, & - the_bottom_comm = communicator) - else - - mgt%bottom_solver = 1 - - if ( parallel_IOProcessor() .and. verbose > 1 ) then - print *,'F90mg: Do not use bottom_solver = 4 with this boxarray' - print *,'F90mg: Using bottom_solver = 1 instead' - end if - - end if - end if - end if - ! - ! We do this *after* the test on bottom_solver == 4 in case we redefine bottom_solver - ! to be 1 or 2 in that test. - ! - if ( nodal_flag .and. (mgt%bottom_solver == 1 .or. & - mgt%bottom_solver == 2 .or. & - mgt%bottom_solver == 3) ) then - call build_nodal_dot_mask(mgt%nodal_mask,mgt%ss(1)) - end if - - end subroutine mg_tower_build - - subroutine mg_tower_print(mgt, unit, skip) - - use bl_IO_module - - type(mg_tower), intent(in) :: mgt - integer, intent(in), optional :: unit - integer, intent(in), optional :: skip - integer :: un, i, ii - type(box) :: bb - un = unit_stdout(unit) - call unit_skip(un, skip) - - write(unit=un, fmt = '("F90MG settings...")') - write(unit=un, fmt=*) 'nu1 = ', mgt%nu1 - call unit_skip(un, skip) - write(unit=un, fmt=*) 'nu2 = ', mgt%nu2 - call unit_skip(un, skip) - write(unit=un, fmt=*) 'nuf = ', mgt%nuf - call unit_skip(un, skip) - write(unit=un, fmt=*) 'nub = ', mgt%nub - call unit_skip(un, skip) - ! write(unit=un, fmt=*) 'ng = ', mgt%ng - ! call unit_skip(un, skip) - ! write(unit=un, fmt=*) 'nc = ', mgt%nc - ! call unit_skip(un, skip) - write(unit=un, fmt=*) 'min_width = ', mgt%min_width - call unit_skip(un, skip) - write(unit=un, fmt=*) 'max_nlevel = ', mgt%max_nlevel - call unit_skip(un, skip) - write(unit=un, fmt=*) 'max_iter = ', mgt%max_iter - call unit_skip(un, skip) - ! write(unit=un, fmt=*) 'eps = ', mgt%eps - ! call unit_skip(un, skip) - ! write(unit=un, fmt=*) 'abs_eps = ', mgt%abs_eps - ! call unit_skip(un, skip) - ! write(unit=un, fmt=*) 'smoother = ', mgt%smoother - ! call unit_skip(un, skip) - write(unit=un, fmt=*) 'cycle_type = ', mgt%cycle_type - call unit_skip(un, skip) - write(unit=un, fmt=*) 'bottom_solver = ', mgt%bottom_solver - call unit_skip(un, skip) - write(unit=un, fmt=*) 'bottom_solver_eps = ', mgt%bottom_solver_eps - call unit_skip(un, skip) - write(unit=un, fmt=*) 'bottom_max_iter = ', mgt%bottom_max_iter - call unit_skip(un, skip) - - if (mgt%verbose > 2) then - print *,'F90MG: ',mgt%nlevels,' levels created for this solve' - do i = mgt%nlevels,1,-1 - write(unit=un,fmt= '(" Level",i2)') i - do ii = 1,nfabs(mgt%cc(i)) - bb = get_box(mgt%cc(i),ii) - if (mgt%dim == 1) then - write(unit=un,fmt= '(" [",i4,"]: (",i4,") (",i4,")",i4 )') & - ii,bb%lo(1),bb%hi(1),bb%hi(1)-bb%lo(1)+1 - elseif (mgt%dim == 2) then - write(unit=un,fmt= '(" [",i4,"]: (",i4,",",i4,") (",i4,",",i4,")",i4,i4 )') & - ii,bb%lo(1),bb%lo(2),bb%hi(1),bb%hi(2), & - bb%hi(1)-bb%lo(1)+1,bb%hi(2)-bb%lo(2)+1 - else if (mgt%dim == 3) then - print *,'[',ii,']: ',bb%lo(1),bb%lo(2),bb%lo(3),bb%hi(1),bb%hi(2),bb%hi(3) - end if - end do - end do - else - write(unit=un, fmt=*) 'F90MG: numlevels = ',mgt%nlevels - call unit_skip(un, skip) - end if - - end subroutine mg_tower_print - - recursive subroutine mg_tower_destroy(mgt,destroy_la) - - type(mg_tower), intent(inout) :: mgt - logical, intent(in), optional :: destroy_la - - logical :: ldestroy_la - type(layout) :: la - integer :: i - - ldestroy_la = .false.; if ( present(destroy_la) ) ldestroy_la = destroy_la - - la = get_layout(mgt%cc(mgt%nlevels)) - - do i = 1, mgt%nlevels - call destroy(mgt%cc(i)) - call destroy(mgt%ff(i)) - call destroy(mgt%dd(i)) - call destroy(mgt%ss(i)) - call destroy(mgt%mm(i)) - if ( i /= mgt%nlevels ) then - call destroy(mgt%uu(i)) - end if - end do - - deallocate(mgt%cc, mgt%ff, mgt%dd, mgt%uu, mgt%mm, mgt%ss) - deallocate(mgt%dh, mgt%pd) - deallocate(mgt%domain_bc) - - if ( associated(mgt%face_type) ) deallocate(mgt%face_type) - - if ( associated(mgt%skewed) ) then - deallocate(mgt%skewed) - deallocate(mgt%skewed_not_set) - end if - - if ( built_q(mgt%nodal_mask) ) call destroy(mgt%nodal_mask) - - if ( ldestroy_la ) call layout_destroy(la) - - if ( associated(mgt%bottom_comm) ) then - call parallel_free_communicator(mgt%bottom_comm) - deallocate(mgt%bottom_comm) - end if - - if ( associated(mgt%bottom_mgt) ) then - call mg_tower_destroy(mgt%bottom_mgt, .true.) - deallocate(mgt%bottom_mgt) - end if - - end subroutine mg_tower_destroy - - function max_mg_levels(ba, nodal_flag, min_size) result(r) - - type(boxarray), intent(in) :: ba - logical , intent(in) :: nodal_flag - integer , intent(in), optional :: min_size - integer :: r - - integer, parameter :: rrr = 2 - type(box) :: bx, bx1 - type(boxarray) :: ba1 - real(kind=dp_t) :: vol - integer :: i, rr, lmn, dm - - dm = get_dim(ba) - - ! lmn is the smallest we allow any side of a box to become - lmn = 1; if ( present(min_size) ) lmn = min_size - - ! r keep track of the total number of mg levels - r = 1 - - ! rr keeps track of ref ratio between first and last mg levels we are currently testing - rr = rrr - - ! create a temporary copy of the boxarray - call copy(ba1,ba) - - outer: do - call boxarray_coarsen(ba1,rrr) - vol = boxarray_volume(ba1) - do i = 1, nboxes(ba) - bx = get_box(ba,i) - bx1 = coarsen(bx, rr) - - ! check to see if any side has become less than lmn - if ( any(extent(bx1) < lmn) ) exit outer - - ! check to see if bx is evenly divisible by rr - if ( bx /= refine(bx1, rr) ) exit outer - - ! check to make sure the entire problem over all grids is not too small - ! we prefer slightly larger 'bottom solves' for nodal problems since certain - ! bc types do not have degrees of freedom on the domain boundary and you - ! can end up with a 1 point bottom solve, even if the grid is 2**dm - if (nodal_flag) then - if ( vol <= 2**dm ) exit outer - else - if ( vol < 2**dm ) exit outer - end if - - end do - rr = rr*rrr - r = r + 1 - end do outer - - call destroy(ba1) - - end function max_mg_levels - - subroutine get_bottom_box_size(success,bottom_box_size,bxs,min_size,max_bottom_nlevel) - - integer , intent(inout) :: success - integer , intent( out) :: bottom_box_size - type(box), intent(in ) :: bxs - integer , intent(in ) :: min_size - integer , intent(in ) :: max_bottom_nlevel - - type(box) :: bx, bx1 - integer :: rr - integer :: bottom_levs - - rr = 2 - success = 1 - bottom_levs = 1 - - do - bx = bxs - bx1 = coarsen(bx, rr) - - if ( any(extent(bx1) < min_size) ) exit - - if ( any(mod(extent(bx1),2) .eq. 1) ) then - - if ( all(mod(extent(bx1),3) .eq. 0) ) then - ! test 3 - bottom_levs = bottom_levs + 1 - rr = rr*3 - exit - else if ( all(mod(extent(bx1),5) .eq. 0) ) then - ! test 5 - bottom_levs = bottom_levs + 1 - rr = rr*5 - exit - else - exit - end if - - end if - - if ( bx /= refine(bx1, rr) ) then - ! - ! This means bx has an odd number of cells on one or more side - ! we can only get here if rr=2, i.e., the first pass through this do loop - ! we exit the do loop with bottom_levs=1 and will abort. - ! - exit - end if - - rr = rr*2 - - bottom_levs = bottom_levs + 1 - ! - ! Max size of grids will be 2**max(bottom_levs,max_bottom_nlevel) - ! - if (bottom_levs .eq. max_bottom_nlevel) exit - - end do - - bottom_box_size = rr - - if ( bottom_levs .eq. 1) success = 0 - - end subroutine get_bottom_box_size - - subroutine do_bottom_mgt(mgt, uu, rh) - - use bl_prof_module - - type( mg_tower), intent(inout) :: mgt - type( multifab), intent(inout) :: uu - type( multifab), intent(in ) :: rh - - type(bl_prof_timer), save :: bpt - - type( multifab ) :: bottom_uu - type( multifab ) :: bottom_rh - type( layout ) :: la - integer :: mglev - logical :: do_diag - - do_diag = .false.; if ( mgt%verbose >= 4 ) do_diag = .true. - - call build(bpt, "do_bottom_mgt") - - if ( mgt%bottom_solver .ne. 4 ) & - call bl_error("MG_TOWER_BOTTOM_SOLVE: must have bottom_solver == 4") - - mglev = mgt%bottom_mgt%nlevels - - la = get_layout(mgt%bottom_mgt%ss(mglev)) - - call multifab_build(bottom_uu,la,1,nghost(uu),nodal_flags(uu)) - - call setval(bottom_uu,ZERO,all=.true.) - - if (nodal_q(rh)) then - call multifab_build(bottom_rh,la,1,1,nodal_flags(rh)) - call setval(bottom_rh,ZERO,all=.true.) - else - call multifab_build(bottom_rh,la,1,0,nodal_flags(rh)) - end if - - call multifab_copy_c(bottom_rh,1,rh,1,1,ng=0) - - call mg_tower_cycle(mgt%bottom_mgt, mgt%bottom_mgt%cycle_type, mglev, & - mgt%bottom_mgt%ss(mglev), bottom_uu, bottom_rh, & - mgt%bottom_mgt%mm(mglev), mgt%bottom_mgt%nu1, mgt%bottom_mgt%nu2) - - call multifab_copy_c(uu,1,bottom_uu,1,1,ng=0) - - call destroy(bottom_uu) - call destroy(bottom_rh) - - call destroy(bpt) - - end subroutine do_bottom_mgt - - subroutine mg_tower_bottom_solve(mgt, lev, ss, uu, rh, mm, eps_in) - - use bl_prof_module - use itsol_module, only: itsol_bicgstab_solve, itsol_cabicgstab_solve, itsol_cg_solve - - type( mg_tower), intent(inout) :: mgt - type( multifab), intent(inout) :: uu - type( multifab), intent(in) :: rh - type( multifab), intent(in) :: ss - type(imultifab), intent(in) :: mm - integer, intent(in) :: lev - real(dp_t), intent(in), optional :: eps_in - - integer :: i,stat,communicator - logical :: singular_test,do_diag - real(dp_t) :: nrm, eps - - type(bl_prof_timer), save :: bpt - - call build(bpt, "mgt_bottom_solve") - - do_diag = .false.; if ( mgt%verbose >= 4 ) do_diag = .true. - - eps = mgt%bottom_solver_eps ; if ( present(eps_in) ) eps = eps_in - - if ( .not.nodal_q(rh) ) then - singular_test = mgt%bottom_singular .and. mgt%coeffs_sum_to_zero - end if - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' BOT: Norm before bottom ',nrm - end if - - if ( associated(mgt%bottom_comm) ) then - communicator = mgt%bottom_comm - else - communicator = parallel_communicator() - end if - - stat = 0 - - select case ( mgt%bottom_solver ) - case (0) - do i = 1, mgt%nuf - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - case (1) - if ( nodal_q(rh) ) then - call itsol_bicgstab_solve(ss, uu, rh, mm, & - eps, mgt%bottom_max_iter, & - mgt%cg_verbose, & - mgt%stencil_type, mgt%lcross, & - stat = stat, & - singular_in = mgt%bottom_singular, & - uniform_dh = mgt%uniform_dh,& - nodal_mask = mgt%nodal_mask, & - comm_in = communicator) - else - call itsol_bicgstab_solve(ss, uu, rh, mm, & - eps, mgt%bottom_max_iter, & - mgt%cg_verbose, & - mgt%stencil_type, mgt%lcross, & - stat = stat, & - singular_in = singular_test, & - uniform_dh = mgt%uniform_dh, & - comm_in = communicator) - end if - do i = 1, mgt%nub - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - case (2) - if ( nodal_q(rh) ) then - call itsol_cg_solve(ss, uu, rh, mm, & - eps, mgt%bottom_max_iter, mgt%cg_verbose, & - mgt%stencil_type, mgt%lcross, & - stat = stat, singular_in = mgt%bottom_singular, & - uniform_dh = mgt%uniform_dh, nodal_mask=mgt%nodal_mask) - else - call itsol_cg_solve(ss, uu, rh, mm, & - eps, mgt%bottom_max_iter, mgt%cg_verbose, & - mgt%stencil_type, mgt%lcross, & - stat = stat, singular_in = singular_test, & - uniform_dh = mgt%uniform_dh) - end if - do i = 1, mgt%nub - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - case (3) - if ( nodal_q(rh) ) then - call itsol_cabicgstab_solve(ss, uu, rh, mm, & - eps, mgt%bottom_max_iter, & - mgt%cg_verbose, & - mgt%stencil_type, mgt%lcross, & - stat = stat, & - singular_in = mgt%bottom_singular, & - uniform_dh = mgt%uniform_dh,& - nodal_mask = mgt%nodal_mask, & - comm_in = communicator) - else - call itsol_cabicgstab_solve(ss, uu, rh, mm, & - eps, mgt%bottom_max_iter, & - mgt%cg_verbose, & - mgt%stencil_type, mgt%lcross, & - stat = stat, & - singular_in = singular_test, & - uniform_dh = mgt%uniform_dh, & - comm_in = communicator) - end if - do i = 1, mgt%nub - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - - case default - call bl_error("MG_TOWER_BOTTOM_SOLVE: no such solver: ", mgt%bottom_solver) - end select - - if ( stat /= 0 ) then - if ( parallel_IOProcessor() .and. mgt%verbose > 0 ) then - call bl_warn("BREAKDOWN in bottom_solver: trying smoother") - end if - do i = 1, 20 - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - end if - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' BOT: Norm after bottom ',nrm - end if - - call destroy(bpt) - - end subroutine mg_tower_bottom_solve - - subroutine mg_tower_restriction(mgt, crse, fine, mm_fine, mm_crse) - - use bl_prof_module - use cc_restriction_module, only: cc_restriction_1d, cc_restriction_2d, cc_restriction_3d - use nodal_restriction_module, only: nodal_restriction_1d, nodal_restriction_2d, & - nodal_restriction_3d - use impose_neumann_bcs_module - - type(multifab), intent(inout) :: fine - type(multifab), intent(inout) :: crse - type(imultifab), intent(in) :: mm_fine - type(imultifab), intent(in) :: mm_crse - type(mg_tower), intent(inout) :: mgt - integer :: loc(mgt%dim), lof(mgt%dim) - integer :: lom_fine(mgt%dim) - integer :: lom_crse(mgt%dim) - integer :: lo(mgt%dim), hi(mgt%dim) - integer :: vlo(mgt%dim), vhi(mgt%dim) - integer :: i, n, ir(mgt%dim) - logical :: nodal_flag - real(kind=dp_t), pointer :: fp(:,:,:,:) - real(kind=dp_t), pointer :: cp(:,:,:,:) - integer , pointer :: mp_fine(:,:,:,:) - integer , pointer :: mp_crse(:,:,:,:) - - integer :: mg_restriction_mode, ng - type(bl_prof_timer), save :: bpt - - call build(bpt, "mgt_restriction") - - ir = 2 - - nodal_flag = nodal_q(crse) - - if ( nodal_flag ) then - call multifab_fill_boundary(fine) - call setval(crse, ZERO, all=.true.) - mg_restriction_mode = 1 - - !$omp parallel do private(i,fp,mp_fine,lof,lom_fine,ng,n) - do i = 1, nfabs(fine) - fp => dataptr(fine, i) - mp_fine => dataptr(mm_fine, i) - lof = lwb(get_pbox(fine, i)) - lom_fine = lwb(get_pbox(mm_fine, i)) - ng = lom_fine(1) - lof(1) - do n = 1, ncomp(fine) - select case (mgt%dim) - case (1) - call impose_neumann_bcs_1d(fp(:,1,1,n),mp_fine(:,1,1,1),lom_fine,ng) - case (2) - call impose_neumann_bcs_2d(fp(:,:,1,n),mp_fine(:,:,1,1),lom_fine,ng) - case (3) - call impose_neumann_bcs_3d(fp(:,:,:,n),mp_fine(:,:,:,1),lom_fine,ng) - end select - end do - end do - !$omp end parallel do - end if - - !$OMP PARALLEL DO PRIVATE(i,n,cp,fp,mp_fine,mp_crse,loc,lof,lom_fine,lom_crse,lo,hi,vlo,vhi) - do i = 1, nfabs(crse) - - cp => dataptr(crse, i) - fp => dataptr(fine, i) - mp_fine => dataptr(mm_fine, i) - mp_crse => dataptr(mm_crse, i) - - loc = lwb(get_pbox(crse,i)) - lof = lwb(get_pbox(fine,i)) - lom_fine = lwb(get_pbox(mm_fine,i)) - lom_crse = lwb(get_pbox(mm_crse,i)) - lo = lwb(get_ibox(crse,i)) - hi = upb(get_ibox(crse,i)) - vlo = lo - vhi = hi - - do n = 1, mgt%nc - select case ( mgt%dim ) - case (1) - if ( .not. nodal_flag ) then - call cc_restriction_1d(cp(:,1,1,n), loc, fp(:,1,1,n), lof, lo, hi, ir) - else - call nodal_restriction_1d(cp(:,1,1,n), loc, fp(:,1,1,n), lof, & - mp_fine(:,1,1,1), lom_fine, & - mp_crse(:,1,1,1), lom_crse, lo, hi, vlo, vhi, ir, .false., & - mg_restriction_mode) - end if - case (2) - if ( .not. nodal_flag ) then - call cc_restriction_2d(cp(:,:,1,n), loc, fp(:,:,1,n), lof, lo, hi, ir) - else - call nodal_restriction_2d(cp(:,:,1,n), loc, fp(:,:,1,n), lof, & - mp_fine(:,:,1,1), lom_fine, & - mp_crse(:,:,1,1), lom_crse, lo, hi, vlo, vhi, ir, .false., & - mg_restriction_mode) - end if - case (3) - if ( .not. nodal_flag ) then - call cc_restriction_3d(cp(:,:,:,n), loc, fp(:,:,:,n), lof, lo, hi, ir) - else - call nodal_restriction_3d(cp(:,:,:,n), loc, fp(:,:,:,n), lof, & - mp_fine(:,:,:,1), lom_fine, & - mp_crse(:,:,:,1), lom_crse, lo, hi, vlo, vhi, ir, .false., & - mg_restriction_mode) - end if - end select - end do - end do - !$OMP END PARALLEL DO - - call destroy(bpt) - - end subroutine mg_tower_restriction - ! - ! In the following two "impose" routines we assume that any ghost cells - ! covered by valid region have been filled properly by fill_boundary(). - ! Also, that "all" ghost cells have computable values. We may copy some - ! ghost cells only to overwrite them later with "correct" values. - ! - subroutine impose_physbc_cc_2d(uu, mgt, lo, hi, dlo, dhi, ng) - - type(mg_tower), intent(in ) :: mgt - integer, intent(in ) :: lo(:), hi(:), dlo(:), dhi(:), ng - real(kind=dp_t), intent(inout) :: uu(lo(1)-ng:,lo(2)-ng:,:) - - if ( lo(1) == dlo(1) ) then - - if ( mgt%domain_bc(1,1) == BC_DIR ) then - - uu(lo(1)-1,:,1:mgt%nc) = -uu(lo(1),:,1:mgt%nc) - - else if ( mgt%domain_bc(1,1) == BC_NEU ) then - - uu(lo(1)-1,:,1:mgt%nc) = uu(lo(1),:,1:mgt%nc) - - end if - - if ( mgt%domain_bc(1,1) == BC_DIR .or. mgt%domain_bc(1,1) == BC_NEU ) then - ! - ! Corners - ! - if ( lo(2) == dlo(2) ) then - uu(lo(1)-1,lo(2)-1,1:mgt%nc) = uu(lo(1)-1,lo(2),1:mgt%nc) - end if - if ( hi(2) == dhi(2) ) then - uu(lo(1)-1,hi(2)+1,1:mgt%nc) = uu(lo(1)-1,hi(2),1:mgt%nc) - end if - end if - - end if - - if ( hi(1) == dhi(1) ) then - - if ( mgt%domain_bc(1,2) == BC_DIR ) then - - uu(hi(1)+1,lo(2):hi(2),1:mgt%nc) = -uu(hi(1),lo(2):hi(2),1:mgt%nc) - - else if ( mgt%domain_bc(1,2) == BC_NEU ) then - - uu(hi(1)+1,lo(2):hi(2),1:mgt%nc) = uu(hi(1),lo(2):hi(2),1:mgt%nc) - - end if - - if ( mgt%domain_bc(1,2) == BC_DIR .or. mgt%domain_bc(1,2) == BC_NEU ) then - ! - ! Corners - ! - if ( lo(2) == dlo(2) ) then - uu(hi(1)+1,lo(2)-1,1:mgt%nc) = uu(hi(1)+1,lo(2),1:mgt%nc) - end if - if ( hi(2) == dhi(2) ) then - uu(hi(1)+1,hi(2)+1,1:mgt%nc) = uu(hi(1)+1,hi(2),1:mgt%nc) - end if - end if - - end if - ! - ! At this point all possible corner cells have been filled. - ! - if ( lo(2) == dlo(2) ) then - - if ( mgt%domain_bc(2,1) == BC_DIR ) then - - uu(lo(1):hi(1),lo(2)-1,1:mgt%nc) = -uu(lo(1):hi(1),lo(2),1:mgt%nc) - - else if ( mgt%domain_bc(2,1) == BC_NEU ) then - - uu(lo(1):hi(1),lo(2)-1,1:mgt%nc) = uu(lo(1):hi(1),lo(2),1:mgt%nc) - - end if - - end if - - if ( hi(2) == dhi(2) ) then - - if ( mgt%domain_bc(2,2) == BC_DIR ) then - - uu(lo(1):hi(1),hi(2)+1,1:mgt%nc) = -uu(lo(1):hi(1),hi(2),1:mgt%nc) - - else if ( mgt%domain_bc(2,2) == BC_NEU ) then - - uu(lo(1):hi(1),hi(2)+1,1:mgt%nc) = uu(lo(1):hi(1),hi(2),1:mgt%nc) - - end if - - end if - - end subroutine impose_physbc_cc_2d - - subroutine impose_physbc_cc_3d(uu, mgt, lo, hi, dlo, dhi, ng) - - type(mg_tower), intent(in ) :: mgt - integer, intent(in ) :: lo(:), hi(:), dlo(:), dhi(:), ng - real(kind=dp_t), intent(inout) :: uu(lo(1)-ng:,lo(2)-ng:,lo(3)-ng:,:) - - if ( lo(1) == dlo(1) ) then - - if ( mgt%domain_bc(1,1) == BC_DIR ) then - - uu(lo(1)-1,:,:,1:mgt%nc) = -uu(lo(1),:,:,1:mgt%nc) - - else if ( mgt%domain_bc(1,1) == BC_NEU ) then - - uu(lo(1)-1,:,:,1:mgt%nc) = uu(lo(1),:,:,1:mgt%nc) - - end if - - if ( mgt%domain_bc(1,1) == BC_DIR .or. mgt%domain_bc(1,1) == BC_NEU ) then - ! - ! Edges. - ! - if ( lo(2) == dlo(2) ) then - uu(lo(1)-1,lo(2)-1,lo(3):hi(3),1:mgt%nc) = uu(lo(1)-1,lo(2),lo(3):hi(3),1:mgt%nc) - end if - if ( hi(2) == dhi(2) ) then - uu(lo(1)-1,hi(2)+1,lo(3):hi(3),1:mgt%nc) = uu(lo(1)-1,hi(2),lo(3):hi(3),1:mgt%nc) - end if - if ( lo(3) == dlo(3) ) then - uu(lo(1)-1,lo(2):hi(2),lo(3)-1,1:mgt%nc) = uu(lo(1)-1,lo(2):hi(2),lo(3),1:mgt%nc) - end if - if ( hi(3) == dhi(3) ) then - uu(lo(1)-1,lo(2):hi(2),hi(3)+1,1:mgt%nc) = uu(lo(1)-1,lo(2):hi(2),hi(3),1:mgt%nc) - end if - ! - ! Corners - ! - if ( lo(2) == dlo(2) .and. lo(3) == dlo(3) ) then - uu(lo(1)-1,lo(2)-1,lo(3)-1,1:mgt%nc) = uu(lo(1)-1,lo(2),lo(3),1:mgt%nc) - end if - if ( lo(2) == dlo(2) .and. hi(3) == dhi(3) ) then - uu(lo(1)-1,lo(2)-1,hi(3)+1,1:mgt%nc) = uu(lo(1)-1,lo(2),hi(3),1:mgt%nc) - end if - if ( hi(2) == dhi(2) .and. lo(3) == dlo(3) ) then - uu(lo(1)-1,hi(2)+1,lo(3)-1,1:mgt%nc) = uu(lo(1)-1,hi(2),lo(3),1:mgt%nc) - end if - if ( hi(2) == dhi(2) .and. hi(3) == dhi(3) ) then - uu(lo(1)-1,hi(2)+1,hi(3)+1,1:mgt%nc) = uu(lo(1)-1,hi(2),hi(3),1:mgt%nc) - end if - end if - - end if - - if ( hi(1) == dhi(1) ) then - - if ( mgt%domain_bc(1,2) == BC_DIR ) then - - uu(hi(1)+1,:,:,1:mgt%nc) = -uu(hi(1),:,:,1:mgt%nc) - - else if ( mgt%domain_bc(1,2) == BC_NEU ) then - - uu(hi(1)+1,:,:,1:mgt%nc) = uu(hi(1),:,:,1:mgt%nc) - - end if - - if ( mgt%domain_bc(1,2) == BC_DIR .or. mgt%domain_bc(1,2) == BC_NEU ) then - ! - ! Edges. - ! - if ( lo(2) == dlo(2) ) then - uu(hi(1)+1,lo(2)-1,lo(3):hi(3),1:mgt%nc) = uu(hi(1)+1,lo(2),lo(3):hi(3),1:mgt%nc) - end if - if ( hi(2) == dhi(2) ) then - uu(hi(1)+1,hi(2)+1,lo(3):hi(3),1:mgt%nc) = uu(hi(1)+1,hi(2),lo(3):hi(3),1:mgt%nc) - end if - if ( lo(3) == dlo(3) ) then - uu(hi(1)+1,lo(2):hi(2),lo(3)-1,1:mgt%nc) = uu(hi(1)+1,lo(2):hi(2),lo(3),1:mgt%nc) - end if - if ( hi(3) == dhi(3) ) then - uu(hi(1)+1,lo(2):hi(2),hi(3)+1,1:mgt%nc) = uu(hi(1)+1,lo(2):hi(2),hi(3),1:mgt%nc) - end if - ! - ! Corners. - ! - if ( lo(2) == dlo(2) .and. lo(3) == dlo(3) ) then - uu(hi(1)+1,lo(2)-1,lo(3)-1,1:mgt%nc) = uu(hi(1)+1,lo(2),lo(3),1:mgt%nc) - end if - if ( lo(2) == dlo(2) .and. hi(3) == dhi(3) ) then - uu(hi(1)+1,lo(2)-1,hi(3)+1,1:mgt%nc) = uu(hi(1)+1,lo(2),hi(3),1:mgt%nc) - end if - if ( hi(2) == dhi(2) .and. lo(3) == dlo(3) ) then - uu(hi(1)+1,hi(2)+1,lo(3)-1,1:mgt%nc) = uu(hi(1)+1,hi(2),lo(3),1:mgt%nc) - end if - if ( hi(2) == dhi(2) .and. hi(3) == dhi(3) ) then - uu(hi(1)+1,hi(2)+1,hi(3)+1,1:mgt%nc) = uu(hi(1)+1,hi(2),hi(3),1:mgt%nc) - end if - end if - - end if - ! - ! All possible corners should be done by this point. Only some faces & edges remain. - ! - if ( lo(2) == dlo(2) ) then - - if ( mgt%domain_bc(2,1) == BC_DIR ) then - - uu(lo(1):hi(1),lo(2)-1,:,1:mgt%nc) = -uu(lo(1):hi(1),lo(2),:,1:mgt%nc) - - else if ( mgt%domain_bc(2,1) == BC_NEU ) then - - uu(lo(1):hi(1),lo(2)-1,:,1:mgt%nc) = uu(lo(1):hi(1),lo(2),:,1:mgt%nc) - - end if - - if ( mgt%domain_bc(2,1) == BC_DIR .or. mgt%domain_bc(2,1) == BC_NEU ) then - ! - ! Edges - only need to do lo & hi Z. - ! - if ( lo(3) == dlo(3) ) then - uu(lo(1):hi(1),lo(2)-1,lo(3)-1,1:mgt%nc) = uu(lo(1):hi(1),lo(2)-1,lo(3),1:mgt%nc) - end if - if ( hi(3) == dhi(3) ) then - uu(lo(1):hi(1),lo(2)-1,hi(3)+1,1:mgt%nc) = uu(lo(1):hi(1),lo(2)-1,hi(3),1:mgt%nc) - end if - end if - - end if - - if ( hi(2) == dhi(2) ) then - - if ( mgt%domain_bc(2,2) == BC_DIR ) then - - uu(lo(1):hi(1),hi(2)+1,:,1:mgt%nc) = -uu(lo(1):hi(1),hi(2),:,1:mgt%nc) - - else if ( mgt%domain_bc(2,2) == BC_NEU ) then - - uu(lo(1):hi(1),hi(2)+1,:,1:mgt%nc) = uu(lo(1):hi(1),hi(2),:,1:mgt%nc) - - end if - - if ( mgt%domain_bc(2,2) == BC_DIR .or. mgt%domain_bc(2,2) == BC_NEU ) then - ! - ! Edges - only need to do lo & hi Z. - ! - if ( lo(3) == dlo(3) ) then - uu(lo(1):hi(1),hi(2)+1,lo(3)-1,1:mgt%nc) = uu(lo(1):hi(1),hi(2)+1,lo(3),1:mgt%nc) - end if - if ( hi(3) == dhi(3) ) then - uu(lo(1):hi(1),hi(2)+1,hi(3)+1,1:mgt%nc) = uu(lo(1):hi(1),hi(2)+1,hi(3),1:mgt%nc) - end if - end if - - end if - ! - ! All that remains to do are any Z faces. - ! - if ( lo(3) == dlo(3) ) then - - if ( mgt%domain_bc(3,1) == BC_DIR ) then - - uu(lo(1):hi(1),lo(2):hi(2),lo(3)-1,1:mgt%nc) = -uu(lo(1):hi(1),lo(2):hi(2),lo(3),1:mgt%nc) - - else if ( mgt%domain_bc(3,1) == BC_NEU ) then - - uu(lo(1):hi(1),lo(2):hi(2),lo(3)-1,1:mgt%nc) = uu(lo(1):hi(1),lo(2):hi(2),lo(3),1:mgt%nc) - - end if - - end if - - if ( hi(3) == dhi(3) ) then - - if ( mgt%domain_bc(3,2) == BC_DIR ) then - - uu(lo(1):hi(1),lo(2):hi(2),hi(3)+1,1:mgt%nc) = -uu(lo(1):hi(1),lo(2):hi(2),hi(3),1:mgt%nc) - - else if ( mgt%domain_bc(3,2) == BC_NEU ) then - - uu(lo(1):hi(1),lo(2):hi(2),hi(3)+1,1:mgt%nc) = uu(lo(1):hi(1),lo(2):hi(2),hi(3),1:mgt%nc) - - end if - - end if - - end subroutine impose_physbc_cc_3d - ! - ! Prolongate from mgt%uu(lev) -> uu. - ! - subroutine mg_tower_prolongation(mgt, uu, lev) - use bl_prof_module - use mg_prolongation_module - - type(mg_tower), intent(inout) :: mgt - type(multifab), intent(inout) :: uu - integer , intent(in ) :: lev - - real(kind=dp_t), pointer :: fp(:,:,:,:), cp(:,:,:,:), up(:,:,:,:) - integer, pointer :: mp(:,:,:,:) - integer :: i, j, k, n, ng, ir(mgt%dim) - integer :: lo(mgt%dim), hi(mgt%dim), lom(mgt%dim) - integer :: loc(mgt%dim), lof(mgt%dim), dlo(mgt%dim), dhi(mgt%dim) - type(box) :: dmn - type(bl_prof_timer), save :: bpt - - call build(bpt, "mgt_prolongation") - - call bl_assert( mgt%nc == ncomp(uu) , 'mg_tower_prolongation: ncomp') - call bl_assert( mgt%nc == ncomp(mgt%uu(lev)), 'mg_tower_prolongation: ncomp') - - ir = 2 - ng = nghost(mgt%uu(lev)) - dmn = get_pd(get_layout(mgt%uu(lev))) - dlo = lwb(dmn) - dhi = upb(dmn) - - if ( .not. nodal_q(uu) ) then - if ( mgt%use_lininterp ) then - if ( ng > 0 ) then - ! - ! Set up dirichlet/neumann boundaries so lininterp does right thing. - ! If we don't have one ghost cell the interp routines will do a - ! piecewise constant interp on the cells touching the grid boundary. - ! - call multifab_fill_boundary(mgt%uu(lev)) - - do n = 1, nfabs(uu) - up => dataptr(mgt%uu(lev) ,n) - lo = lwb(get_ibox(mgt%uu(lev), n)) - hi = upb(get_ibox(mgt%uu(lev), n)) - select case ( mgt%dim ) - case (2) - call impose_physbc_cc_2d(up(:,:,1,:),mgt,lo,hi,dlo,dhi,ng) - case (3) - call impose_physbc_cc_3d(up(:,:,:,:),mgt,lo,hi,dlo,dhi,ng) - end select - end do - end if - end if - - !$OMP PARALLEL DO PRIVATE(i,n,loc,lof,lo,hi,fp,cp) - do i = 1, nfabs(uu) - loc = lwb(get_pbox(mgt%uu(lev),i)) - lof = lwb(get_pbox(uu, i)) - lo = lwb(get_ibox(uu, i)) - hi = upb(get_ibox(uu, i)) - fp => dataptr(uu, i) - cp => dataptr(mgt%uu(lev),i) - do n = 1, mgt%nc - select case ( mgt%dim ) - case (1) - call cc_prolongation(fp(:,1,1,n), lof, cp(:,1,1,n), loc, lo, hi, ir, mgt%use_lininterp) - case (2) - call cc_prolongation(fp(:,:,1,n), lof, cp(:,:,1,n), loc, lo, hi, ir, mgt%use_lininterp, mgt%ptype) - case (3) - call cc_prolongation(fp(:,:,:,n), lof, cp(:,:,:,n), loc, lo, hi, ir, mgt%use_lininterp, mgt%ptype) - end select - end do - end do - !$OMP END PARALLEL DO - - else - - if ( using_nodal_cubic() .and. mgt%dim > 1 ) then - call multifab_fill_boundary(mgt%uu(lev)) - - do i = 1, nfabs(mgt%uu(lev)) - up => dataptr(mgt%uu(lev), i) - mp => dataptr(mgt%mm(lev), i) - lom = lwb(get_ibox(mgt%mm(lev),i)) - lo = lwb(get_pbox(mgt%uu(lev),i)) - ng = lom(1) - lo(1) - do n = 1, mgt%nc - select case ( mgt%dim ) - case (2) - call impose_neumann_bcs_2d(up(:,:,1,n),mp(:,:,1,1),lom,ng) - case (3) - call impose_neumann_bcs_3d(up(:,:,:,n),mp(:,:,:,1),lom,ng) - end select - end do - end do - end if - - !$OMP PARALLEL DO PRIVATE(i,n,loc,lof,lo,hi,fp,cp) - do i = 1, nfabs(uu) - loc = lwb(get_pbox(mgt%uu(lev),i)) - lof = lwb(get_pbox(uu, i)) - lo = lwb(get_ibox(uu, i)) - hi = upb(get_ibox(uu, i)) - fp => dataptr(uu, i) - cp => dataptr(mgt%uu(lev),i) - do n = 1, mgt%nc - select case ( mgt%dim ) - case (1) - call nodal_prolongation_1d(fp(:,1,1,n), lof, cp(:,1,1,n), loc, lo, hi, ir) - case (2) - call nodal_prolongation_2d(fp(:,:,1,n), lof, cp(:,:,1,n), loc, lo, hi, ir) - case (3) - call nodal_prolongation_3d(fp(:,:,:,n), lof, cp(:,:,:,n), loc, lo, hi, ir) - end select - end do - end do - !$OMP END PARALLEL DO - - if ( using_nodal_cubic() .and. mgt%dim > 1 ) then - ! - ! The [bi,tri]cubic interpolators don't preserve dirichlet BCs. - ! - do n = 1, nfabs(uu) - up => dataptr(uu ,n) - mp => dataptr(mgt%mm(lev+1),n) - lo = lwb(get_ibox(uu, n)) - hi = upb(get_ibox(uu, n)) - - select case ( mgt%dim ) - case (2) - do j = lo(2),hi(2) - if ( bc_dirichlet(mp(lo(1),j,1,1),1,0) ) up(lo(1),j,1,1:mgt%nc) = ZERO - if ( bc_dirichlet(mp(hi(1),j,1,1),1,0) ) up(hi(1),j,1,1:mgt%nc) = ZERO - end do - - do i = lo(1),hi(1) - if ( bc_dirichlet(mp(i,lo(2),1,1),1,0) ) up(i,lo(2),1,1:mgt%nc) = ZERO - if ( bc_dirichlet(mp(i,hi(2),1,1),1,0) ) up(i,hi(2),1,1:mgt%nc) = ZERO - end do - case (3) - do k = lo(3),hi(3) - do j = lo(2),hi(2) - if ( bc_dirichlet(mp(lo(1),j,k,1),1,0) ) up(lo(1),j,k,1:mgt%nc) = ZERO - if ( bc_dirichlet(mp(hi(1),j,k,1),1,0) ) up(hi(1),j,k,1:mgt%nc) = ZERO - end do - end do - - do k = lo(3),hi(3) - do i = lo(1),hi(1) - if ( bc_dirichlet(mp(i,lo(2),k,1),1,0) ) up(i,lo(2),k,1:mgt%nc) = ZERO - if ( bc_dirichlet(mp(i,hi(2),k,1),1,0) ) up(i,hi(2),k,1:mgt%nc) = ZERO - end do - end do - - do j = lo(2),hi(2) - do i = lo(1),hi(1) - if ( bc_dirichlet(mp(i,j,lo(3),1),1,0) ) up(i,j,lo(3),1:mgt%nc) = ZERO - if ( bc_dirichlet(mp(i,j,hi(3),1),1,0) ) up(i,j,hi(3),1:mgt%nc) = ZERO - end do - end do - end select - - end do - ! - ! Nor do they preserve the value of shared nodes (ones at grid boundaries). - ! - call multifab_internal_sync(uu) - end if - - endif - - call destroy(bpt) - - end subroutine mg_tower_prolongation - - function mg_tower_converged(mgt, dd, Ynorm) result(r) - use itsol_module - logical :: r - type(mg_tower), intent(inout) :: mgt - real(dp_t), intent(in ) :: Ynorm - type(multifab), intent(in ) :: dd - r = itsol_converged(dd, Ynorm, mgt%eps, mgt%abs_eps) - end function mg_tower_converged - - subroutine mg_tower_cycle(mgt,cyc,lev,ss,uu,rh,mm,nu1,nu2,bottom_level,bottom_solve_time) - - type(mg_tower), intent(inout) :: mgt - type(multifab), intent(inout) :: rh - type(multifab), intent(inout) :: uu - type(multifab), intent(in) :: ss - type(imultifab), intent(in) :: mm - integer, intent(in) :: lev - integer, intent(in) :: nu1, nu2 - integer, intent(in) :: cyc - integer, intent(in), optional :: bottom_level - real(dp_t), intent(inout), optional :: bottom_solve_time - - select case ( mgt%cycle_type ) - case(MG_VCycle) - call mg_tower_v_cycle(mgt,cyc,lev,ss,uu,rh,mm,nu1,nu2,1,bottom_level,bottom_solve_time) - case(MG_WCycle) - call mg_tower_v_cycle(mgt,cyc,lev,ss,uu,rh,mm,nu1,nu2,2,bottom_level,bottom_solve_time) - case(MG_FCycle) - call mg_tower_fmg_cycle(mgt,cyc,lev,ss,uu,rh,mm,nu1,nu2,bottom_level,bottom_solve_time) - case default - call bl_error('mg_tower_cycle: unknown cycle_type: ', mgt%cycle_type) - end select - - end subroutine mg_tower_cycle - - recursive subroutine mg_tower_fmg_cycle(mgt, cyc, lev, ss, uu, rh, mm, nu1, nu2,& - bottom_level, bottom_solve_time) - use fabio_module - use bl_prof_module - use impose_neumann_bcs_module - - type(mg_tower), intent(inout) :: mgt - type(multifab), intent(inout) :: rh - type(multifab), intent(inout) :: uu - type(multifab), intent(in ) :: ss - type(imultifab), intent(in ) :: mm - integer, intent(in ) :: lev - integer, intent(in ) :: nu1, nu2 - integer, intent(in ) :: cyc - integer, intent(in ), optional :: bottom_level - real(dp_t), intent(inout), optional :: bottom_solve_time - - logical :: do_diag - real(dp_t) :: nrm, stime - integer :: lbl - character(len=3) :: number - character(len=20) :: filename - - type(bl_prof_timer), save :: bpt - - call build(bpt, "mgt_f_cycle") - - lbl = 1; if ( present(bottom_level) ) lbl = bottom_level - - do_diag = .false.; if ( mgt%verbose >= 4 ) do_diag = .true. - - call setval(uu,ZERO,all=.true.) - - - if ( lev == lbl ) then - stime = parallel_wtime() - - if ( associated(mgt%bottom_mgt) ) then - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' DN: Norm before bottom ',nrm - end if - - call do_bottom_mgt(mgt, uu, rh) - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' UP: Norm after bottom ',nrm - end if - else - call mg_tower_bottom_solve(mgt, lev, ss, uu, rh, mm) - end if - - if ( present(bottom_solve_time) ) & - bottom_solve_time = bottom_solve_time + (parallel_wtime()-stime) - else - call mg_tower_restriction(mgt, mgt%dd(lev-1), rh, mgt%mm(lev),mgt%mm(lev-1)) - - call mg_tower_fmg_cycle(mgt, cyc, lev-1, mgt%ss(lev-1), mgt%uu(lev-1), & - mgt%dd(lev-1), mgt%mm(lev-1), nu1, nu2, bottom_level, bottom_solve_time) - -! call print(mgt%uu(lev-1),'uu before prolongation') - - if ( .false. ) then - ! - ! Some debugging code I want to keep around for a while. - ! I don't want to have to recreate this all the time :-) - ! - write(number,fmt='(i3.3)') lev - filename = 'uu_before_p' // number - call fabio_write(mgt%uu(lev-1), 'debug', trim(filename)) - end if - - call mg_tower_prolongation(mgt, uu, lev-1) - - if (lev == mgt%nlevels) then - call mg_tower_v_cycle(mgt, MG_VCycle, lev, mgt%ss(lev), uu, & - rh, mgt%mm(lev), nu1, nu2, 1, bottom_level, bottom_solve_time) - else - call mg_tower_v_cycle(mgt, MG_VCycle, lev, mgt%ss(lev), mgt%uu(lev), & - rh, mgt%mm(lev), nu1, nu2, 1, bottom_level, bottom_solve_time) - end if - end if - - call destroy(bpt) - - end subroutine mg_tower_fmg_cycle - - recursive subroutine mg_tower_v_cycle(mgt, cyc, lev, ss, uu, rh, mm, nu1, nu2, gamma, & - bottom_level, bottom_solve_time) - use bl_prof_module - - type(mg_tower), intent(inout) :: mgt - type(multifab), intent(inout) :: rh - type(multifab), intent(inout) :: uu - type(multifab), intent(in ) :: ss - type(imultifab), intent(in ) :: mm - integer, intent(in ) :: lev - integer, intent(in ) :: nu1, nu2 - integer, intent(in ) :: gamma - integer, intent(in ) :: cyc - integer, intent(in ), optional :: bottom_level - real(dp_t), intent(inout), optional :: bottom_solve_time - - integer :: i,lbl - logical :: do_diag - real(dp_t) :: nrm, stime - - type(bl_prof_timer), save :: bpt - - call build(bpt, "mgt_v_cycle") - - lbl = 1; if ( present(bottom_level) ) lbl = bottom_level - - do_diag = .false.; if ( mgt%verbose >= 4 ) do_diag = .true. - - if ( parallel_IOProcessor() .and. do_diag) & - write(6,1000) lev - - if ( get_dim(rh) == 1 ) then - if ( do_diag ) then - nrm = norm_inf(rh) - if ( parallel_IOProcessor() ) & - print *,' DN: Norm before smooth ',nrm - end if - - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - - if ( do_diag ) then - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' DN: Norm after smooth ',nrm - end if - else if ( lev == lbl ) then - stime = parallel_wtime() - - if ( associated(mgt%bottom_mgt) ) then - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' DN: Norm before bottom ',nrm - end if - - call do_bottom_mgt(mgt, uu, rh) - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' UP: Norm after bottom ',nrm - end if - - else - call mg_tower_bottom_solve(mgt, lev, ss, uu, rh, mm) - end if - - if ( present(bottom_solve_time) ) & - bottom_solve_time = bottom_solve_time + (parallel_wtime()-stime) - else - if ( do_diag ) then - if (cyc == MG_FCycle) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - else - nrm = norm_inf(rh) - end if - end if - - if ( do_diag .and. parallel_IOProcessor() ) & - print *,' DN: Norm before smooth ',nrm - - do i = 1, nu1 - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - - if ( do_diag ) then - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' DN: Norm after smooth ',nrm - end if - - call mg_tower_restriction(mgt, mgt%dd(lev-1), mgt%cc(lev), & - mgt%mm(lev),mgt%mm(lev-1)) - - call setval(mgt%uu(lev-1), zero, all = .TRUE.) - - do i = gamma, 1, -1 - call mg_tower_v_cycle(mgt, cyc, lev-1, mgt%ss(lev-1), mgt%uu(lev-1), & - mgt%dd(lev-1), mgt%mm(lev-1), nu1, nu2, gamma, bottom_level, bottom_solve_time) - end do - - call mg_tower_prolongation(mgt, uu, lev-1) - - if ( parallel_IOProcessor() .and. do_diag) & - write(6,1000) lev - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) then - print *,' UP: Norm after interp ',nrm - end if - end if - - do i = 1, nu2 - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,' UP: Norm after smooth ',nrm - end if - - end if - - call destroy(bpt) - -1000 format('AT LEVEL ',i2) - - end subroutine mg_tower_v_cycle - - subroutine mini_cycle(mgt, lev, ss, uu, rh, mm, nu1, nu2) - - type(mg_tower), intent(inout) :: mgt - type(multifab), intent(in ) :: rh - type(multifab), intent(inout) :: uu - type(multifab), intent(in ) :: ss - type(imultifab), intent(in ) :: mm - integer, intent(in ) :: lev - integer, intent(in ) :: nu1, nu2 - - integer :: i - logical :: do_diag - real(dp_t) :: nrm - - do_diag = .false.; if ( mgt%verbose >= 4 ) do_diag = .true. - ! - ! Always relax first at the level we come in at. - ! - if ( do_diag ) then - nrm = norm_inf(rh) - if ( parallel_IOProcessor() ) & - print *,'MINI_FINE: Norm before smooth ',nrm - end if - - do i = 1, nu1 - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - - if ( do_diag ) then - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,'MINI_FINE: Norm after smooth ',nrm - end if - ! - ! If we are doing a mini V-cycle here, then we must compute the coarse residual, - ! relax at the next lower level, then interpolate the correction and relax again. - ! - if ( lev > 1 ) then - - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - - call mg_tower_restriction(mgt, mgt%dd(lev-1), mgt%cc(lev), mgt%mm(lev),mgt%mm(lev-1)) - - call setval(mgt%uu(lev-1), zero, all = .TRUE.) - - if ( do_diag ) then - nrm = norm_inf(mgt%dd(lev-1)) - if ( parallel_IOProcessor() ) & - print *,'MINI_CRSE: Norm before smooth ',nrm - end if - - do i = 1, nu1 - call mg_tower_smoother(mgt, lev-1, mgt%ss(lev-1), mgt%uu(lev-1), mgt%dd(lev-1), mgt%mm(lev-1)) - end do - - if ( do_diag ) then - call compute_defect(mgt%ss(lev-1), mgt%cc(lev-1), mgt%dd(lev-1), mgt%uu(lev-1), mgt%mm(lev-1), & - mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev-1)) - if ( parallel_IOProcessor() ) & - print *,'MINI_CRSE: Norm after smooth ',nrm - end if - - call mg_tower_prolongation(mgt, uu, lev-1) - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,'MINI_FINE: Norm before smooth ',nrm - end if - - do i = 1, nu2 - call mg_tower_smoother(mgt, lev, ss, uu, rh, mm) - end do - - if ( do_diag ) then - call compute_defect(ss, mgt%cc(lev), rh, uu, mm, mgt%stencil_type, mgt%lcross, mgt%uniform_dh) - nrm = norm_inf(mgt%cc(lev)) - if ( parallel_IOProcessor() ) & - print *,'MINI_FINE: Norm before smooth ',nrm - end if - - end if - - end subroutine mini_cycle - - subroutine mg_tower_smoother(mgt, lev, ss, uu, ff, mm) - - use cc_mg_tower_smoother_module , only: cc_mg_tower_smoother - use nodal_mg_tower_smoother_module, only: nodal_mg_tower_smoother - - integer , intent(in ) :: lev - type( mg_tower), intent(inout) :: mgt - type( multifab), intent(inout) :: uu - type( multifab), intent(in ) :: ff - type( multifab), intent(in ) :: ss - type(imultifab), intent(in ) :: mm - - if (nodal_q(ff)) then - call nodal_mg_tower_smoother(mgt, lev, ss, uu, ff, mm) - else - call cc_mg_tower_smoother(mgt, lev, ss, uu, ff, mm) - end if - - end subroutine mg_tower_smoother - -end module mg_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/ml_nd.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/ml_nd.f90 deleted file mode 100644 index 749721e32..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/ml_nd.f90 +++ /dev/null @@ -1,1654 +0,0 @@ -module ml_nd_module - - use bl_constants_module - use bl_prof_module - use mg_module - use fabio_module - use ml_layout_module - use bndry_reg_module - - implicit none - -! private :: grid_res, grid_laplace_1d, grid_laplace_2d, grid_laplace_3d - -contains - - subroutine ml_nd(mla,mgt,rh,full_soln,fine_mask,one_sided_ss,ref_ratio, & - do_diagnostics,rel_eps,abs_eps_in) - - use ml_norm_module , only : ml_norm_inf - use ml_restriction_module , only : ml_restriction, periodic_add_copy - use ml_prolongation_module, only : ml_nodal_prolongation - - type(ml_layout), intent(in ) :: mla - type(mg_tower ), intent(inout) :: mgt(:) - type( multifab), intent(inout) :: rh(:) - type( multifab), intent(inout) :: full_soln(:) - type(lmultifab), intent(in ) :: fine_mask(:) - type( multifab), intent(in ) :: one_sided_ss(2:) - integer , intent(in ) :: ref_ratio(:,:) - integer , intent(in ) :: do_diagnostics - real(dp_t) , intent(in ) :: rel_eps - - real(dp_t) , intent(in ), optional :: abs_eps_in - - integer :: nlevs - - type(multifab), allocatable :: soln(:) - type(multifab), allocatable :: uu(:) - type(multifab), allocatable :: uu_hold(:) - type(multifab), allocatable :: res(:) - type(multifab), allocatable :: temp_res(:) - - ! This is just a holder for a zero array at the same size as rh -- - ! we only need it to pass in to crse_fine_residual - type(multifab), allocatable :: zero_rh(:) - - type(bndry_reg), allocatable :: brs_flx(:) - - type(box ) :: pd,pdc - type(layout) :: la - integer :: n, dm - integer :: mglev, mglev_crse, iter - logical :: fine_converged - - real(dp_t) :: Anorm, bnorm, fac, tres, ttres, tres0, abs_eps, t1(3), t2(3) - real(dp_t) :: stime, bottom_solve_time - - character(len=3) :: number - character(len=20) :: filename - - logical nodal(get_dim(rh(1))) - - type(bl_prof_timer), save :: bpt - - call build(bpt, "ml_nd") - - dm = get_dim(rh(1)) - stime = parallel_wtime() - nodal = .True. - nlevs = mla%nlevel - bottom_solve_time = zero - - if (nghost(rh(nlevs)) .ne. 1) & - call bl_error("ml_nd requires one ghost cell for the RHS"); - - if ( present(abs_eps_in) ) then - abs_eps = abs_eps_in - else - abs_eps = mgt(nlevs)%abs_eps - end if - - allocate(soln(nlevs), uu(nlevs), uu_hold(2:nlevs-1), res(nlevs)) - allocate(temp_res(nlevs)) - allocate(brs_flx(2:nlevs)) - allocate(zero_rh(2:nlevs)) - - do n = 2,nlevs-1 - la = mla%la(n) - call multifab_build( uu_hold(n), la, 1, 1, nodal) - call setval( uu_hold(n), ZERO,all=.true.) - end do - - do n = nlevs, 1, -1 - - la = mla%la(n) - call multifab_build( soln(n), la, 1, 1, nodal) - call multifab_build( uu(n), la, 1, 1, nodal) - call multifab_build( res(n), la, 1, 1, nodal) - call multifab_build(temp_res(n), la, 1, 1, nodal) - call setval( soln(n), ZERO,all=.true.) - call setval( uu(n), ZERO,all=.true.) - call setval( res(n), ZERO,all=.true.) - call setval(temp_res(n), ZERO,all=.true.) - - if ( n == 1 ) exit - - call multifab_build(zero_rh(n), la, 1, nghost(rh(n)), nodal) - call setval(zero_rh(n), ZERO,all=.true.) - - ! Build the (coarse resolution) flux registers to be used in computing - ! the residual at a non-finest AMR level. - - pdc = layout_get_pd(mla%la(n-1)) - call bndry_reg_rr_build_nd(brs_flx(n), la, ref_ratio(n-1,:), pdc, nodal) - - end do - ! - ! Let's elide some reductions by doing these reductions together. - ! - bnorm = ml_norm_inf(rh,fine_mask,local=.true.) - - Anorm = stencil_norm(mgt(nlevs)%ss(mgt(nlevs)%nlevels),local=.true.) - do n = 1, nlevs-1 - Anorm = max(stencil_norm(mgt(n)%ss(mgt(n)%nlevels),fine_mask(n),local=.true.), Anorm) - end do - - do n = nlevs,1,-1 - mglev = mgt(n)%nlevels - call compute_defect(mgt(n)%ss(mglev),res(n),rh(n),full_soln(n),mgt(n)%mm(mglev), & - mgt(n)%stencil_type, mgt(n)%lcross, mgt(n)%uniform_dh) - end do - - do n = 1,nlevs - call multifab_copy(rh(n),res(n),ng=nghost(rh(n))) - end do - - t1(1) = bnorm - t1(2) = Anorm - t1(3) = ml_norm_inf(rh,fine_mask,local=.true.) - - call parallel_reduce(t2, t1, MPI_MAX) - - bnorm = t2(1) - Anorm = t2(2) - tres0 = t2(3) - - if ( parallel_IOProcessor() .and. mgt(nlevs)%verbose > 0 ) then - write(unit=*, & - fmt='("F90mg: Initial rhs = ",g15.8)') bnorm - write(unit=*, & - fmt='("F90mg: Initial residual (resid0) = ",g15.8)') tres0 - end if - - bnorm = max(bnorm, tres0) - ! wqz. Otherwise, we may sometimes have trouble if tres0 is much larger than bnorm - - ! **************************************************************************** - - fine_converged = .false. - - if ( ml_converged(res, fine_mask, bnorm, & - rel_eps, abs_eps, mgt(nlevs)%verbose) ) then - if ( parallel_IOProcessor() .and. mgt(nlevs)%verbose > 0 ) & - write(unit=*, fmt='("F90mg: No iterations needed ")') - - else ! Not already converged - - do iter = 1, mgt(nlevs)%max_iter - - if ( (iter .eq. 1) .or. fine_converged ) then - if ( ml_converged(res, fine_mask, bnorm, rel_eps, abs_eps, mgt(nlevs)%verbose) ) exit - end if - - ! Set: uu = 0 - do n = 1,nlevs - call setval(uu(n), ZERO, all=.true.) - end do - - ! Set: uu_hold = 0 - do n = 2,nlevs-1 - call setval(uu_hold(n), ZERO, all=.true.) - end do - - ! Down the V-cycle - do n = nlevs,1,-1 - - mglev = mgt(n)%nlevels - - if ( do_diagnostics == 1 ) then - tres = norm_inf(res(n)) - if ( parallel_ioprocessor() ) then - print *,'DWN: RES BEFORE GSRB AT LEVEL ',n, tres - end if - end if - - ! Relax ... - if (n > 1) then - call mini_cycle(mgt(n), mglev, mgt(n)%ss(mglev), & - uu(n), res(n), mgt(n)%mm(mglev), mgt(n)%nu1, mgt(n)%nu2) - else - call mg_tower_cycle(mgt(n), mgt(n)%cycle_type, mglev, mgt(n)%ss(mglev), & - uu(n), res(n), mgt(n)%mm(mglev), mgt(n)%nu1, mgt(n)%nu2, & - bottom_solve_time = bottom_solve_time) - end if - - ! Add: soln += uu - call plus_plus(soln(n),uu(n)) - - if (n > 1) then - mglev_crse = mgt(n-1)%nlevels - - ! Compute COARSE Res = Rh - Lap(Soln) - call compute_defect(mgt(n-1)%ss(mglev_crse),res(n-1), & - rh(n-1),soln(n-1),mgt(n-1)%mm(mglev_crse), & - mgt(n-1)%stencil_type, mgt(n-1)%lcross, mgt(n-1)%uniform_dh) - - if ( dm .eq. 3 ) then - fac = (8.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - else if ( dm .eq. 2 ) then - fac = (4.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - end if - - ! Compute FINE Res = Res - Lap(uu) - mglev = mgt(n)%nlevels - call compute_defect(mgt(n)%ss(mglev), temp_res(n), & - res(n),uu(n),mgt(n)%mm(mglev), & - mgt(n)%stencil_type, mgt(n)%lcross, mgt(n)%uniform_dh) - call multifab_copy(res(n),temp_res(n),ng=nghost(res(n))) - - if ( do_diagnostics == 1 ) then - tres = norm_inf(res(n)) - if ( parallel_ioprocessor() ) & - print *,'DWN: RES AFTER GSRB AT LEVEL ',n, tres - end if - - ! Restrict FINE Res to COARSE Res - call ml_restriction(res(n-1), res(n), mgt(n)%mm(mglev),& - mgt(n-1)%mm(mglev_crse), ref_ratio(n-1,:)) - - ! Compute CRSE-FINE Res = Rh - Lap(Soln) - pdc = layout_get_pd(mla%la(n-1)) - call crse_fine_residual_nodal(n,mgt,brs_flx(n),res(n-1),zero_rh(n),temp_res(n),temp_res(n-1), & - soln(n-1),soln(n),one_sided_ss(n),ref_ratio(n-1,:),pdc) - - ! Copy u_hold = uu - if (n < nlevs) call multifab_copy(uu_hold(n),uu(n),ng=nghost(uu(n))) - - ! Set: uu = 0 - call setval(uu(n),ZERO,all=.true.) - - if ( dm .eq. 3 ) then - fac = 1.0_dp_t / (8.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - else if ( dm .eq. 2 ) then - fac = 1.0_dp_t / (4.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - end if - - else - - if (do_diagnostics == 1 ) then - call compute_defect(mgt(n)%ss(mglev),temp_res(n), res(n),uu(n),mgt(n)%mm(mglev), & - mgt(n)%stencil_type, mgt(n)%lcross, mgt(n)%uniform_dh) - tres = norm_inf(temp_res(n)) - if ( parallel_ioprocessor() ) then - print *,'DWN: RES AFTER GSRB AT LEVEL ',n, tres - end if - end if - - end if - - end do - - ! Back up the V-cycle - do n = 2, nlevs - - pd = layout_get_pd(mla%la(n)) - mglev = mgt(n)%nlevels - - ! Interpolate uu from coarser level - if (iter == 1) call plus_plus(uu(n-1), full_soln(n-1)) - call ml_nodal_prolongation(uu(n), uu(n-1), ref_ratio(n-1,:)) - if (iter == 1) call sub_sub(uu(n-1), full_soln(n-1)) - - ! Subtract: uu -= full_soln - ! Must do this in order to remove interpolated full_soln... - if (iter == 1) call sub_sub(uu(n),full_soln(n)) - - ! Add: soln += uu - call plus_plus(soln(n), uu(n), nghost(uu(n))) - - ! Add: uu_hold += uu - if (n < nlevs) call plus_plus(uu_hold(n), uu(n), nghost(uu(n))) - - ! Compute Res = Res - Lap(uu) - call compute_defect(mgt(n)%ss(mglev),temp_res(n),res(n),uu(n),mgt(n)%mm(mglev), & - mgt(n)%stencil_type, mgt(n)%lcross, mgt(n)%uniform_dh) - call multifab_copy(res(n),temp_res(n),ng=nghost(res(n))) - - if ( do_diagnostics == 1 ) then - tres = norm_inf(res(n)) - if ( parallel_ioprocessor() ) then - print *,'UP : RES BEFORE GSRB AT LEVEL ',n, tres - end if - end if - - ! Set: uu = 0 - call setval(uu(n),ZERO,all=.true.) - - ! Relax ... - call mini_cycle(mgt(n), mglev, mgt(n)%ss(mglev), & - uu(n), res(n), mgt(n)%mm(mglev), mgt(n)%nu1, mgt(n)%nu2) - - ! Compute Res = Res - Lap(uu) - call compute_defect(mgt(n)%ss(mglev),temp_res(n),res(n),uu(n),mgt(n)%mm(mglev), & - mgt(n)%stencil_type, mgt(n)%lcross, mgt(n)%uniform_dh) - call multifab_copy(res(n),temp_res(n),ng=nghost(res(n))) - - if ( do_diagnostics == 1 ) then - tres = norm_inf(res(n)) - if ( parallel_ioprocessor() ) then - print *,'UP : RES AFTER GSRB AT LEVEL ',n, tres - if (n == nlevs) print *,' ' - end if - end if - - ! Add: soln += uu - call plus_plus(soln(n), uu(n), nghost(uu(n))) - - ! Add: uu += uu_hold so that it will be interpolated too. - if (n < nlevs) call plus_plus(uu(n), uu_hold(n), nghost(uu(n))) - - end do - - ! Inject the solution to the coarser grids. - do n = nlevs,2,-1 - mglev = mgt(n)%nlevels - mglev_crse = mgt(n-1)%nlevels - call ml_restriction(soln(n-1), soln(n), mgt(n)%mm(mglev), & - mgt(n-1)%mm(mglev_crse), ref_ratio(n-1,:), inject = .true.) - end do - - do n = 1,nlevs - call multifab_fill_boundary(soln(n), cross = mgt(n)%lcross) - end do - - ! Optimization so don't have to do multilevel convergence test each time - - ! Compute the residual on just the finest level - n = nlevs - mglev = mgt(n)%nlevels - call compute_defect(mgt(n)%ss(mglev),res(n),rh(n),soln(n),mgt(n)%mm(mglev), & - mgt(n)%stencil_type, mgt(n)%lcross, mgt(n)%uniform_dh) - - if ( ml_fine_converged(res, bnorm, rel_eps, abs_eps) ) then - - fine_converged = .true. - - ! Compute the residual on every level - do n = 1,nlevs-1 - mglev = mgt(n)%nlevels - call compute_defect(mgt(n)%ss(mglev),res(n),rh(n),soln(n),mgt(n)%mm(mglev), & - mgt(n)%stencil_type, mgt(n)%lcross, mgt(n)%uniform_dh) - end do - - do n = nlevs,2,-1 - ! Restrict the finer residual onto the coarser grid - mglev = mgt(n )%nlevels - mglev_crse = mgt(n-1)%nlevels - if ( dm .eq. 3 ) then - fac = (8.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - else if ( dm .eq. 2 ) then - fac = (4.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - end if - call ml_restriction(res(n-1), res(n), mgt(n)%mm(mglev),& - mgt(n-1)%mm(mglev_crse), ref_ratio(n-1,:)) - - ! Compute the coarse-fine residual at coarse-fine nodes - pdc = layout_get_pd(mla%la(n-1)) - call crse_fine_residual_nodal(n,mgt,brs_flx(n),res(n-1), & - zero_rh(n),temp_res(n),temp_res(n-1), & - soln(n-1),soln(n),one_sided_ss(n),ref_ratio(n-1,:),pdc) - if ( dm .eq. 3 ) then - fac = 1.0_dp_t / (8.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - else if ( dm .eq. 2 ) then - fac = 1.0_dp_t / (4.0_dp_t)**(ref_ratio(n-1,1)/2) - call multifab_mult_mult_s(res(n-1),fac,nghost(res(n-1))) - end if - end do - - if ( mgt(nlevs)%verbose > 1 ) then - do n = 1,nlevs - ttres = norm_inf(res(n),local=.true.) - call parallel_reduce(tres, ttres, MPI_MAX, proc = parallel_IOProcessorNode()) - if ( parallel_IOProcessor() ) then - write(unit=*, fmt='("F90mg: Iteration ",i3," Lev ",i1," resid/resid0 = ",g15.8)') & - iter,n,tres/tres0 - end if - end do - end if - - else - - fine_converged = .false. - if ( mgt(nlevs)%verbose > 1 ) then - - if ( .false. ) then - ! - ! Some debugging code I want to keep around for a while. - ! I don't want to have to recreate this all the time :-) - ! - write(number,fmt='(i3.3)') iter - filename = 'res_fine_iter=' // number - call fabio_write(res(nlevs), 'debug', trim(filename)) - end if - - ttres = norm_inf(res(nlevs),local=.true.) - call parallel_reduce(tres, ttres, MPI_MAX, proc = parallel_IOProcessorNode()) - if ( parallel_IOProcessor() ) then - write(unit=*, fmt='("F90mg: Iteration ",i3," Fine resid/resid0 = ",g15.8)') iter,tres/tres0 - end if - end if - - end if - - end do - - iter = iter-1 - if (iter < mgt(nlevs)%max_iter) then - if ( mgt(nlevs)%verbose > 0 ) then - ! - ! Consolidate these reductions. - ! - t1(1) = ml_norm_inf(res,fine_mask,local=.true.) - t1(2) = (parallel_wtime() - stime) - t1(3) = bottom_solve_time - - call parallel_reduce(t2, t1, MPI_MAX, proc = parallel_IOProcessorNode()) - - if ( parallel_IOProcessor() ) then - if ( tres0 .gt. 0.0_dp_t) then - write(unit=*, fmt='("F90mg: Final Iter. ",i3," resid/resid0 = ",g15.8)') iter,t2(1)/tres0 - write(unit=*, fmt='("F90mg: Solve time: ",g13.6, " Bottom Solve time: ", g13.6)') t2(2), t2(3) - write(unit=*, fmt='("")') - else - write(unit=*, fmt='("F90mg: Final Iter. ",i3," resid/resid0 = ",g15.8)') iter,0.0_dp_t - write(unit=*, fmt='("F90mg: Solve time: ",g13.6, " Bottom Solve time: ", g13.6)') t2(2), t2(3) - write(unit=*, fmt='("")') - end if - end if - end if - else - if (mgt(nlevs)%abort_on_max_iter) then - call bl_error("Multigrid Solve: failed to converge in max_iter iterations") - end if - end if - - ! Add: full_soln += soln - do n = 1,nlevs - call plus_plus(full_soln(n),soln(n)) - end do - - end if - - ! **************************************************************************** - - do n = 2,nlevs-1 - call multifab_destroy(uu_hold(n)) - end do - - do n = nlevs, 1, -1 - call multifab_destroy( soln(n)) - call multifab_destroy( uu(n)) - call multifab_destroy( res(n)) - call multifab_destroy(temp_res(n)) - if ( n == 1 ) exit - call multifab_destroy( zero_rh(n)) - call bndry_reg_destroy(brs_flx(n)) - end do - - call destroy(bpt) - - contains - - subroutine crse_fine_residual_nodal(n,mgt,brs_flx,crse_res,fine_rhs,temp_res,temp_crse_res, & - crse_soln,fine_soln,one_sided_ss,ref_ratio,pdc) - - use nodal_interface_stencil_module , only : ml_crse_contrib, ml_fine_contrib - - integer , intent(in ) :: n - type(mg_tower) , intent(inout) :: mgt(:) - type(bndry_reg), intent(inout) :: brs_flx - type(multifab) , intent(inout) :: crse_res - type(multifab) , intent(in ) :: fine_rhs - type(multifab) , intent(inout) :: temp_res - type(multifab) , intent(inout) :: temp_crse_res - type(multifab) , intent(inout) :: crse_soln - type(multifab) , intent(inout) :: fine_soln - type(multifab) , intent(in ) :: one_sided_ss - integer , intent(in ) :: ref_ratio(:) - type(box) , intent(in ) :: pdc - - integer :: i,dm,mglev_crse,mglev_fine - - mglev_crse = mgt(n-1)%nlevels - mglev_fine = mgt(n )%nlevels - dm = get_dim(temp_res) - - ! Compute the fine contributions at faces, edges and corners. - - ! First compute a residual which only takes contributions from the - ! grid on which it is calculated. - - if (mgt(n)%lcross) then - call grid_res(one_sided_ss,temp_res, & - fine_rhs,fine_soln,mgt(n)%mm(mglev_fine),mgt(n)%face_type, & - mgt(n)%lcross, mgt(n)%uniform_dh) - else - call grid_res(mgt(n)%ss(mglev_fine),temp_res, & - fine_rhs,fine_soln,mgt(n)%mm(mglev_fine),mgt(n)%face_type, & - mgt(n)%lcross, mgt(n)%uniform_dh) - end if - - ! Zero out the flux registers which will hold the fine contributions - call bndry_reg_setval(brs_flx, ZERO, all = .true.) - - do i = 1,dm - call ml_fine_contrib(brs_flx%bmf(i,0), & - temp_res,mgt(n)%mm(mglev_fine),ref_ratio,pdc,-i) - call ml_fine_contrib(brs_flx%bmf(i,1), & - temp_res,mgt(n)%mm(mglev_fine),ref_ratio,pdc,+i) - end do - -! Compute the crse contributions at edges and corners and add to fine contributions -! in temp_crse_res (need to do this in a temporary for periodic issues) - call setval(temp_crse_res,ZERO,all=.true.) - do i = 1,dm - call ml_crse_contrib(temp_crse_res, brs_flx%bmf(i,0), crse_soln, & - mgt(n-1)%ss(mgt(n-1)%nlevels), & - mgt(n-1)%mm(mglev_crse), & - mgt(n )%mm(mglev_fine), & - pdc,ref_ratio, -i) - call ml_crse_contrib(temp_crse_res, brs_flx%bmf(i,1), crse_soln, & - mgt(n-1)%ss(mgt(n-1)%nlevels), & - mgt(n-1)%mm(mglev_crse), & - mgt(n )%mm(mglev_fine), & - pdc,ref_ratio, +i) - end do - -! Add to res(n-1). - call plus_plus(crse_res,temp_crse_res) - - call periodic_add_copy(crse_res,temp_crse_res,synced=.true.) - -! Clear temp_crse_res (which is temp_res(n-1) from calling routine) just in case... - call setval(temp_crse_res,ZERO,all=.true.) - - end subroutine crse_fine_residual_nodal - - function ml_fine_converged(res, bnorm, rel_eps, abs_eps) result(r) - logical :: r - type(multifab), intent(in) :: res(:) - real(dp_t), intent(in) :: rel_eps, abs_eps, bnorm - real(dp_t) :: ni_res - integer :: nlevs - nlevs = size(res) - ni_res = norm_inf(res(nlevs)) - r = ( ni_res <= rel_eps*(bnorm) .or. ni_res <= abs_eps ) - end function ml_fine_converged - - function ml_converged(res, mask, bnorm, rel_eps, abs_eps, verbose) result(r) - use ml_norm_module, only : ml_norm_inf - logical :: r - integer :: verbose - type(multifab), intent(in) :: res(:) - type(lmultifab), intent(in) :: mask(:) - real(dp_t), intent(in) :: rel_eps, abs_eps, bnorm - real(dp_t) :: ni_res - ni_res = ml_norm_inf(res, mask) - r = ( ni_res <= rel_eps*(bnorm) .or. ni_res <= abs_eps ) - if ( r .and. parallel_IOProcessor() .and. verbose > 1) then - if (ni_res <= rel_eps*bnorm) then - print *,'Converged res < rel_eps*bnorm ' - else if (ni_res <= abs_eps) then - print *,'Converged res < abs_eps ' - end if - end if - end function ml_converged - - end subroutine ml_nd - - subroutine grid_res(ss, dd, ff, uu, mm, face_type, lcross, uniform_dh) - - type(multifab), intent(in) :: ff, ss - type(multifab), intent(inout) :: dd, uu - type(imultifab), intent(in) :: mm - integer, intent(in) :: face_type(:,:,:) - logical, intent(in) :: lcross - logical, intent(in) :: uniform_dh - - integer :: i, n - real(kind=dp_t), pointer :: dp(:,:,:,:) - real(kind=dp_t), pointer :: fp(:,:,:,:) - real(kind=dp_t), pointer :: up(:,:,:,:) - real(kind=dp_t), pointer :: sp(:,:,:,:) - integer , pointer :: mp(:,:,:,:) - integer :: dm,nodal_ng - type(bl_prof_timer), save :: bpt - - call build(bpt, "grid_res") - - nodal_ng = 0; if ( nodal_q(uu) ) nodal_ng = 1 - - dm = get_dim(uu) - - call multifab_fill_boundary(uu, cross = lcross) - - do i = 1, nfabs(uu) - dp => dataptr(dd, i) - fp => dataptr(ff, i) - up => dataptr(uu, i) - sp => dataptr(ss, i) - mp => dataptr(mm, i) - do n = 1, ncomp(uu) - select case(dm) - case (1) - call grid_laplace_1d(sp(:,:,1,1), dp(:,1,1,n), fp(:,1,1,n), up(:,1,1,n), & - mp(:,1,1,1),nghost(uu)) - case (2) - call grid_laplace_2d(sp(:,:,:,1), dp(:,:,1,n), fp(:,:,1,n), up(:,:,1,n), & - mp(:,:,1,1), nghost(uu), face_type(i,:,:)) - case (3) - call grid_laplace_3d(sp(:,:,:,:), dp(:,:,:,n), fp(:,:,:,n), up(:,:,:,n), & - mp(:,:,:,1), nghost(uu), face_type(i,:,:), uniform_dh) - end select - end do - end do - - call destroy(bpt) - - end subroutine grid_res - - subroutine grid_laplace_1d(ss, dd, ff, uu, mm, ng) - - use impose_neumann_bcs_module - - integer , intent(in ) :: ng - real (kind = dp_t), intent(in ) :: ss(0:,:) - real (kind = dp_t), intent(inout) :: dd(0:) - real (kind = dp_t), intent(in ) :: ff(0:) - integer, intent(in ) :: mm(:) - real (kind = dp_t), intent(inout) :: uu(1-ng:) - - integer :: i,nx,lo(1) - nx = size(ss,dim=2)-1 - - lo = 1 - call impose_neumann_bcs_1d(uu,mm,lo,ng) - - i = 1 - dd(i) = HALF*ff(i) - (ss(0,i)*uu(i) + ss(1,i)*(uu(i+1)-uu(i))) - - do i = 2,nx - dd(i) = ff(i) - & - (ss(0,i)*uu(i) + ss(1,i) * uu(i+1) + ss(2,i) * uu(i-1)) - end do - - i = nx+1 - dd(i) = HALF*ff(i) - (ss(2,i)*(uu(i-1)-uu(i))) - - end subroutine grid_laplace_1d - - subroutine grid_laplace_2d(ss, dd, ff, uu, mm, ng, face_type) - - use bc_module - use impose_neumann_bcs_module - - integer , intent(in ) :: ng - real (kind = dp_t), intent(in ) :: ss(0:,:,:) - real (kind = dp_t), intent(inout) :: dd(0:,0:) - real (kind = dp_t), intent(in ) :: ff(0:,0:) - real (kind = dp_t), intent(inout) :: uu(1-ng:,1-ng:) - integer, intent(in ) :: mm(:,:) - integer, intent(in ) :: face_type(:,:) - integer :: i,j,nx,ny,lo(2) - integer :: istart,iend,jstart,jend - - nx = size(ss,dim=2)-1 - ny = size(ss,dim=3)-1 - - lo = 1 - call impose_neumann_bcs_2d(uu,mm,lo,ng) - - if (face_type(1,1) == BC_NEU) then - istart = 1 - else - istart = 2 - end if - if (face_type(1,2) == BC_NEU) then - iend = nx+1 - else - iend = nx - end if - if (face_type(2,1) == BC_NEU) then - jstart = 1 - else - jstart = 2 - end if - if (face_type(2,2) == BC_NEU) then - jend = ny+1 - else - jend = ny - end if - - if (size(ss,dim=1) .eq. 9) then -! Corners - i = 1 - j = 1 - dd(i,j) = ss(8,i,j)*(uu(i+1,j+1)+HALF*uu(i,j+1)+HALF*uu(i+1,j)-TWO*uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - - i = 1 - j = ny+1 - dd(i,j) = ss(3,i,j)*(uu(i+1,j-1)+HALF*uu(i,j-1)+HALF*uu(i+1,j)-TWO*uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - - i = nx+1 - j = 1 - dd(i,j) = ss(6,i,j)*(uu(i-1,j+1)+HALF*uu(i,j+1)+HALF*uu(i-1,j)-TWO*uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - - i = nx+1 - j = ny+1 - dd(i,j) = ss(1,i,j)*(uu(i-1,j-1)+HALF*uu(i,j-1)+HALF*uu(i-1,j)-TWO*uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - -! Lo-x edge - i = 1 - do j = jstart,jend - dd(i,j) = ss(3,i,j)*(uu(i+1,j-1)+HALF*uu(i,j-1)+HALF*uu(i+1,j)-TWO*uu(i,j)) & - +ss(8,i,j)*(uu(i+1,j+1)+HALF*uu(i,j+1)+HALF*uu(i+1,j)-TWO*uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Hi-x edge - i = nx+1 - do j = jstart,jend - dd(i,j) = ss(1,i,j)*(uu(i-1,j-1)+HALF*uu(i,j-1)+HALF*uu(i-1,j)-TWO*uu(i,j)) & - +ss(6,i,j)*(uu(i-1,j+1)+HALF*uu(i,j+1)+HALF*uu(i-1,j)-TWO*uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Lo-y edge - j = 1 - do i = istart,iend - dd(i,j) = ss(6,i,j)*(uu(i-1,j+1)+HALF*uu(i,j+1)+HALF*uu(i-1,j)-TWO*uu(i,j)) & - +ss(8,i,j)*(uu(i+1,j+1)+HALF*uu(i,j+1)+HALF*uu(i+1,j)-TWO*uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Hi-y edge - j = ny+1 - do i = istart,iend - dd(i,j) = ss(1,i,j)*(uu(i-1,j-1)+HALF*uu(i,j-1)+HALF*uu(i-1,j)-TWO*uu(i,j)) & - +ss(3,i,j)*(uu(i+1,j-1)+HALF*uu(i,j-1)+HALF*uu(i+1,j)-TWO*uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Interior - do j = jstart,jend - do i = istart,iend - dd(i,j) = ss(0,i,j)*uu(i,j) + ss(1,i,j) * uu(i-1,j-1) & - + ss(2,i,j) * uu(i ,j-1) & - + ss(3,i,j) * uu(i+1,j-1) & - + ss(4,i,j) * uu(i-1,j ) & - + ss(5,i,j) * uu(i+1,j ) & - + ss(6,i,j) * uu(i-1,j+1) & - + ss(7,i,j) * uu(i ,j+1) & - + ss(8,i,j) * uu(i+1,j+1) - dd(i,j) = ff(i,j) - dd(i,j) - end do - end do - - else if (size(ss,dim=1) .eq. 5) then - -! Corners - i = 1 - j = 1 - dd(i,j) = ss(1,i,j)*(uu(i+1,j)-uu(i,j)) + ss(3,i,j)*(uu(i,j+1)-uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - - i = 1 - j = ny+1 - dd(i,j) = ss(1,i,j)*(uu(i+1,j)-uu(i,j)) + ss(4,i,j)*(uu(i,j-1)-uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - - i = nx+1 - j = 1 - dd(i,j) = ss(2,i,j)*(uu(i-1,j)-uu(i,j)) + ss(3,i,j)*(uu(i,j+1)-uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - - i = nx+1 - j = ny+1 - dd(i,j) = ss(2,i,j)*(uu(i-1,j)-uu(i,j)) + ss(4,i,j)*(uu(i,j-1)-uu(i,j)) - dd(i,j) = FOURTH*ff(i,j) - dd(i,j) - -! Lo-x edge - i = 1 - do j = jstart,jend - dd(i,j) = ss(1,i,j)*(uu(i+1,j)-uu(i,j)) & - +ss(3,i,j)*(uu(i,j+1)-uu(i,j)) & - +ss(4,i,j)*(uu(i,j-1)-uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Hi-x edge - i = nx+1 - do j = jstart,jend - dd(i,j) = ss(2,i,j)*(uu(i-1,j)-uu(i,j)) & - +ss(3,i,j)*(uu(i,j+1)-uu(i,j)) & - +ss(4,i,j)*(uu(i,j-1)-uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Lo-y edge - j = 1 - do i = istart,iend - dd(i,j) = ss(3,i,j)*(uu(i,j+1)-uu(i,j)) & - +ss(1,i,j)*(uu(i+1,j)-uu(i,j)) & - +ss(2,i,j)*(uu(i-1,j)-uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Hi-y edge - j = ny+1 - do i = istart,iend - dd(i,j) = ss(4,i,j)*(uu(i,j-1)-uu(i,j)) & - +ss(1,i,j)*(uu(i+1,j)-uu(i,j)) & - +ss(2,i,j)*(uu(i-1,j)-uu(i,j)) - dd(i,j) = HALF*ff(i,j) - dd(i,j) - end do - -! Interior - do j = jstart,jend - do i = istart,iend - dd(i,j) = ss(0,i,j)*uu(i,j) + ss(1,i,j) * uu(i+1,j ) & - + ss(2,i,j) * uu(i-1,j ) & - + ss(3,i,j) * uu(i ,j+1) & - + ss(4,i,j) * uu(i ,j-1) - dd(i,j) = ff(i,j) - dd(i,j) - end do - end do - - end if - - end subroutine grid_laplace_2d - - subroutine grid_laplace_3d(ss, dd, ff, uu, mm, ng, face_type, uniform_dh) - use bc_module - use impose_neumann_bcs_module - integer, intent(in) :: ng - real (kind = dp_t), intent(in ) :: ff(0:,0:,0:) - real (kind = dp_t), intent(inout) :: uu(1-ng:,1-ng:,1-ng:) - real (kind = dp_t), intent(inout) :: dd(0:,0:,0:) - real (kind = dp_t), intent(in ) :: ss(0:,:,:,:) - integer, intent(in ) :: mm(:,:,:) - integer, intent(in ) :: face_type(:,:) - logical, intent(in) :: uniform_dh - - integer :: i, j, k, lo(3) - integer :: istart, iend, jstart, jend, kstart, kend - integer :: nx, ny, nz - - nx = size(ss,dim=2)-1 - ny = size(ss,dim=3)-1 - nz = size(ss,dim=4)-1 - - lo = 1 - call impose_neumann_bcs_3d(uu,mm,lo,ng) - - if (face_type(1,1) == BC_NEU) then - istart = 1 - else - istart = 2 - end if - if (face_type(1,2) == BC_NEU) then - iend = nx+1 - else - iend = nx - end if - if (face_type(2,1) == BC_NEU) then - jstart = 1 - else - jstart = 2 - end if - if (face_type(2,2) == BC_NEU) then - jend = ny+1 - else - jend = ny - end if - if (face_type(3,1) == BC_NEU) then - kstart = 1 - else - kstart = 2 - end if - if (face_type(3,2) == BC_NEU) then - kend = nz+1 - else - kend = nz - end if - - if (size(ss,dim=1) .eq. 27 .or. size(ss,dim=1) .eq. 21) then - ! - ! Corners - ! - i = 1 - j = 1 - k = 1 - dd(i,j,k) = ss(20,i,j,k)*(uu(i+1,j+1,k+1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = 1 - j = ny+1 - k = 1 - dd(i,j,k) = ss(15,i,j,k)*(uu(i+1,j-1,k+1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = 1 - k = 1 - dd(i,j,k) = ss(18,i,j,k)*(uu(i-1,j+1,k+1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = ny+1 - k = 1 - dd(i,j,k) = ss(13,i,j,k)*(uu(i-1,j-1,k+1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k+1) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = 1 - j = 1 - k = nz+1 - dd(i,j,k) = ss( 8,i,j,k)*(uu(i+1,j+1,k-1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = 1 - j = ny+1 - k = nz+1 - dd(i,j,k) = ss( 3,i,j,k)*(uu(i+1,j-1,k-1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = 1 - k = nz+1 - dd(i,j,k) = ss( 6,i,j,k)*(uu(i-1,j+1,k-1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = ny+1 - k = nz+1 - dd(i,j,k) = ss( 1,i,j,k)*(uu(i-1,j-1,k-1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - -! Lo-x / Lo-y edge - i = 1 - j = 1 - do k = kstart,kend - dd(i,j,k) = ss(20,i,j,k)*(uu(i+1,j+1,k+1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 8,i,j,k)*(uu(i+1,j+1,k-1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Lo-y edge - ! - i = nx+1 - j = 1 - do k = kstart,kend - dd(i,j,k) = ss(18,i,j,k)*(uu(i-1,j+1,k+1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 6,i,j,k)*(uu(i-1,j+1,k-1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x / Hi-y edge - ! - i = 1 - j = ny+1 - do k = kstart,kend - dd(i,j,k) = ss(15,i,j,k)*(uu(i+1,j-1,k+1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 3,i,j,k)*(uu(i+1,j-1,k-1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Hi-y edge - ! - i = nx+1 - j = ny+1 - do k = kstart,kend - dd(i,j,k) = ss(13,i,j,k)*(uu(i-1,j-1,k+1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k+1) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 1,i,j,k)*(uu(i-1,j-1,k-1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x / Lo-z edge - ! - i = 1 - k = 1 - do j = jstart,jend - dd(i,j,k) = ss(20,i,j,k)*(uu(i+1,j+1,k+1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(15,i,j,k)*(uu(i+1,j-1,k+1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Lo-z edge - ! - i = nx+1 - k = 1 - do j = jstart,jend - dd(i,j,k) = ss(18,i,j,k)*(uu(i-1,j+1,k+1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(13,i,j,k)*(uu(i-1,j-1,k+1) + uu(i-1,j ,k+1) & - +uu(i-1,j-1,k ) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x / Hi-z edge - ! - i = 1 - k = nz+1 - do j = jstart,jend - dd(i,j,k) = ss( 8,i,j,k)*(uu(i+1,j+1,k-1) + uu(i+1,j ,k-1) & - +uu(i+1,j+1,k ) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 3,i,j,k)*(uu(i+1,j-1,k-1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Hi-z edge - ! - i = nx+1 - k = nz+1 - do j = jstart,jend - dd(i,j,k) = ss( 6,i,j,k)*(uu(i-1,j+1,k-1) + uu(i-1,j ,k-1) & - +uu(i-1,j+1,k ) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 1,i,j,k)*(uu(i-1,j-1,k-1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-y / Lo-z edge - ! - j = 1 - k = 1 - do i = istart,iend - dd(i,j,k) = ss(20,i,j,k)*(uu(i+1,j+1,k+1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(18,i,j,k)*(uu(i-1,j+1,k+1) + uu(i-1,j+1,k ) & - +uu(i ,j+1,k+1) + uu(i-1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-y / Lo-z edge - ! - j = ny+1 - k = 1 - do i = istart,iend - dd(i,j,k) = ss(15,i,j,k)*(uu(i+1,j-1,k+1) + uu(i+1,j-1,k ) & - +uu(i ,j-1,k+1) + uu(i+1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(13,i,j,k)*(uu(i-1,j-1,k+1) + uu(i ,j-1,k+1) & - +uu(i-1,j-1,k ) + uu(i-1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-y / Hi-z edge - ! - j = 1 - k = nz+1 - do i = istart,iend - dd(i,j,k) = ss( 8,i,j,k)*(uu(i+1,j+1,k-1) + uu(i+1,j ,k-1) & - +uu(i+1,j+1,k ) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 6,i,j,k)*(uu(i-1,j+1,k-1) + uu(i-1,j+1,k ) & - +uu(i ,j+1,k-1) + uu(i-1,j ,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-y / Hi-z edge - ! - j = ny+1 - k = nz+1 - do i = istart,iend - dd(i,j,k) = ss( 3,i,j,k)*(uu(i+1,j-1,k-1) + uu(i ,j-1,k-1) & - +uu(i+1,j-1,k ) + uu(i+1,j ,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 1,i,j,k)*(uu(i-1,j-1,k-1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x face - ! - i = 1 - !$OMP PARALLEL DO PRIVATE(j,k) - do k = kstart,kend - do j = jstart,jend - dd(i,j,k) = ss(20,i,j,k)*(uu(i+1,j+1,k+1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 8,i,j,k)*(uu(i+1,j+1,k-1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss(15,i,j,k)*(uu(i+1,j-1,k+1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 3,i,j,k)*(uu(i+1,j-1,k-1) + uu(i+1,j-1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Hi-x face - ! - i = nx+1 - !$OMP PARALLEL DO PRIVATE(j,k) - do k = kstart,kend - do j = jstart,jend - dd(i,j,k) = ss(18,i,j,k)*(uu(i-1,j+1,k+1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(13,i,j,k)*(uu(i-1,j-1,k+1) + uu(i-1,j ,k+1) & - +uu(i-1,j-1,k ) + uu(i ,j-1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 6,i,j,k)*(uu(i-1,j+1,k-1) + uu(i-1,j ,k-1) & - +uu(i-1,j+1,k ) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 1,i,j,k)*(uu(i-1,j-1,k-1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo-y face - ! - j = 1 - !$OMP PARALLEL DO PRIVATE(i,k) - do k = kstart,kend - do i = istart,iend - dd(i,j,k) = ss(20,i,j,k)*(uu(i+1,j+1,k+1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 8,i,j,k)*(uu(i+1,j+1,k-1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k-1) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss(18,i,j,k)*(uu(i-1,j+1,k+1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 6,i,j,k)*(uu(i-1,j+1,k-1) + uu(i-1,j+1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Hi-y face - ! - j = ny+1 - !$OMP PARALLEL DO PRIVATE(i,k) - do k = kstart,kend - do i = istart,iend - dd(i,j,k) = ss( 3,i,j,k)*(uu(i+1,j-1,k-1) + uu(i ,j-1,k-1) & - +uu(i+1,j-1,k ) + uu(i+1,j ,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 1,i,j,k)*(uu(i-1,j-1,k-1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss(15,i,j,k)*(uu(i+1,j-1,k+1) + uu(i+1,j-1,k ) & - +uu(i ,j-1,k+1) + uu(i+1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(13,i,j,k)*(uu(i-1,j-1,k+1) + uu(i ,j-1,k+1) & - +uu(i-1,j-1,k ) + uu(i-1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo-z face - ! - k = 1 - !$OMP PARALLEL DO PRIVATE(i,j) - do j = jstart,jend - do i = istart,iend - dd(i,j,k) = ss(15,i,j,k)*(uu(i+1,j-1,k+1) + uu(i+1,j-1,k ) & - +uu(i ,j-1,k+1) + uu(i+1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(13,i,j,k)*(uu(i-1,j-1,k+1) + uu(i ,j-1,k+1) & - +uu(i-1,j-1,k ) + uu(i-1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(20,i,j,k)*(uu(i+1,j+1,k+1) + uu(i+1,j+1,k ) & - +uu(i+1,j ,k+1) + uu(i ,j+1,k+1) & - - FOUR*uu(i ,j ,k) ) & - +ss(18,i,j,k)*(uu(i-1,j+1,k+1) + uu(i-1,j+1,k ) & - +uu(i ,j+1,k+1) + uu(i-1,j ,k+1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Hi-z face - ! - k = nz+1 - !$OMP PARALLEL DO PRIVATE(i,j) - do j = jstart,jend - do i = istart,iend - dd(i,j,k) = ss( 3,i,j,k)*(uu(i+1,j-1,k-1) + uu(i ,j-1,k-1) & - +uu(i+1,j-1,k ) + uu(i+1,j ,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 1,i,j,k)*(uu(i-1,j-1,k-1) + uu(i-1,j-1,k ) & - +uu(i-1,j ,k-1) + uu(i ,j-1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 8,i,j,k)*(uu(i+1,j+1,k-1) + uu(i+1,j ,k-1) & - +uu(i+1,j+1,k ) + uu(i ,j+1,k-1) & - - FOUR*uu(i ,j ,k) ) & - +ss( 6,i,j,k)*(uu(i-1,j+1,k-1) + uu(i-1,j+1,k ) & - +uu(i ,j+1,k-1) + uu(i-1,j ,k-1) & - - FOUR*uu(i ,j ,k) ) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Interior - ! - !$OMP PARALLEL DO PRIVATE(i,j,k) - do k = kstart,kend - do j = jstart,jend - do i = istart,iend - - dd(i,j,k) = ss(0,i,j,k)*uu(i,j,k) & - + ss( 1,i,j,k) * uu(i-1,j-1,k-1) + ss( 2,i,j,k) * uu(i ,j-1,k-1) & - + ss( 3,i,j,k) * uu(i+1,j-1,k-1) + ss( 4,i,j,k) * uu(i-1,j ,k-1) & - + ss( 5,i,j,k) * uu(i+1,j ,k-1) + ss( 6,i,j,k) * uu(i-1,j+1,k-1) & - + ss( 7,i,j,k) * uu(i ,j+1,k-1) + ss( 8,i,j,k) * uu(i+1,j+1,k-1) & - + ss( 9,i,j,k) * uu(i-1,j-1,k ) + ss(10,i,j,k) * uu(i+1,j-1,k ) & - + ss(11,i,j,k) * uu(i-1,j+1,k ) + ss(12,i,j,k) * uu(i+1,j+1,k ) & - + ss(13,i,j,k) * uu(i-1,j-1,k+1) + ss(14,i,j,k) * uu(i ,j-1,k+1) & - + ss(15,i,j,k) * uu(i+1,j-1,k+1) + ss(16,i,j,k) * uu(i-1,j ,k+1) & - + ss(17,i,j,k) * uu(i+1,j ,k+1) + ss(18,i,j,k) * uu(i-1,j+1,k+1) & - + ss(19,i,j,k) * uu(i ,j+1,k+1) + ss(20,i,j,k) * uu(i+1,j+1,k+1) - - if ((size(ss,dim=1) .eq. 27) .and. (.not. uniform_dh) ) then - ! - ! Add faces (only non-zero for non-uniform dx) - ! - dd(i,j,k) = dd(i,j,k) + & - ss(21,i,j,k) * uu(i-1,j ,k ) + ss(22,i,j,k) * uu(i+1,j ,k ) & - + ss(23,i,j,k) * uu(i ,j-1,k ) + ss(24,i,j,k) * uu(i ,j+1,k ) & - + ss(25,i,j,k) * uu(i ,j ,k-1) + ss(26,i,j,k) * uu(i ,j ,k+1) - end if - - dd(i,j,k) = ff(i,j,k) - dd(i,j,k) - end do - end do - end do - !$OMP END PARALLEL DO - - else if (size(ss,dim=1) .eq. 7) then - ! - ! Corners - ! - i = 1 - j = 1 - k = 1 - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = 1 - j = ny+1 - k = 1 - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = 1 - k = 1 - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = ny+1 - k = 1 - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = 1 - j = 1 - k = nz+1 - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = 1 - j = ny+1 - k = nz+1 - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = 1 - k = nz+1 - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - - i = nx+1 - j = ny+1 - k = nz+1 - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = EIGHTH*ff(i,j,k) - dd(i,j,k) - ! - ! Lo-x / Lo-y edge - ! - i = 1 - j = 1 - do k = kstart,kend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Lo-y edge - ! - i = nx+1 - j = 1 - do k = kstart,kend - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x / Hi-y edge - ! - i = 1 - j = ny+1 - do k = kstart,kend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Hi-y edge - ! - i = nx+1 - j = ny+1 - do k = kstart,kend - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x / Lo-z edge - ! - i = 1 - k = 1 - do j = jstart,jend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Lo-z edge - ! - i = nx+1 - k = 1 - do j = jstart,jend - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x / Hi-z edge - ! - i = 1 - k = nz+1 - do j = jstart,jend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-x / Hi-z edge - ! - i = nx+1 - k = nz+1 - do j = jstart,jend - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-y / Lo-z edge - ! - j = 1 - k = 1 - do i = istart,iend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-y / Lo-z edge - ! - j = ny+1 - k = 1 - do i = istart,iend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-y / Hi-z edge - ! - j = 1 - k = nz+1 - do i = istart,iend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Hi-y / Hi-z edge - ! - j = ny+1 - k = nz+1 - do i = istart,iend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = FOURTH*ff(i,j,k) - dd(i,j,k) - end do - ! - ! Lo-x face - ! - i = 1 - !$OMP PARALLEL DO PRIVATE(j,k) - do k = kstart,kend - do j = jstart,jend - dd(i,j,k) = ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Hi-x face - ! - i = nx+1 - !$OMP PARALLEL DO PRIVATE(j,k) - do k = kstart,kend - do j = jstart,jend - dd(i,j,k) = ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo-y face - ! - j = 1 - !$OMP PARALLEL DO PRIVATE(i,k) - do k = kstart,kend - do i = istart,iend - dd(i,j,k) = ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Hi-y face - ! - j = ny+1 - !$OMP PARALLEL DO PRIVATE(i,k) - do k = kstart,kend - do i = istart,iend - dd(i,j,k) = ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) & - + ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo-z face - ! - k = 1 - !$OMP PARALLEL DO PRIVATE(i,j) - do j = jstart,jend - do i = istart,iend - dd(i,j,k) = ss(5,i,j,k)*(uu(i,j,k+1)-uu(i,j,k)) & - + ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Hi-z face - ! - k = nz+1 - !$OMP PARALLEL DO PRIVATE(i,j) - do j = jstart,jend - do i = istart,iend - dd(i,j,k) = ss(6,i,j,k)*(uu(i,j,k-1)-uu(i,j,k)) & - + ss(1,i,j,k)*(uu(i+1,j,k)-uu(i,j,k)) & - + ss(2,i,j,k)*(uu(i-1,j,k)-uu(i,j,k)) & - + ss(3,i,j,k)*(uu(i,j+1,k)-uu(i,j,k)) & - + ss(4,i,j,k)*(uu(i,j-1,k)-uu(i,j,k)) - dd(i,j,k) = HALF*ff(i,j,k) - dd(i,j,k) - end do - end do - !$OMP END PARALLEL DO - ! - ! Interior - ! - !$OMP PARALLEL DO PRIVATE(i,j,k) - do k = kstart,kend - do j = jstart,jend - do i = istart,iend - dd(i,j,k) = ss(0,i,j,k)*uu(i,j,k) & - + ss(1,i,j,k) * uu(i+1,j ,k ) + ss(2,i,j,k) * uu(i-1,j ,k ) & - + ss(3,i,j,k) * uu(i ,j+1,k ) + ss(4,i,j,k) * uu(i ,j-1,k ) & - + ss(5,i,j,k) * uu(i ,j ,k+1) + ss(6,i,j,k) * uu(i ,j ,k-1) - dd(i,j,k) = ff(i,j,k) - dd(i,j,k) - end do - end do - end do - !$OMP END PARALLEL DO - - end if - - end subroutine grid_laplace_3d - -end module ml_nd_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/ml_solve.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/ml_solve.f90 deleted file mode 100644 index e69650dea..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/ml_solve.f90 +++ /dev/null @@ -1,373 +0,0 @@ -module ml_solve_module - - use bl_types - use mg_module - use bndry_reg_module - use ml_layout_module - use multifab_module - - implicit none - - private - - public :: ml_cc_solve, ml_nd_solve - -contains - - subroutine ml_cc_solve(mla,mgt,rh,full_soln,fine_flx,ref_ratio,do_diagnostics,rel_eps_in,abs_eps_in) - - use ml_cc_module , only : ml_cc - - type(ml_layout), intent(in ) :: mla - type(mg_tower ), intent(inout) :: mgt(:) - type(multifab ), intent(inout) :: rh(:) - type(multifab ), intent(inout) :: full_soln(:) - type(bndry_reg), intent(inout) :: fine_flx(2:) - integer , intent(in ) :: ref_ratio(:,:) - integer , intent(in ) :: do_diagnostics - real(dp_t) , intent(in ), optional :: rel_eps_in - real(dp_t) , intent(in ), optional :: abs_eps_in - - type(boxarray) :: bac - type(lmultifab) :: fine_mask(mla%nlevel) - integer :: i, dm, n, nlevs, mglev - real(dp_t) :: rel_eps - real(dp_t) :: abs_eps - - dm = mla%dim - nlevs = mla%nlevel - - rel_eps = 1.d-12; if ( present(rel_eps_in) ) rel_eps = rel_eps_in - abs_eps = -1.d0 ; if ( present(abs_eps_in) ) abs_eps = abs_eps_in - - do n = nlevs, 1, -1 - call lmultifab_build(fine_mask(n), mla%la(n), 1, 0) - call setval(fine_mask(n), val = .true., all = .true.) - end do - do n = nlevs-1, 1, -1 - call copy(bac, get_boxarray(mla%la(n+1))) - call boxarray_coarsen(bac, ref_ratio(n,:)) - call setval(fine_mask(n), .false., bac) - call destroy(bac) - end do - -! **************************************************************************** - - call ml_cc(mla,mgt,rh,full_soln,fine_mask,ref_ratio,do_diagnostics,rel_eps,abs_eps, & - need_grad_phi_in=.true.) - -! **************************************************************************** - -! Put boundary conditions of soln in fine_flx to get correct grad(phi) at -! crse-fine boundaries (after soln correctly interpolated in ml_cc) - do n = 2,nlevs - mglev = mgt(n)%nlevels - do i = 1, dm - call ml_fill_fine_fluxes(mgt(n)%ss(mglev), fine_flx(n)%bmf(i,0), & - full_soln(n), mgt(n)%mm(mglev), -1, i, & - mgt(n)%lcross) - call ml_fill_fine_fluxes(mgt(n)%ss(mglev), fine_flx(n)%bmf(i,1), & - full_soln(n), mgt(n)%mm(mglev), 1, i, & - mgt(n)%lcross) - end do - end do - - do n = 1,nlevs - call lmultifab_destroy(fine_mask(n)) - end do - - end subroutine ml_cc_solve - - subroutine ml_fill_fine_fluxes(ss, flux, uu, mm, face, dim, lcross) - - use bl_prof_module - use cc_stencil_apply_module - - type(multifab) , intent(inout) :: flux - type(multifab) , intent(in ) :: ss - type(multifab) , intent(inout) :: uu - type(imultifab), intent(in ) :: mm - integer , intent(in ) :: face, dim - logical , intent(in ) :: lcross - - integer :: i, n - real(kind=dp_t), pointer :: fp(:,:,:,:) - real(kind=dp_t), pointer :: up(:,:,:,:) - real(kind=dp_t), pointer :: sp(:,:,:,:) - integer , pointer :: mp(:,:,:,:) - integer :: ng - type(bl_prof_timer), save :: bpt - - call build(bpt, "ml_fill_fine_fluxes") - - ng = nghost(uu) - - if ( ncomp(uu) /= ncomp(flux) ) then - call bl_error("ML_FILL_FINE_FLUXES: uu%nc /= flux%nc") - end if - - call multifab_fill_boundary(uu, cross = lcross) - - !$OMP PARALLEL DO PRIVATE(i,n,fp,up,sp,mp) - do i = 1, nfabs(flux) - fp => dataptr(flux, i) - up => dataptr(uu, i) - sp => dataptr(ss, i) - mp => dataptr(mm, i) - do n = 1, ncomp(uu) - select case(get_dim(ss)) - case (1) - call stencil_fine_flux_1d(sp(:,:,1,1), fp(:,1,1,n), up(:,1,1,n), & - mp(:,1,1,1), ng, face, dim) - case (2) - call stencil_fine_flux_2d(sp(:,:,:,1), fp(:,:,1,n), up(:,:,1,n), & - mp(:,:,1,1), ng, face, dim) - case (3) - call stencil_fine_flux_3d(sp(:,:,:,:), fp(:,:,:,n), up(:,:,:,n), & - mp(:,:,:,1), ng, face, dim) - end select - end do - end do - !$OMP END PARALLEL DO - - call destroy(bpt) - - end subroutine ml_fill_fine_fluxes - -! -! ****************************************************************************************** -! - - subroutine ml_nd_solve(mla,mgt,rh,full_soln,one_sided_ss,ref_ratio,do_diagnostics,& - rel_eps_in,abs_eps_in) - - use ml_nd_module, only : ml_nd - - type(ml_layout), intent(in ) :: mla - type(mg_tower) , intent(inout) :: mgt(:) - type(multifab) , intent(inout) :: rh(:) - type(multifab) , intent(inout) :: full_soln(:) - type(multifab) , intent(in ) :: one_sided_ss(2:) - integer , intent(in ) :: ref_ratio(:,:) - integer , intent(in ) :: do_diagnostics - real(dp_t) , intent(in ), optional :: rel_eps_in - real(dp_t) , intent(in ), optional :: abs_eps_in - - type(lmultifab) :: fine_mask(mla%nlevel) - integer :: nlevs, n, dm - logical :: nodal(get_dim(rh(mla%nlevel))) - real(dp_t) :: rel_eps,abs_eps - - rel_eps = 1.d-12; if ( present(rel_eps_in) ) rel_eps = rel_eps_in - abs_eps = -1.d0 ; if ( present(abs_eps_in) ) abs_eps = abs_eps_in - - nlevs = mla%nlevel - dm = get_dim(rh(nlevs)) - nodal = .true. - -! We are only considering the dense stencils here (3 in 1d, 9 in 2d, 27 in 3d) - - do n = nlevs, 1, -1 - call lmultifab_build(fine_mask(n), mla%la(n), 1, 0, nodal) - if ( n < nlevs ) then - call create_nodal_mask(fine_mask(n), & - mgt(n )%mm(mgt(n )%nlevels), & - mgt(n+1)%mm(mgt(n+1)%nlevels), & - ref_ratio(n,:)) - else - call setval(fine_mask(n), val = .true., all = .true.) - endif - end do - - call ml_nd(mla,mgt,rh,full_soln,fine_mask,one_sided_ss,ref_ratio,do_diagnostics,& - rel_eps,abs_eps) - - do n = 1,nlevs - call lmultifab_destroy(fine_mask(n)) - end do - - end subroutine ml_nd_solve - - subroutine create_nodal_mask(mask,mm_crse,mm_fine,ir) - - type(lmultifab), intent(inout) :: mask - type(imultifab), intent(in ) :: mm_crse - type(imultifab), intent(in ) :: mm_fine - integer , intent(in ) :: ir(:) - - type(box) :: cbox, fbox, isect - type(boxarray) :: ba - type(layout) :: la - logical, pointer :: mkp(:,:,:,:) - integer :: loc(get_dim(mask)), lof(get_dim(mask)), i, j, k, dims(4), proc, dm, ii, jj - integer, pointer :: cmp(:,:,:,:), fmp(:,:,:,:) - integer :: lo(get_dim(mask)), hi(get_dim(mask)) - integer, parameter :: tag = 1071 - type(box_intersector), pointer :: bi(:) - type(bl_prof_timer), save :: bpt - - if ( .not. nodal_q(mask) ) call bl_error('create_nodal_mask(): mask NOT nodal') - - call build(bpt, "create_nodal_mask") - - call setval(mask, .true.) - ! - ! Need to build temporary layout with nodal boxarray for the intersection tests below. - ! - call copy(ba, get_boxarray(get_layout(mask))) - call boxarray_nodalize(ba, nodal_flags(mask)) - call build(la, ba, boxarray_bbox(ba), mapping = LA_LOCAL) ! LA_LOCAL ==> bypass processor distribution calculation. - call destroy(ba) - ! - ! Note : mm_fine is in fine space - ! Note : mask and mm_crse are in crse space - ! - dims = 1 - - dm = get_dim(mask) - - do i = 1, nboxes(mm_fine%la) - - fbox = box_nodalize(get_box(mm_fine%la,i),mm_fine%nodal) - bi => layout_get_box_intersector(la, coarsen(fbox,ir)) - - do k = 1, size(bi) - j = bi(k)%i - - if ( remote(mask%la,j) .and. remote(mm_fine%la,i) ) cycle - - cbox = box_nodalize(get_box(mask%la,j),mask%nodal) - loc = lwb(cbox) - isect = bi(k)%bx - lo = lwb(isect) - hi = upb(isect) - - if ( local(mask%la,j) .and. local(mm_fine%la,i) ) then - ii = local_index(mm_fine,i) - jj = local_index(mask,j) - lof = lwb(fbox) - mkp => dataptr(mask,jj) - cmp => dataptr(mm_crse,jj) - fmp => dataptr(mm_fine,ii) - - select case (dm) - case (1) - call create_nodal_mask_1d(mkp(:,1,1,1),cmp(:,1,1,1),loc,fmp(:,1,1,1),lof,lo,hi,ir) - case (2) - call create_nodal_mask_2d(mkp(:,:,1,1),cmp(:,:,1,1),loc,fmp(:,:,1,1),lof,lo,hi,ir) - case (3) - call create_nodal_mask_3d(mkp(:,:,:,1),cmp(:,:,:,1),loc,fmp(:,:,:,1),lof,lo,hi,ir) - end select - else if ( local(mm_fine%la,i) ) then - ! - ! Must send mm_fine. - ! - ii = local_index(mm_fine,i) - isect = intersection(refine(isect,ir),fbox) - fmp => dataptr(mm_fine, ii, isect) - proc = get_proc(get_layout(mask), j) - call parallel_send(fmp, proc, tag) - else if ( local(mask%la,j) ) then - ! - ! Must receive mm_fine. - ! - jj = local_index(mask,j) - isect = intersection(refine(isect,ir),fbox) - lof = lwb(isect) - mkp => dataptr(mask,jj) - cmp => dataptr(mm_crse,jj) - proc = get_proc(get_layout(mm_fine),i) - - dims(1:dm) = extent(isect) - allocate(fmp(dims(1),dims(2),dims(3),1)) - call parallel_recv(fmp, proc, tag) - - select case (dm) - case (1) - call create_nodal_mask_1d(mkp(:,1,1,1),cmp(:,1,1,1),loc,fmp(:,1,1,1),lof,lo,hi,ir) - case (2) - call create_nodal_mask_2d(mkp(:,:,1,1),cmp(:,:,1,1),loc,fmp(:,:,1,1),lof,lo,hi,ir) - case (3) - call create_nodal_mask_3d(mkp(:,:,:,1),cmp(:,:,:,1),loc,fmp(:,:,:,1),lof,lo,hi,ir) - end select - - deallocate(fmp) - end if - end do - deallocate(bi) - end do - - call destroy(la) - call destroy(bpt) - - end subroutine create_nodal_mask - - subroutine create_nodal_mask_1d(mask,mm_crse,loc,mm_fine,lof,lo,hi,ir) - - integer, intent(in ) :: loc(:),lof(:) - logical, intent(inout) :: mask(loc(1):) - integer, intent(in ) :: mm_crse(loc(1):) - integer, intent(in ) :: mm_fine(lof(1):) - integer, intent(in ) :: lo(:),hi(:) - integer, intent(in ) :: ir(:) - - integer :: i,fi - - do i = lo(1),hi(1) - fi = i*ir(1) - if (.not. bc_dirichlet(mm_fine(fi),1,0) .or. bc_dirichlet(mm_crse(i),1,0)) & - mask(i) = .false. - end do - - end subroutine create_nodal_mask_1d - - subroutine create_nodal_mask_2d(mask,mm_crse,loc,mm_fine,lof,lo,hi,ir) - - integer, intent(in ) :: loc(:),lof(:) - logical, intent(inout) :: mask(loc(1):,loc(2):) - integer, intent(in ) :: mm_crse(loc(1):,loc(2):) - integer, intent(in ) :: mm_fine(lof(1):,lof(2):) - integer, intent(in ) :: lo(:),hi(:) - integer, intent(in ) :: ir(:) - - integer :: i,j,fi,fj - - do j = lo(2),hi(2) - fj = j*ir(2) - do i = lo(1),hi(1) - fi = i*ir(1) - if (.not. bc_dirichlet(mm_fine(fi,fj),1,0) .or. bc_dirichlet(mm_crse(i,j),1,0)) & - mask(i,j) = .false. - end do - end do - - end subroutine create_nodal_mask_2d - - subroutine create_nodal_mask_3d(mask,mm_crse,loc,mm_fine,lof,lo,hi,ir) - - integer, intent(in ) :: loc(:),lof(:) - logical, intent(inout) :: mask(loc(1):,loc(2):,loc(3):) - integer, intent(in ) :: mm_crse(loc(1):,loc(2):,loc(3):) - integer, intent(in ) :: mm_fine(lof(1):,lof(2):,lof(3):) - integer, intent(in ) :: lo(:),hi(:) - integer, intent(in ) :: ir(:) - - integer :: i,j,k,fi,fj,fk - - !$OMP PARALLEL DO PRIVATE(i,j,k,fi,fj,fk) - do k = lo(3),hi(3) - fk = k*ir(3) - do j = lo(2),hi(2) - fj = j*ir(2) - do i = lo(1),hi(1) - fi = i*ir(1) - if (.not. bc_dirichlet(mm_fine(fi,fj,fk),1,0) .or. bc_dirichlet(mm_crse(i,j,k),1,0) ) & - mask(i,j,k) = .false. - end do - end do - end do - !$OMP END PARALLEL DO - - end subroutine create_nodal_mask_3d - -end module ml_solve_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_interface_stencil.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_interface_stencil.f90 deleted file mode 100644 index 80361eef3..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_interface_stencil.f90 +++ /dev/null @@ -1,2092 +0,0 @@ -module nodal_interface_stencil_module - - use bl_types - use layout_module - use multifab_module - use bc_functions_module - use bl_constants_module - - implicit none - - private - - public :: ml_crse_contrib, ml_fine_contrib - -contains - - subroutine ml_crse_contrib_fancy(res, flux, crse, ss, mm_crse, mm_fine, crse_domain, ir, side) - - type(multifab), intent(inout) :: res - type(multifab), intent(inout) :: flux - type(multifab), intent(in ) :: crse - type(multifab), intent(in ) :: ss - type(imultifab),intent(in ) :: mm_crse - type(imultifab),intent(in ) :: mm_fine - type(box), intent(in ) :: crse_domain - integer, intent(in ) :: ir(:) - integer :: side - - type(box) :: fbox, mbox, isect - integer :: lo (get_dim(res)), hi (get_dim(res)), loc(get_dim(res)) - integer :: lof(get_dim(res)), hif(get_dim(res)), lor(get_dim(res)), los(get_dim(res)) - integer :: lomf(get_dim(res)), lomc(get_dim(res)) - integer :: lod(MAX_SPACEDIM), hid(MAX_SPACEDIM), loflux(get_dim(res)), hiflux(get_dim(res)) - integer :: i, j, ii, np, av, dm - - real(kind=dp_t), pointer :: rp(:,:,:,:),fp(:,:,:,:),cp(:,:,:,:),sp(:,:,:,:) - integer, pointer :: mp(:,:,:,:),mcp(:,:,:,:) - integer, parameter :: tag = 1103 - - real(kind=dp_t), dimension(:,:,:,:), allocatable :: flxpt - integer, dimension(:,:,:,:), allocatable :: mmfpt - - integer :: fsh(MAX_SPACEDIM+1), msh(MAX_SPACEDIM+1) - integer, allocatable :: rcnt(:), rdsp(:), scnt(:), sdsp(:) - real(dp_t), allocatable :: g_snd_d(:), g_rcv_d(:) - integer, allocatable :: g_snd_i(:), g_rcv_i(:) - type(fluxassoc) :: fa - - dm = get_dim(res) - np = parallel_nprocs() - fa = layout_fluxassoc(crse%la, flux%la, nodal_flags(crse), nodal_flags(flux), side, crse_domain, ir) - ! - ! Do all the local work. - ! - do ii = 1, fa%flux%l_con%ncpy - i = fa%flux%l_con%cpy(ii)%lns - j = fa%flux%l_con%cpy(ii)%lnd - isect = fa%flux%l_con%cpy(ii)%sbx - lo = lwb(isect) - hi = upb(isect) - fbox = get_ibox(flux,i) - lof = lwb(fbox) - hif = upb(fbox) - loc = lwb(get_pbox(crse, j)) - lomc = lwb(get_pbox(mm_crse,j)) - lor = lwb(get_pbox(res, j)) - los = lwb(get_pbox(ss, j)) - lomf = lwb(get_pbox(mm_fine,i)) - fp => dataptr(flux, i) - mp => dataptr(mm_fine, i) - cp => dataptr(crse, j) - rp => dataptr(res, j) - sp => dataptr(ss, j) - mcp => dataptr(mm_crse, j) - - select case (dm) - case (1) - call ml_interface_1d_nodal(rp(:,1,1,1), lor, & - fp(:,1,1,1), lof, cp(:,1,1,1), loc, & - sp(:,:,1,1), los, lo, side) - case (2) - call ml_interface_2d_nodal(rp(:,:,1,1), lor, & - fp(:,:,1,1), lof , cp(:,:,1,1), loc , sp(:,:,:,1), los , & - mp(:,:,1,1), lomf, mcp(:,:,1,1), lomc, lo, hi, ir, side, lof, hif) - case (3) - call ml_interface_3d_nodal(rp(:,:,:,1), lor, & - fp(:,:,:,1), lof , cp(:,:,:,1), loc , sp(:,:,:,:), los , & - mp(:,:,:,1), lomf, mcp(:,:,:,1), lomc, lo, hi, ir, side, lof, hif) - end select - end do - - if (np == 1) return - ! - ! Now send/recv the flux data - ! - allocate(g_snd_d(fa%flux%r_con%svol)) - allocate(g_rcv_d(fa%flux%r_con%rvol)) - - do i = 1, fa%flux%r_con%nsnd - fp => dataptr(flux, fa%flux%r_con%snd(i)%lns, fa%flux%r_con%snd(i)%sbx) - call reshape_d_4_1(g_snd_d, 1 + fa%flux%r_con%snd(i)%pv, fp) - end do - - allocate(rcnt(0:np-1), rdsp(0:np-1), scnt(0:np-1), sdsp(0:np-1)) - - rcnt = 0; scnt = 0; rdsp = 0; sdsp = 0 - - do i = 1, fa%flux%r_con%nsp - ii = fa%flux%r_con%str(i)%pr - scnt(ii) = fa%flux%r_con%str(i)%sz - sdsp(ii) = fa%flux%r_con%str(i)%pv - end do - do i = 1, fa%flux%r_con%nrp - ii = fa%flux%r_con%rtr(i)%pr - rcnt(ii) = fa%flux%r_con%rtr(i)%sz - rdsp(ii) = fa%flux%r_con%rtr(i)%pv - end do - call parallel_alltoall(g_rcv_d, rcnt, rdsp, g_snd_d, scnt, sdsp) - ! - ! Now send/recv mask data. - ! - allocate(g_snd_i(fa%mask%r_con%svol)) - allocate(g_rcv_i(fa%mask%r_con%rvol)) - - do i = 1, fa%mask%r_con%nsnd - mp => dataptr(mm_fine, flux,fa%mask%r_con%snd(i)%lns, fa%mask%r_con%snd(i)%sbx) - call reshape_i_4_1(g_snd_i, 1 + fa%mask%r_con%snd(i)%pv, mp) - end do - - rcnt = 0; scnt = 0; rdsp = 0; sdsp = 0 - - do i = 1, fa%mask%r_con%nsp - ii = fa%mask%r_con%str(i)%pr - scnt(ii) = fa%mask%r_con%str(i)%sz - sdsp(ii) = fa%mask%r_con%str(i)%pv - end do - do i = 1, fa%mask%r_con%nrp - ii = fa%mask%r_con%rtr(i)%pr - rcnt(ii) = fa%mask%r_con%rtr(i)%sz - rdsp(ii) = fa%mask%r_con%rtr(i)%pv - end do - call parallel_alltoall(g_rcv_i, rcnt, rdsp, g_snd_i, scnt, sdsp) - ! - ! Got all the remote data. Use it. - ! - do i = 1, fa%flux%r_con%nrcv - j = fa%flux%r_con%rcv(i)%lnd - fsh = fa%flux%r_con%rcv(i)%sh - msh = fa%mask%r_con%rcv(i)%sh - isect = fa%flux%r_con%rcv(i)%sbx - loflux = lwb(fa%fbxs(i)) - hiflux = upb(fa%fbxs(i)) - lof = lwb(isect) - hif = upb(isect) - lomf = lwb(fa%mask%r_con%rcv(i)%sbx) - loc = lwb(get_pbox(crse, j)) - lomc = lwb(get_pbox(mm_crse,j)) - lor = lwb(get_pbox(res, j)) - los = lwb(get_pbox(ss, j)) - cp => dataptr(crse, j) - rp => dataptr(res, j) - sp => dataptr(ss, j) - mcp => dataptr(mm_crse, j) - - lod = 1; hid = 1 - lod(1:dm) = lwb(isect); hid(1:dm) = upb(isect) - allocate(flxpt(lod(1):hid(1),lod(2):hid(2),lod(3):hid(3),1)) - call reshape_d_1_4(flxpt, g_rcv_d, 1 + fa%flux%r_con%rcv(i)%pv, fsh) - - mbox = fa%mask%r_con%rcv(i)%sbx - lod(1:dm) = lwb(mbox); hid(1:dm) = upb(mbox) - allocate(mmfpt(lod(1):hid(1),lod(2):hid(2),lod(3):hid(3),1)) - av = fa%mask%r_con%rcv(i)%pv + volume(mbox) - call reshape_i_1_4(mmfpt, g_rcv_i, 1 + fa%mask%r_con%rcv(i)%pv, msh) - - select case (dm) - case (1) - call ml_interface_1d_nodal(rp(:,1,1,1), lor, & - flxpt(:,1,1,1), lof, cp(:,1,1,1), loc, & - sp(:,:,1,1), los, lof, side) - case (2) - call ml_interface_2d_nodal(rp(:,:,1,1), lor, & - flxpt(:,:,1,1), lof , cp(:,:,1,1), loc , sp(:,:,:,1), los , & - mmfpt(:,:,1,1), lomf, mcp(:,:,1,1), lomc, lof, hif, ir, side, loflux, hiflux) - case (3) - call ml_interface_3d_nodal(rp(:,:,:,1), lor, & - flxpt(:,:,:,1), lof , cp(:,:,:,1), loc , sp(:,:,:,:), los , & - mmfpt(:,:,:,1), lomf, mcp(:,:,:,1), lomc, lof, hif, ir, side, loflux, hiflux) - end select - - deallocate(flxpt) - deallocate(mmfpt) - end do - - end subroutine ml_crse_contrib_fancy - - subroutine ml_crse_contrib(res, flux, crse, ss, mm_crse, mm_fine, crse_domain, ir, side) - use bl_prof_module - type(multifab), intent(inout) :: res - type(multifab), intent(inout) :: flux - type(multifab), intent(in ) :: crse - type(multifab), intent(in ) :: ss - type(imultifab),intent(in ) :: mm_crse - type(imultifab),intent(in ) :: mm_fine - type(box), intent(in ) :: crse_domain - integer, intent(in ) :: ir(:) - integer :: side - type(bl_prof_timer), save :: bpt - call build(bpt, "ml_crse_contrib") - call ml_crse_contrib_fancy(res, flux, crse, ss, mm_crse, mm_fine, crse_domain, ir, side) - call destroy(bpt) - end subroutine ml_crse_contrib - - subroutine ml_interface_1d_nodal(res, lor, fine_flux, lof, cc, loc, ss , los, lo, side) - integer, intent(in) :: lor(:) - integer, intent(in) :: loc(:) - integer, intent(in) :: los(:) - integer, intent(in) :: lof(:) - integer, intent(in) :: lo(:) - real (kind = dp_t), intent(inout) :: res(lor(1):) - real (kind = dp_t), intent(in ) :: fine_flux(lof(1):) - real (kind = dp_t), intent(in ) :: cc(loc(1):) - real (kind = dp_t), intent(in ) :: ss(0:,los(1):) - integer, intent(in) :: side - - integer :: i - real (kind = dp_t) :: crse_flux - - i = lo(1) - - ! Lo side - if (side == -1) then - crse_flux = ss(1,i)*(cc(i+1)-cc(i)) - res(i) = res(i) - fine_flux(i) + crse_flux - ! Hi side - else if (side == 1) then - crse_flux = ss(2,i)*(cc(i-1)-cc(i)) - res(i) = res(i) - fine_flux(i) + crse_flux - end if - - end subroutine ml_interface_1d_nodal - - subroutine ml_interface_2d_nodal(res, lor, fine_flux, lof, cc, loc, & - ss , los, mm_fine, lomf, mm_crse, lomc, lo, hi, ir, side, loflux, hiflux) - use cc_stencil_module - integer, intent(in) :: lor(:) - integer, intent(in) :: loc(:) - integer, intent(in) :: los(:) - integer, intent(in) :: lomf(:) - integer, intent(in) :: lomc(:) - integer, intent(in) :: lof(:), loflux(:), hiflux(:) - integer, intent(in) :: lo(:), hi(:) - real (kind = dp_t), intent(inout) :: res(lor(1):,lor(2):) - real (kind = dp_t), intent(in ) :: fine_flux(lof(1):,lof(2):) - real (kind = dp_t), intent(in ) :: cc(loc(1):,loc(2):) - real (kind = dp_t), intent(in ) :: ss(0:,los(1):,los(2):) - integer , intent(in ) :: mm_fine(lomf(1):,lomf(2):) - integer , intent(in ) :: mm_crse(lomc(1):,lomc(2):) - integer, intent(in) :: side - integer, intent(in) :: ir(:) - - integer :: i, j, ioff, joff, sig_i, sig_j - real (kind = dp_t) :: crse_flux - logical llo,lhi - - i = lo(1) - j = lo(2) - - ioff = 0; joff = 0; sig_i = 0; sig_j = 0 - - ! NOTE: THESE STENCILS ONLY WORK FOR DX == DY. - - if (size(ss,dim=1) .eq. 9) then - ! Dense stencil - - if (side == -1) then - - do j = lo(2),hi(2) - if (bc_dirichlet(mm_fine(ir(1)*i,ir(2)*j),1,0)) then - if (.not. bc_dirichlet(mm_crse(i,j),1,0)) then - - llo = .false. - lhi = .false. - - if (j == loflux(2)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),2,-1)) llo = .true. - end if - - if (j == hiflux(2)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),2,+1)) lhi = .true. - end if - - if (llo) then - crse_flux = HALF * ss(8,i,j) * & - (cc(i+1,j+1) + HALF*cc(i+1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) - else if (lhi) then - crse_flux = HALF * ss(3,i,j) * & - (cc(i+1,j-1) + HALF*cc(i+1,j) + HALF * cc(i,j-1) - TWO*cc(i,j)) - else - crse_flux = ss(8,i,j) * & - (cc(i+1,j+1) + HALF*cc(i+1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) & - +ss(3,i,j) * & - (cc(i+1,j-1) + HALF*cc(i+1,j) + HALF * cc(i,j-1) - TWO*cc(i,j)) - end if - - if (ir(1) .eq. 2) then - crse_flux = crse_flux * 4.0_dp_t - else if (ir(1) .eq. 4) then - crse_flux = crse_flux * 16.0_dp_t - end if - - res(i,j) = res(i,j) + crse_flux + fine_flux(i,j) - end if - end if - end do - - else if (side == 1) then - - do j = lo(2),hi(2) - if (bc_dirichlet(mm_fine(ir(1)*i,ir(2)*j),1,0)) then - if (.not. bc_dirichlet(mm_crse(i,j),1,0)) then - - llo = .false. - lhi = .false. - - if (j == loflux(2)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),2,-1)) llo = .true. - end if - - if (j == hiflux(2)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),2,+1)) lhi = .true. - end if - - if (llo) then - crse_flux = HALF * ss(6,i,j) * & - (cc(i-1,j+1) + HALF*cc(i-1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) - else if (lhi) then - crse_flux = HALF * ss(1,i,j) * & - (cc(i-1,j-1) + HALF*cc(i-1,j) + HALF * cc(i,j-1) - TWO*cc(i,j)) - else - crse_flux = ss(6,i,j) * & - (cc(i-1,j+1) + HALF*cc(i-1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) & - +ss(1,i,j) * & - (cc(i-1,j-1) + HALF*cc(i-1,j) + HALF * cc(i,j-1) - TWO*cc(i,j)) - end if - - if (ir(1) .eq. 2) then - crse_flux = crse_flux * 4.0_dp_t - else if (ir(1) .eq. 4) then - crse_flux = crse_flux * 16.0_dp_t - end if - - res(i,j) = res(i,j) + crse_flux + fine_flux(i,j) - end if - end if - end do - - else if (side == -2) then - - do i = lo(1),hi(1) - if (bc_dirichlet(mm_fine(ir(1)*i,ir(2)*j),1,0)) then - if (.not. bc_dirichlet(mm_crse(i,j),1,0)) then - - llo = .false. - lhi = .false. - - if (i == loflux(1)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),1,-1)) llo = .true. - end if - - if (i == hiflux(1)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),1,+1)) lhi = .true. - end if - - if (llo) then - crse_flux = HALF * ss(8,i,j) * & - (cc(i+1,j+1) + HALF*cc(i+1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) - else if (lhi) then - crse_flux = HALF * ss(6,i,j) * & - (cc(i-1,j+1) + HALF*cc(i-1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) - else - crse_flux = ss(8,i,j) * & - (cc(i+1,j+1) + HALF*cc(i+1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) & - +ss(6,i,j) * & - (cc(i-1,j+1) + HALF*cc(i-1,j) + HALF * cc(i,j+1) - TWO*cc(i,j)) - end if - - if (ir(2) .eq. 2) then - crse_flux = crse_flux * 4.0_dp_t - else if (ir(2) .eq. 4) then - crse_flux = crse_flux * 16.0_dp_t - end if - - res(i,j) = res(i,j) + crse_flux + fine_flux(i,j) - end if - end if - end do - - else if (side == 2) then - - do i = lo(1),hi(1) - if (bc_dirichlet(mm_fine(ir(1)*i,ir(2)*j),1,0)) then - if (.not. bc_dirichlet(mm_crse(i,j),1,0)) then - - llo = .false. - lhi = .false. - - if (i == loflux(1)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),1,-1)) llo = .true. - end if - - if (i == hiflux(1)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),1,+1)) lhi = .true. - end if - - if (llo) then - crse_flux = (ss(3,i,j)*(cc(i+1,j-1) + HALF*cc(i+1,j) + & - HALF * cc(i,j-1) - TWO*cc(i,j)) ) * HALF - else if (lhi) then - crse_flux = (ss(1,i,j)*(cc(i-1,j-1) + HALF*cc(i-1,j) + & - HALF * cc(i,j-1) - TWO*cc(i,j)) ) * HALF - else - crse_flux = ss(3,i,j)*(cc(i+1,j-1) + HALF*cc(i+1,j) + & - HALF * cc(i,j-1) - TWO*cc(i,j)) & - +ss(1,i,j)*(cc(i-1,j-1) + HALF*cc(i-1,j) + & - HALF * cc(i,j-1) - TWO*cc(i,j)) - end if - - if (ir(2) .eq. 2) then - crse_flux = crse_flux * 4.0_dp_t - else if (ir(2) .eq. 4) then - crse_flux = crse_flux * 16.0_dp_t - end if - - res(i,j) = res(i,j) + crse_flux + fine_flux(i,j) - end if - end if - end do - - end if - - else if (size(ss,dim=1) .eq. 5) then - ! - ! Cross stencil - ! - if (side == -1 .or. side == 1) then - - if (side == -1) then - ioff = i+1 - sig_i = 1 - else if (side == 1) then - ioff = i-1 - sig_i = 2 - end if - - do j = lo(2),hi(2) - if (bc_dirichlet(mm_fine(ir(1)*i,ir(2)*j),1,0)) then - if (.not. bc_dirichlet(mm_crse(i,j),1,0)) then - - llo = .false. - lhi = .false. - - if (j == loflux(2)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),2,-1)) llo = .true. - end if - - if (j == hiflux(2)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),2,+1)) lhi = .true. - end if - - if (llo) then - crse_flux = FOURTH*ss(sig_i,i,j) * (cc(ioff,j )-cc(i,j)) & - +FOURTH*ss(3,i,j) * (cc(i ,j+1)-cc(i,j)) - else if (lhi) then - crse_flux = FOURTH*ss(sig_i,i,j) * (cc(ioff,j )-cc(i,j)) & - +FOURTH*ss(4,i,j) * (cc(i ,j-1)-cc(i,j)) - else - crse_flux = ss(sig_i,i,j) * (cc(ioff,j )-cc(i,j)) & - +HALF*ss(3,i,j) * (cc(i ,j+1)-cc(i,j)) & - +HALF*ss(4,i,j) * (cc(i ,j-1)-cc(i,j)) - end if - - if (ir(1) .eq. 2) then - crse_flux = crse_flux * 4.0_dp_t - else if (ir(1) .eq. 4) then - crse_flux = crse_flux * 16.0_dp_t - end if - - res(i,j) = res(i,j) + crse_flux + fine_flux(i,j) - end if - end if - end do - - else if (side == -2 .or. side == 2) then - - if (side == -2) then - joff = j+1 - sig_j = 3 - else if (side == 2) then - joff = j-1 - sig_j = 4 - end if - - do i = lo(1),hi(1) - if (bc_dirichlet(mm_fine(ir(1)*i,ir(2)*j),1,0)) then - if (.not. bc_dirichlet(mm_crse(i,j),1,0)) then - - llo = .false. - lhi = .false. - - if (i == loflux(1)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),1,-1)) llo = .true. - end if - - if (i == hiflux(1)) then - if (.not. bc_neumann(mm_fine(ir(1)*i,ir(2)*j),1,+1)) lhi = .true. - end if - - if (llo) then - crse_flux = FOURTH*ss(sig_j,i,j) * (cc(i ,joff)-cc(i,j)) & - +FOURTH*ss(1,i,j) * (cc(i+1,j )-cc(i,j)) - else if (lhi) then - crse_flux = FOURTH*ss(sig_j,i,j) * (cc(i ,joff)-cc(i,j)) & - +FOURTH*ss(2,i,j) * (cc(i-1,j )-cc(i,j)) - else - crse_flux = ss(sig_j,i,j) * (cc(i ,joff)-cc(i,j)) & - +HALF*ss(1,i,j) * (cc(i+1,j )-cc(i,j)) & - +HALF*ss(2,i,j) * (cc(i-1,j )-cc(i,j)) - end if - if (ir(1) .eq. 2) then - crse_flux = crse_flux * 4.0_dp_t - else if (ir(1) .eq. 4) then - crse_flux = crse_flux * 16.0_dp_t - end if - res(i,j) = res(i,j) + crse_flux + fine_flux(i,j) - end if - end if - end do - - end if - - end if - - end subroutine ml_interface_2d_nodal - - subroutine ml_interface_3d_nodal(res, lor, fine_flux, lof, cc, loc, & - ss, los, mm_fine, lomf, mm_crse, lomc, lo, hi, ir, side, loflux, hiflux) - - use nodal_stencil_module - - integer, intent(in) :: lor(:) - integer, intent(in) :: loc(:) - integer, intent(in) :: los(:) - integer, intent(in) :: lof(:), loflux(:), hiflux(:) - integer, intent(in) :: lomf(:) - integer, intent(in) :: lomc(:) - integer, intent(in) :: lo(:), hi(:) - real (kind = dp_t), intent(inout) :: res(lor(1):,lor(2):,lor(3):) - real (kind = dp_t), intent(in ) :: fine_flux(lof(1):,lof(2):,lof(3):) - real (kind = dp_t), intent(in ) :: cc(loc(1):,loc(2):,loc(3):) - real (kind = dp_t), intent(in ) :: ss(0:,los(1):,los(2):,los(3):) - integer , intent(in ) :: mm_fine(lomf(1):,lomf(2):,lomf(3):) - integer , intent(in ) :: mm_crse(lomc(1):,lomc(2):,lomc(3):) - integer, intent(in) :: side - integer, intent(in) :: ir(:) - - integer :: i, j, k, ifine, jfine, kfine - integer :: ioff, joff, koff - integer :: sig_mm, sig_mp, sig_pm, sig_pp - integer :: sig_i,sig_j,sig_k - logical :: lo_i_not,lo_j_not,lo_k_not,hi_i_not,hi_j_not,hi_k_not - real (kind = dp_t) :: crse_flux - real (kind = dp_t) :: cell_mm, cell_mp, cell_pm, cell_pp - - sig_i = 0; ioff = 0 - ! - ! NOTE: THESE STENCILS ONLY WORK FOR DX == DY. - ! NOTE: MM IS ON THE FINE GRID, NOT THE CRSE - ! - if ( (size(ss,dim=1) .eq. 27) .or. (size(ss,dim=1) .eq. 21) ) then - ! - ! Dense stencil - ! - ! Lo/Hi i side - ! - if (side == -1 .or. side == 1) then - - i = lo(1) - ifine = ir(1)*i - - if (side == -1) then - ioff = i+1 - sig_mm = 3 - sig_pm = 8 - sig_mp = 15 - sig_pp = 20 - else - ioff = i-1 - sig_mm = 1 - sig_pm = 6 - sig_mp = 13 - sig_pp = 18 - end if - - !$OMP PARALLEL DO PRIVATE(j,k,lo_j_not,hi_j_not,lo_k_not,hi_k_not) & - !$OMP PRIVATE(cell_mm,cell_pm,cell_mp,cell_pp,crse_flux,jfine,kfine) - do k = lo(3),hi(3) - do j = lo(2),hi(2) - - kfine = ir(3)*k - jfine = ir(2)*j - - if (bc_dirichlet(mm_fine(ir(1)*i,ir(2)*j,ir(3)*k),1,0) .and. (.not.bc_dirichlet(mm_crse(i,j,k),1,0))) then - - lo_j_not = .false.; hi_j_not = .false.; lo_k_not = .false.; hi_k_not = .false. - - if (j == loflux(2) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,-1))) lo_j_not = .true. - if (j == hiflux(2) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,+1))) hi_j_not = .true. - if (k == loflux(3) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,-1))) lo_k_not = .true. - if (k == hiflux(3) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,+1))) hi_k_not = .true. - - cell_mm = ss(sig_mm,i,j,k)*(cc(ioff,j-1,k-1) + cc(ioff,j-1,k ) & - +cc(ioff,j ,k-1) + cc(i ,j-1,k-1) - FOUR*cc(i ,j ,k) ) - cell_pm = ss(sig_pm,i,j,k)*(cc(ioff,j+1,k-1) + cc(ioff,j+1,k ) & - +cc(ioff,j ,k-1) + cc(i ,j+1,k-1) - FOUR*cc(i ,j ,k) ) - cell_mp = ss(sig_mp,i,j,k)*(cc(ioff,j-1,k+1) + cc(ioff,j-1,k ) & - +cc(ioff,j ,k+1) + cc(i ,j-1,k+1) - FOUR*cc(i ,j ,k) ) - cell_pp = ss(sig_pp,i,j,k)*(cc(ioff,j+1,k+1) + cc(ioff,j+1,k ) & - +cc(ioff,j ,k+1) + cc(i ,j+1,k+1) - FOUR*cc(i ,j ,k) ) - - crse_flux = zero - - if (lo_k_not) then - if (lo_j_not) then - crse_flux = THIRD*cell_pp - else if (hi_j_not) then - crse_flux = THIRD*cell_mp - else - crse_flux = HALF*(cell_pp + cell_mp) - end if - else if (hi_k_not) then - if (lo_j_not) then - crse_flux = THIRD*cell_pm - else if (hi_j_not) then - crse_flux = THIRD*cell_mm - else - crse_flux = HALF*(cell_pm + cell_mm) - end if - else - if (lo_j_not) then - crse_flux = HALF*(cell_pm + cell_pp) - else if (hi_j_not) then - crse_flux = HALF*(cell_mm + cell_mp) - else - crse_flux = cell_mm + cell_mp + cell_pm + cell_pp - end if - end if - - if (ir(1) .eq. 2) then - crse_flux = crse_flux * 8.0_dp_t - else if (ir(1) .eq. 4) then - crse_flux = crse_flux * 64.0_dp_t - end if - - res(i,j,k) = res(i,j,k) + crse_flux + fine_flux(i,j,k) - end if - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo/Hi j side - ! - else if (side == -2 .or. side == 2) then - - j = lo(2) - jfine = ir(2)*j - - if (side == -2) then - joff = j+1 - sig_mm = 6 - sig_pm = 8 - sig_mp = 18 - sig_pp = 20 - else - joff = j-1 - sig_mm = 1 - sig_pm = 3 - sig_mp = 13 - sig_pp = 15 - end if - - !$OMP PARALLEL DO PRIVATE(i,k,lo_i_not,hi_i_not,lo_k_not,hi_k_not) & - !$OMP PRIVATE(cell_mm,cell_pm,cell_mp,cell_pp,crse_flux,ifine,kfine) - do k = lo(3),hi(3) - do i = lo(1),hi(1) - - kfine = ir(3)*k - ifine = ir(1)*i - - if (bc_dirichlet(mm_fine(ifine,jfine,kfine),1,0) .and. (.not.bc_dirichlet(mm_crse(i,j,k),1,0))) then - - lo_i_not = .false.; hi_i_not = .false.; lo_k_not = .false.; hi_k_not = .false. - - if (i == loflux(1) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,-1))) lo_i_not = .true. - if (i == hiflux(1) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,+1))) hi_i_not = .true. - if (k == loflux(3) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,-1))) lo_k_not = .true. - if (k == hiflux(3) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,+1))) hi_k_not = .true. - - cell_mm = ss(sig_mm,i,j,k)*(cc(i-1,joff,k-1) + cc(i-1,joff,k ) & - +cc(i ,joff,k-1) + cc(i-1,j ,k-1) - FOUR*cc(i ,j ,k) ) - cell_pm = ss(sig_pm,i,j,k)*(cc(i+1,joff,k-1) + cc(i+1,joff,k ) & - +cc(i ,joff,k-1) + cc(i+1,j ,k-1) - FOUR*cc(i ,j ,k) ) - cell_mp = ss(sig_mp,i,j,k)*(cc(i-1,joff,k+1) + cc(i-1,joff,k ) & - +cc(i ,joff,k+1) + cc(i-1,j ,k+1) - FOUR*cc(i ,j ,k) ) - cell_pp = ss(sig_pp,i,j,k)*(cc(i+1,joff,k+1) + cc(i+1,joff,k ) & - +cc(i ,joff,k+1) + cc(i+1,j ,k+1) - FOUR*cc(i ,j ,k) ) - - if (lo_k_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pp - else if (hi_i_not) then - crse_flux = THIRD*cell_mp - else - crse_flux = HALF*(cell_pp + cell_mp) - end if - else if (hi_k_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pm - else if (hi_i_not) then - crse_flux = THIRD*cell_mm - else - crse_flux = HALF*(cell_pm + cell_mm) - end if - else - if (lo_i_not) then - crse_flux = HALF*(cell_pm + cell_pp) - else if (hi_i_not) then - crse_flux = HALF*(cell_mm + cell_mp) - else - crse_flux = cell_mm + cell_mp + cell_pm + cell_pp - end if - end if - - if (ir(2) .eq. 2) then - crse_flux = crse_flux * 8.0_dp_t - else if (ir(2) .eq. 4) then - crse_flux = crse_flux * 64.0_dp_t - end if - - res(i,j,k) = res(i,j,k) + crse_flux + fine_flux(i,j,k) - end if - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo/Hi k side - ! - else if (side == -3 .or. side == 3) then - - k = lo(3) - kfine = ir(3)*k - - if (side == -3) then - koff = k+1 - sig_mm = 13 - sig_pm = 15 - sig_mp = 18 - sig_pp = 20 - else - koff = k-1 - sig_mm = 1 - sig_pm = 3 - sig_mp = 6 - sig_pp = 8 - end if - - !$OMP PARALLEL DO PRIVATE(i,j,lo_i_not,hi_i_not,lo_j_not,hi_j_not) & - !$OMP PRIVATE(cell_mm,cell_pm,cell_mp,cell_pp,crse_flux,ifine,jfine) - do j = lo(2),hi(2) - do i = lo(1),hi(1) - - jfine = ir(2)*j - ifine = ir(1)*i - - if (bc_dirichlet(mm_fine(ifine,jfine,kfine),1,0) .and. (.not.bc_dirichlet(mm_crse(i,j,k),1,0))) then - - lo_i_not = .false.; hi_i_not = .false.; lo_j_not = .false.; hi_j_not = .false. - - if (i == loflux(1) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,-1))) lo_i_not = .true. - if (i == hiflux(1) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,+1))) hi_i_not = .true. - if (j == loflux(2) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,-1))) lo_j_not = .true. - if (j == hiflux(2) .and. (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,+1))) hi_j_not = .true. - - cell_mm = ss(sig_mm,i,j,k)*(cc(i-1,j-1,koff) + cc(i-1,j ,koff) & - +cc(i ,j-1,koff) + cc(i-1,j-1,k ) - FOUR*cc(i ,j ,k) ) - cell_pm = ss(sig_pm,i,j,k)*(cc(i+1,j-1,koff) + cc(i+1,j ,koff) & - +cc(i ,j-1,koff) + cc(i+1,j-1,k ) - FOUR*cc(i ,j ,k) ) - cell_mp = ss(sig_mp,i,j,k)*(cc(i-1,j+1,koff) + cc(i-1,j ,koff) & - +cc(i ,j+1,koff) + cc(i-1,j+1,k ) - FOUR*cc(i ,j ,k) ) - cell_pp = ss(sig_pp,i,j,k)*(cc(i+1,j+1,koff) + cc(i+1,j ,koff) & - +cc(i ,j+1,koff) + cc(i+1,j+1,k ) - FOUR*cc(i ,j ,k) ) - - if (lo_j_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pp - else if (hi_i_not) then - crse_flux = THIRD*cell_mp - else - crse_flux = HALF*(cell_pp + cell_mp) - end if - else if (hi_j_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pm - else if (hi_i_not) then - crse_flux = THIRD*cell_mm - else - crse_flux = HALF*(cell_pm + cell_mm) - end if - else - if (lo_i_not) then - crse_flux = HALF*(cell_pm + cell_pp) - else if (hi_i_not) then - crse_flux = HALF*(cell_mm + cell_mp) - else - crse_flux = cell_mm + cell_mp + cell_pm + cell_pp - end if - end if - - if (ir(3) .eq. 2) then - crse_flux = crse_flux * 8.0_dp_t - else if (ir(3) .eq. 4) then - crse_flux = crse_flux * 64.0_dp_t - end if - - res(i,j,k) = res(i,j,k) + crse_flux + fine_flux(i,j,k) - end if - end do - end do - !$OMP END PARALLEL DO - end if - - else if (size(ss,dim=1) .eq. 7) then - ! - ! Cross stencil - ! - ! Lo/Hi i side - ! - if (side == -1 .or. side == 1) then - - i = lo(1) - ifine = ir(1)*i - - if (side == -1) then - ioff = i+1 - sig_i = 1 - else if (side == 1) then - ioff = i-1 - sig_i = 2 - end if - - !$OMP PARALLEL DO PRIVATE(j,k,lo_j_not,hi_j_not,lo_k_not,hi_k_not) & - !$OMP PRIVATE(cell_mm,cell_pm,cell_mp,cell_pp,crse_flux,jfine,kfine) - do k = lo(3),hi(3) - do j = lo(2),hi(2) - - kfine = ir(3)*k - jfine = ir(2)*j - - if (bc_dirichlet(mm_fine(ifine,jfine,kfine),1,0) .and. (.not. bc_dirichlet(mm_crse(i,j,k),1,0))) then - - lo_j_not = .false.; hi_j_not = .false.; lo_k_not = .false.; hi_k_not = .false. - - if (j == loflux(2)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,-1)) lo_j_not = .true. - end if - if (j == hiflux(2)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,+1)) hi_j_not = .true. - end if - if (k == loflux(3)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,-1)) lo_k_not = .true. - end if - if (k == hiflux(3)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,+1)) hi_k_not = .true. - end if - - cell_mm = FOURTH*ss(sig_i,i,j,k)*(cc(ioff,j,k)-cc(i,j,k)) & - +FOURTH*ss(4,i,j,k)*(cc(i,j-1,k)-cc(i,j,k)) & - +FOURTH*ss(6,i,j,k)*(cc(i,j,k-1)-cc(i,j,k)) - - cell_pm = FOURTH*ss(sig_i,i,j,k)*(cc(ioff,j,k)-cc(i,j,k)) & - +FOURTH*ss(3,i,j,k)*(cc(i,j+1,k)-cc(i,j,k)) & - +FOURTH*ss(6,i,j,k)*(cc(i,j,k-1)-cc(i,j,k)) - - cell_mp = FOURTH*ss(sig_i,i,j,k)*(cc(ioff,j,k)-cc(i,j,k)) & - +FOURTH*ss(4,i,j,k)*(cc(i,j-1,k)-cc(i,j,k)) & - +FOURTH*ss(5,i,j,k)*(cc(i,j,k+1)-cc(i,j,k)) - - cell_pp = FOURTH*ss(sig_i,i,j,k)*(cc(ioff,j,k)-cc(i,j,k)) & - +FOURTH*ss(3,i,j,k)*(cc(i,j+1,k)-cc(i,j,k)) & - +FOURTH*ss(5,i,j,k)*(cc(i,j,k+1)-cc(i,j,k)) - - crse_flux = zero - - if (lo_k_not) then - if (lo_j_not) then - crse_flux = THIRD*cell_pp - else if (hi_j_not) then - crse_flux = THIRD*cell_mp - else - crse_flux = HALF*(cell_pp + cell_mp) - end if - else if (hi_k_not) then - if (lo_j_not) then - crse_flux = THIRD*cell_pm - else if (hi_j_not) then - crse_flux = THIRD*cell_mm - else - crse_flux = HALF*(cell_pm + cell_mm) - end if - else - if (lo_j_not) then - crse_flux = HALF*(cell_pm + cell_pp) - else if (hi_j_not) then - crse_flux = HALF*(cell_mm + cell_mp) - else - crse_flux = cell_mm + cell_mp + cell_pm + cell_pp - end if - end if - - if (ir(1) .eq. 2) then - crse_flux = crse_flux * 8.0_dp_t - else if (ir(1) .eq. 4) then - crse_flux = crse_flux * 64.0_dp_t - end if - - res(i,j,k) = res(i,j,k) + crse_flux + fine_flux(i,j,k) - end if - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo/Hi j side - ! - else if (side == -2 .or. side == 2) then - - j = lo(2) - jfine = ir(2)*j - - if (side == -2) then - joff = j+1 - sig_j = 3 - else - joff = j-1 - sig_j = 4 - end if - - !$OMP PARALLEL DO PRIVATE(i,k,lo_i_not,hi_i_not,lo_k_not,hi_k_not) & - !$OMP PRIVATE(cell_mm,cell_pm,cell_mp,cell_pp,crse_flux,ifine,kfine) - do k = lo(3),hi(3) - do i = lo(1),hi(1) - - kfine = ir(3)*k - ifine = ir(1)*i - - if (bc_dirichlet(mm_fine(ifine,jfine,kfine),1,0) .and. (.not.bc_dirichlet(mm_crse(i,j,k),1,0))) then - - lo_i_not = .false.; hi_i_not = .false.; lo_k_not = .false.; hi_k_not = .false. - - if (i == loflux(1)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,-1)) lo_i_not = .true. - end if - if (i == hiflux(1)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,+1)) hi_i_not = .true. - end if - if (k == loflux(3)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,-1)) lo_k_not = .true. - end if - if (k == hiflux(3)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),3,+1)) hi_k_not = .true. - end if - - cell_mm = FOURTH*ss(sig_j,i,j,k)*(cc(i,joff,k)-cc(i,j,k)) & - +FOURTH*ss(2,i,j,k)*(cc(i-1,j,k)-cc(i,j,k)) & - +FOURTH*ss(6,i,j,k)*(cc(i,j,k-1)-cc(i,j,k)) - - cell_pm = FOURTH*ss(sig_j,i,j,k)*(cc(i,joff,k)-cc(i,j,k)) & - +FOURTH*ss(1,i,j,k)*(cc(i+1,j,k)-cc(i,j,k))& - +FOURTH*ss(6,i,j,k)*(cc(i,j,k-1)-cc(i,j,k)) - - cell_mp = FOURTH*ss(sig_j,i,j,k)*(cc(i,joff,k)-cc(i,j,k)) & - +FOURTH*ss(2,i,j,k)*(cc(i-1,j,k)-cc(i,j,k)) & - +FOURTH*ss(5,i,j,k)*(cc(i,j,k+1)-cc(i,j,k)) - - cell_pp = FOURTH*ss(sig_j,i,j,k)*(cc(i,joff,k)-cc(i,j,k)) & - +FOURTH*ss(1,i,j,k)*(cc(i+1,j,k)-cc(i,j,k)) & - +FOURTH*ss(5,i,j,k)*(cc(i,j,k+1)-cc(i,j,k)) - - if (lo_k_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pp - else if (hi_i_not) then - crse_flux = THIRD*cell_mp - else - crse_flux = HALF*(cell_pp + cell_mp) - end if - else if (hi_k_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pm - else if (hi_i_not) then - crse_flux = THIRD*cell_mm - else - crse_flux = HALF*(cell_pm + cell_mm) - end if - else - if (lo_i_not) then - crse_flux = HALF*(cell_pm + cell_pp) - else if (hi_i_not) then - crse_flux = HALF*(cell_mm + cell_mp) - else - crse_flux = cell_mm + cell_mp + cell_pm + cell_pp - end if - end if - - if (ir(2) .eq. 2) then - crse_flux = crse_flux * 8.0_dp_t - else if (ir(2) .eq. 4) then - crse_flux = crse_flux * 64.0_dp_t - end if - - res(i,j,k) = res(i,j,k) + crse_flux + fine_flux(i,j,k) - end if - end do - end do - !$OMP END PARALLEL DO - ! - ! Lo/Hi k side - ! - else if (side == -3 .or. side == 3) then - - k = lo(3) - kfine = ir(3)*k - - if (side == -3) then - koff = k+1 - sig_k = 5 - else - koff = k-1 - sig_k = 6 - end if - - !$OMP PARALLEL DO PRIVATE(i,j,lo_i_not,hi_i_not,lo_j_not,hi_j_not) & - !$OMP PRIVATE(cell_mm,cell_pm,cell_mp,cell_pp,crse_flux,ifine,jfine) - do j = lo(2),hi(2) - do i = lo(1),hi(1) - - jfine = ir(2)*j - ifine = ir(1)*i - - if (bc_dirichlet(mm_fine(ifine,jfine,kfine),1,0) .and. (.not.bc_dirichlet(mm_crse(i,j,k),1,0))) then - - lo_i_not = .false.; hi_i_not = .false.; lo_j_not = .false.; hi_j_not = .false. - - if (i == loflux(1)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,-1)) lo_i_not = .true. - end if - if (i == hiflux(1)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),1,+1)) hi_i_not = .true. - end if - if (j == loflux(2)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,-1)) lo_j_not = .true. - end if - if (j == hiflux(2)) then - if (.not. bc_neumann(mm_fine(ifine,jfine,kfine),2,+1)) hi_j_not = .true. - end if - - cell_mm = FOURTH*ss(sig_k,i,j,k)*(cc(i,j,koff)-cc(i,j,k)) & - +FOURTH*ss(2,i,j,k)*(cc(i-1,j,k)-cc(i,j,k)) & - +FOURTH*ss(4,i,j,k)*(cc(i,j-1,k)-cc(i,j,k)) - - cell_pm = FOURTH*ss(sig_k,i,j,k)*(cc(i,j,koff)-cc(i,j,k)) & - +FOURTH*ss(1,i,j,k)*(cc(i+1,j,k)-cc(i,j,k))& - +FOURTH*ss(4,i,j,k)*(cc(i,j-1,k)-cc(i,j,k)) - - cell_mp = FOURTH*ss(sig_k,i,j,k)*(cc(i,j,koff)-cc(i,j,k)) & - +FOURTH*ss(2,i,j,k)*(cc(i-1,j,k)-cc(i,j,k)) & - +FOURTH*ss(3,i,j,k)*(cc(i,j+1,k)-cc(i,j,k)) - - cell_pp = FOURTH*ss(sig_k,i,j,k)*(cc(i,j,koff)-cc(i,j,k)) & - +FOURTH*ss(1,i,j,k)*(cc(i+1,j,k)-cc(i,j,k)) & - +FOURTH*ss(3,i,j,k)*(cc(i,j+1,k)-cc(i,j,k)) - - if (lo_j_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pp - else if (hi_i_not) then - crse_flux = THIRD*cell_mp - else - crse_flux = HALF*(cell_pp + cell_mp) - end if - else if (hi_j_not) then - if (lo_i_not) then - crse_flux = THIRD*cell_pm - else if (hi_i_not) then - crse_flux = THIRD*cell_mm - else - crse_flux = HALF*(cell_pm + cell_mm) - end if - else - if (lo_i_not) then - crse_flux = HALF*(cell_pm + cell_pp) - else if (hi_i_not) then - crse_flux = HALF*(cell_mm + cell_mp) - else - crse_flux = cell_mm + cell_mp + cell_pm + cell_pp - end if - end if - - if (ir(3) .eq. 2) then - crse_flux = crse_flux * 8.0_dp_t - else if (ir(3) .eq. 4) then - crse_flux = crse_flux * 64.0_dp_t - end if - - res(i,j,k) = res(i,j,k) + crse_flux + fine_flux(i,j,k) - end if - end do - end do - !$OMP END PARALLEL DO - end if - - end if - - end subroutine ml_interface_3d_nodal - - subroutine ml_fine_contrib(flux, res, mm, ratio, crse_domain, side) - use bl_prof_module - type(multifab), intent(inout) :: flux - type(multifab), intent(inout) :: res - type(imultifab), intent(in) :: mm - type(box) :: crse_domain - type(box) :: fbox - integer :: side - integer :: ratio(:) - integer :: lof(get_dim(flux)), dm - integer :: lo_dom(get_dim(flux)), hi_dom(get_dim(flux)) - integer :: i, n, dir - real(kind=dp_t), pointer :: fp(:,:,:,:) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer , pointer :: mp(:,:,:,:) - integer :: nc - logical :: pmask(get_dim(res)) - type(bl_prof_timer), save :: bpt - - call build(bpt, "ml_fine_contrib") - - nc = ncomp(res) - - if ( ncomp(res) /= ncomp(flux) ) then - call bl_error("ML_FILL_FLUXES: res%nc /= flux%nc") - end if - - lo_dom = lwb(crse_domain) - hi_dom = upb(crse_domain) - - if ( nodal_q(res) ) hi_dom = hi_dom + 1 - - dir = iabs(side) - pmask = get_pmask(get_layout(res)) - dm = get_dim(flux) - - !$OMP PARALLEL DO PRIVATE(i,n,fbox,lof,fp,rp,mp) - do i = 1, nfabs(flux) - fbox = get_ibox(flux,i) - lof = lwb(fbox) - fp => dataptr(flux, i) - rp => dataptr(res, i) - mp => dataptr(mm, i) - do n = 1, nc - if ( pmask(dir) .or. & - (lof(dir) /= lo_dom(dir) .and. lof(dir) /= hi_dom(dir)) ) then - select case(dm) - case (1) - call fine_edge_resid_1d(fp(:,1,1,n), rp(:,1,1,1), mp(:,1,1,1), ratio, side, lof) - case (2) - call fine_edge_resid_2d(fp(:,:,1,n), rp(:,:,1,1), mp(:,:,1,1), ratio, side, lof) - case (3) - call fine_edge_resid_3d(fp(:,:,:,n), rp(:,:,:,1), mp(:,:,:,1), ratio, side, lof) - end select - end if - end do - end do - !$OMP END PARALLEL DO - call destroy(bpt) - end subroutine ml_fine_contrib - - subroutine fine_edge_resid_1d(dd, res, mm, ratio, side, lod) - - integer , intent(in ) :: lod(1) - real (kind = dp_t), intent(inout) :: dd(lod(1):) - real (kind = dp_t), intent(in ) :: res(-1:) - integer , intent(in ) :: mm( 0:) - integer, intent(in) :: ratio(:), side - - integer :: i,ic,m,isign,ioff,nx,nxc - real (kind = dp_t) :: fac,fac0 - - nx = size(mm,dim=1)-1 - nxc = size(dd,dim=1) - -! Lo/Hi i side - if (side == -1) then - i = 0 - isign = 1 - else - i = nx - isign = -1 - end if - - ic = lod(1) - - dd(ic) = res(i) - -! Average towards the interior of the fine grid - fac0 = ONE / ratio(1) - do m = 1,ratio(1)-1 - fac = (ratio(1)-m) * fac0 - ioff = i+isign*m - dd(ic) = dd(ic) + fac * res(ioff) - end do - - if (.not.bc_dirichlet(mm(i),1,0)) dd(ic) = ZERO - - end subroutine fine_edge_resid_1d - - subroutine fine_edge_resid_2d(dd, res, mm, ratio, side, lod) - - use impose_neumann_bcs_module - - integer , intent(in ) :: lod(2) - real (kind = dp_t), intent(inout) :: dd(lod(1):,lod(2):) - real (kind = dp_t), intent(inout) :: res(-1:,-1:) - integer , intent(in ) :: mm( 0:, 0:) - integer, intent(in) :: ratio(:), side - integer :: nx, ny, nxc, nyc - integer :: hid(2) - integer :: lo(2),ng_res - integer :: i,j,ic,jc,m,n,isign,ioff,joff - integer :: ileft,irght,jbot,jtop - real (kind = dp_t) :: fac, fac0, fac1 - logical llo,lhi - - nx = size(mm,dim=1)-1 - ny = size(mm,dim=2)-1 - - nxc = size(dd,dim=1) - nyc = size(dd,dim=2) - - hid(1) = lod(1) + nxc-1 - hid(2) = lod(2) + nyc-1 - - lo(:) = 0 - ng_res = 1 - call impose_neumann_bcs_2d(res,mm,lo,ng_res) - -! Lo/Hi i side - if (side == -1 .or. side == 1) then - - if (side == -1) then - i = 0 - isign = 1 - else - i = nx - isign = -1 - end if - - ic = lod(1) - fac0 = ONE / ratio(2) - -! First average along the coarse-fine edge - do jc = lod(2),hid(2) - n = 0 - fac = HALF*ratio(2)*fac0 - j = (jc-lod(2))*ratio(2) - if (j > 0) dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - if (j < ny) dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - - do n = 1,ratio(2)-1 - fac = (ratio(2)-n)*fac0 - - j = (jc-lod(2))*ratio(2) + n - - if (j < ny) then - if (jc==lod(2)) then - if (.not. bc_dirichlet(mm(i,j),1,0)) fac = HALF * fac - end if - dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - end if - - j = (jc-lod(2))*ratio(2) - n - - if (j > 0) then - if (jc==hid(2)) then - if (.not. bc_dirichlet(mm(i,j),1,0)) fac = HALF * fac - end if - dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - end if - - end do - - end do - - j = 0 - if (bc_neumann(mm(i,j),2,-1)) dd(ic,lod(2)) = TWO*dd(ic,lod(2)) - - j = (hid(2)-lod(2))*ratio(2) - if (bc_neumann(mm(i,j),2, 1)) dd(ic,hid(2)) = TWO*dd(ic,hid(2)) - -! Now average towards the interior of the fine grid - fac0 = fac0 / ratio(1) - do n = 0,ratio(2)-1 - fac1 = (ratio(2)-n) * fac0 - if (n == 0) fac1 = HALF * fac1 - do m = 1,ratio(1)-1 - fac = (ratio(1)-m) * fac1 - ioff = i+isign*m - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - jbot = j-n - jtop = j+n - - if (j==0) then - if (bc_neumann(mm(i,j),2,-1)) jbot = jtop - end if - if (j==ny) then - if (bc_neumann(mm(i,j),2,+1)) jtop = jbot - end if - - llo = .false. - lhi = .false. - - if (j==0) then - if (.not. bc_neumann(mm(i,j),2,-1)) llo = .true. - end if - if (j==ny) then - if (.not. bc_neumann(mm(i,j),2,+1)) lhi = .true. - end if - - if (llo) then - if (n==0) then - if (.not. bc_dirichlet(mm(ioff,j),1,0)) & - dd(ic,jc) = dd(ic,jc) + fac * res(ioff,j) - else - dd(ic,jc) = dd(ic,jc) + HALF * fac * res(ioff,jtop) - end if - else if (lhi) then - if (n==0) then - if (.not. bc_dirichlet(mm(ioff,j),1,0)) & - dd(ic,jc) = dd(ic,jc) + fac * res(ioff,j) - else - dd(ic,jc) = dd(ic,jc) + HALF * fac * res(ioff,jbot) - end if - else - dd(ic,jc) = dd(ic,jc) + fac * ( res(ioff,jtop) + & - res(ioff,jbot) ) - end if - end do - end do - end do - - do jc = lod(2),hid(2) - if (.not.bc_dirichlet(mm(i,(jc-lod(2))*ratio(2)),1,0)) dd(ic,jc) = ZERO - end do - -! Lo/Hi j side - else if (side == -2 .or. side == 2) then - - if (side == -2) then - j = 0 - isign = 1 - else - j = ny - isign = -1 - end if - - jc = lod(2) - fac0 = ONE / ratio(1) - -! First average along the coarse-fine edge - do ic = lod(1),hid(1) - do n = 0,ratio(1)-1 - fac = (ratio(1)-n)*fac0 - if (n == 0) fac = HALF * fac - - i = (ic-lod(1))*ratio(1) + n - - if (i == 0) then - dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - else if (i < nx) then - if (ic==lod(1) .and. n>0) then - if (.not. bc_dirichlet(mm(i,j),1,0)) fac = HALF * fac - end if - dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - end if - - i = (ic-lod(1))*ratio(1) - n - if (i == nx) then - dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - else if (i > 0) then - if (ic==hid(1) .and. n>0) then - if (.not. bc_dirichlet(mm(i,j),1,0)) fac = HALF * fac - end if - dd(ic,jc) = dd(ic,jc) + fac * res(i,j) - end if - end do - end do - - i = 0 - if (bc_neumann(mm(i,j),1,-1)) dd(lod(1),jc) = TWO*dd(lod(1),jc) - - i = (hid(1)-lod(1))*ratio(1) - if (bc_neumann(mm(i,j),1, 1)) dd(hid(1),jc) = TWO*dd(hid(1),jc) - -! Now average towards the interior of the fine grid - fac0 = fac0 / ratio(2) - do n = 0,ratio(1)-1 - fac1 = (ratio(1)-n) * fac0 - if (n == 0) fac1 = HALF * fac1 - do m = 1,ratio(2)-1 - joff = j + isign*m - fac = (ratio(2)-m) * fac1 - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - ileft = i-n - irght = i+n - - if (i==0) then - if (bc_neumann(mm(i,j),1,-1)) ileft = irght - end if - if (i==nx) then - if (bc_neumann(mm(i,j),1,+1)) irght = ileft - end if - - llo = .false. - lhi = .false. - - if (i==0) then - if (.not. bc_neumann(mm(i,j),1,-1)) llo = .true. - end if - if (i==nx) then - if (.not. bc_neumann(mm(i,j),1,+1)) lhi = .true. - end if - - if (llo) then - if (n==0) then - if (.not. bc_dirichlet(mm(i,joff),1,0)) & - dd(ic,jc) = dd(ic,jc) + fac * res(i,joff) - else - dd(ic,jc) = dd(ic,jc) + HALF * fac * res(irght,joff) - end if - else if (lhi) then - if (n==0) then - if (.not. bc_dirichlet(mm(i,joff),1,0)) & - dd(ic,jc) = dd(ic,jc) + fac * res(i,joff) - else - dd(ic,jc) = dd(ic,jc) + HALF * fac * res(ileft,joff) - end if - - else - dd(ic,jc) = dd(ic,jc) + fac * ( res(irght,joff) + & - res(ileft,joff) ) - end if - end do - end do - end do - - do ic = lod(1),hid(1) - if (.not.bc_dirichlet(mm((ic-lod(1))*ratio(1),j),1,0)) dd(ic,jc) = ZERO - end do - - end if - - end subroutine fine_edge_resid_2d - - subroutine fine_edge_resid_3d(dd, res, mm, ratio, side, lod) - - use impose_neumann_bcs_module - - integer, intent(in) :: lod(:) - real (kind = dp_t), intent(inout) :: dd(lod(1):,lod(2):,lod(3):) - real (kind = dp_t), intent(inout) :: res(-1:,-1:,-1:) - integer , intent(in ) :: mm(0:,0:,0:) - integer, intent(in) :: ratio(:),side - integer :: nx, ny, nz, nxc, nyc, nzc - integer :: hid(3),lo(3),ng_res - integer :: i,j,k,l,ic,jc,kc,m,n - integer :: isign,ioff,joff,koff - integer :: ileft,irght,jbot,jtop,kdwn,kup - real (kind = dp_t) :: fac, fac0, fac1, fac2, corner_fac - logical ll1,ll2,ll3,lh1,lh2,lh3 - - real (kind = dp_t), parameter :: VAL = (0.25_dp_t / 3.0_dp_t) - - nx = size(mm,dim=1)-1 - ny = size(mm,dim=2)-1 - nz = size(mm,dim=3)-1 - - nxc = size(dd,dim=1) - nyc = size(dd,dim=2) - nzc = size(dd,dim=3) - - hid(1) = lod(1) + nxc-1 - hid(2) = lod(2) + nyc-1 - hid(3) = lod(3) + nzc-1 - - lo = 0 - ng_res = 1 - call impose_neumann_bcs_3d(res,mm,lo,ng_res) - - if (side == -1 .or. side == 1) then - - if (side == -1) then - i = 0 - isign = 1 - else - i = nx - isign = -1 - end if - - ic = lod(1) - fac0 = 1.0_dp_t / (ratio(2)*ratio(3)) - ! - ! First average along the coarse-fine face. - ! - do kc = lod(3),hid(3) - do jc = lod(2),hid(2) - do n = 0,ratio(2)-1 - fac2 = (ratio(2)-n)*fac0 - if (n == 0) fac2 = HALF * fac2 - - j = (jc-lod(2))*ratio(2) + n - if (j < ny) then - do l = 0,ratio(3)-1 - fac = (ratio(3)-l)*fac2 - if (l == 0) fac = HALF * fac - - k = (kc-lod(3))*ratio(3) + l - if (k < nz) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - - k = (kc-lod(3))*ratio(3) - l - if (k > 0) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - end do - end if - - j = (jc-lod(2))*ratio(2) - n - if (j > 0) then - do l = 0,ratio(3)-1 - fac = (ratio(3)-l)*fac2 - if (l == 0) fac = HALF * fac - - k = (kc-lod(3))*ratio(3) + l - if (k < nz) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - - k = (kc-lod(3))*ratio(3) - l - if (k > 0) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - end do - end if - - end do - end do - end do - - jc = lod(2) - kc = lod(3) - j = 0 - k = 0 - if ( .not. bc_neumann(mm(i,j,k),2,-1) .and. (.not. bc_neumann(mm(i,j,k),3,-1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - jc = hid(2) - kc = lod(3) - j = ny - k = 0 - if ( .not. bc_neumann(mm(i,j,k),2,+1) .and. (.not. bc_neumann(mm(i,j,k),3,-1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - jc = lod(2) - kc = hid(3) - j = 0 - k = nz - if ( .not. bc_neumann(mm(i,j,k),2,-1) .and. (.not. bc_neumann(mm(i,j,k),3,+1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - jc = hid(2) - kc = hid(3) - j = ny - k = nz - if ( .not. bc_neumann(mm(i,j,k),2,+1) .and. (.not. bc_neumann(mm(i,j,k),3,+1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - j = 0 - do kc = lod(3),hid(3) - k = (kc-lod(3))*ratio(3) - if ( bc_neumann(mm(i,j,k),2,-1) ) dd(ic,lod(2),kc) = TWO*dd(ic,lod(2),kc) - end do - - j = (hid(2)-lod(2))*ratio(2) - do kc = lod(3),hid(3) - k = (kc-lod(3))*ratio(3) - if ( bc_neumann(mm(i,j,k),2, 1) ) dd(ic,hid(2),kc) = TWO*dd(ic,hid(2),kc) - end do - - k = 0 - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - if ( bc_neumann(mm(i,j,k),3,-1) ) dd(ic,jc,lod(3)) = TWO*dd(ic,jc,lod(3)) - end do - - k = (hid(3)-lod(3))*ratio(3) - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - if ( bc_neumann(mm(i,j,k),3, 1) ) dd(ic,jc,hid(3)) = TWO*dd(ic,jc,hid(3)) - end do - ! - ! Now average towards the interior of the grid. - ! - fac0 = fac0 / ratio(1) - ic = lod(1) - do l = 0, ratio(3)-1 - fac2 = (ratio(3)-l) * fac0 - if (l == 0) fac2 = HALF * fac2 - do n = 0, ratio(2)-1 - fac1 = (ratio(2)-n) * fac2 - if (n == 0) fac1 = HALF * fac1 - do m = 1, ratio(1)-1 - ioff = i+isign*m - fac = (ratio(1)-m) * fac1 - if (m == 0) fac = HALF * fac - - do kc = lod(3),hid(3) - k = (kc-lod(3))*ratio(3) - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - jtop = j+n - jbot = j-n - kup = k+l - kdwn = k-l - if (j==0 .and. bc_neumann(mm(i,j,k),2,-1)) jbot = jtop - if (j==ny .and. bc_neumann(mm(i,j,k),2,+1)) jtop = jbot - if (k==0 .and. bc_neumann(mm(i,j,k),3,-1)) kdwn = kup - if (k==nz .and. bc_neumann(mm(i,j,k),3,+1)) kup = kdwn - - ll2 = .false.; lh2 = .false.; ll3 = .false.; lh3 = .false. - - if (jc==lod(2) .and. (.not. bc_neumann(mm(i,j,k),2,-1))) ll2 = .true. - if (jc==hid(2) .and. (.not. bc_neumann(mm(i,j,k),2,+1))) lh2 = .true. - if (kc==lod(3) .and. (.not. bc_neumann(mm(i,j,k),3,-1))) ll3 = .true. - if (kc==hid(3) .and. (.not. bc_neumann(mm(i,j,k),3,+1))) lh3 = .true. - - if ( ( ll2 .or. lh2 ) .and. ( ll3 .or. lh3 ) ) then - corner_fac = THIRD - else if ( ( ll2 .or. lh2 ) .and. .not. ( ll3 .or. lh3 ) ) then - corner_fac = HALF - else if ( .not. ( ll2 .or. lh2 ) .and. ( ll3 .or. lh3 ) ) then - corner_fac = HALF - else - corner_fac = 1.0_dp_t - end if - - ll2 = (j-n > 0); if (.not. ll2) ll2 = bc_neumann(mm(i,j,k),2,-1) - lh2 = (j-n < ny); if (.not. lh2) lh2 = bc_neumann(mm(i,j,k),2,+1) - ll3 = (k-l > 0); if (.not. ll3) ll3 = bc_neumann(mm(i,j,k),3,-1) - lh3 = (k-l < nz); if (.not. lh3) lh3 = bc_neumann(mm(i,j,k),3,+1) - ll1 = (k+l > 0); if (.not. ll1) ll1 = bc_neumann(mm(i,j,k),3,-1) - lh1 = (k+l < nz); if (.not. lh1) lh1 = bc_neumann(mm(i,j,k),3,+1) - - if ( ll2 .and. lh2 ) then - if ( ll3 .and. lh3 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ioff,jbot,kdwn) - if ( ll1 .and. lh1 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ioff,jbot,kup) - end if - - ll2 = (j+n > 0); if (.not. ll2) ll2 = bc_neumann(mm(i,j,k),2,-1) - lh2 = (j+n < ny); if (.not. lh2) lh2 = bc_neumann(mm(i,j,k),2,+1) - - if ( ll2 .and. lh2 ) then - if ( ll3 .and. lh3 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ioff,jtop,kdwn) - if ( ll1 .and. lh1 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ioff,jtop,kup) - end if - - end do - end do - - end do - end do - end do - - do kc = lod(3),hid(3) - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - k = (kc-lod(3))*ratio(3) - if ( .not. bc_dirichlet(mm(i,j,k),1,0) ) dd(ic,jc,kc) = ZERO - end do - end do - - else if (side == -2 .or. side == 2) then - - if (side == -2) then - j = 0 - isign = 1 - else - j = ny - isign = -1 - end if - - jc = lod(2) - fac0 = 1.0_dp_t / (ratio(1)*ratio(3)) - ! - ! First average along the coarse-fine face. - ! - do kc = lod(3),hid(3) - do ic = lod(1),hid(1) - do n = 0,ratio(1)-1 - fac2 = (ratio(1)-n)*fac0 - if (n == 0) fac2 = HALF * fac2 - - i = (ic-lod(1))*ratio(1) + n - if (i < nx) then - do l = 0,ratio(3)-1 - fac = (ratio(3)-l)*fac2 - if (l == 0) fac = HALF * fac - - k = (kc-lod(3))*ratio(3) + l - if (k < nz) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - - k = (kc-lod(3))*ratio(3) - l - if (k > 0) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - end do - end if - - i = (ic-lod(1))*ratio(1) - n - if (i > 0) then - do l = 0,ratio(3)-1 - fac = (ratio(3)-l)*fac2 - if (l == 0) fac = HALF * fac - - k = (kc-lod(3))*ratio(3) + l - if (k < nz) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - - k = (kc-lod(3))*ratio(3) - l - if (k > 0) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - end do - end if - - end do - end do - end do - - ic = lod(1) - kc = lod(3) - i = 0 - k = 0 - if ( .not. bc_neumann(mm(i,j,k),1,-1) .and. (.not. bc_neumann(mm(i,j,k),3,-1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - ic = hid(1) - kc = lod(3) - i = nx - k = 0 - if ( .not. bc_neumann(mm(i,j,k),1,+1) .and. (.not. bc_neumann(mm(i,j,k),3,-1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - ic = lod(1) - kc = hid(3) - i = 0 - k = nz - if ( .not. bc_neumann(mm(i,j,k),1,-1) .and. (.not. bc_neumann(mm(i,j,k),3,+1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - ic = hid(1) - kc = hid(3) - i = nx - k = nz - if ( .not. bc_neumann(mm(i,j,k),1,+1) .and. (.not. bc_neumann(mm(i,j,k),3,+1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - i = 0 - do kc = lod(3),hid(3) - k = (kc-lod(3))*ratio(3) - if ( bc_neumann(mm(i,j,k),1,-1) ) dd(lod(1),jc,kc) = TWO*dd(lod(1),jc,kc) - end do - - i = (hid(1)-lod(1))*ratio(1) - do kc = lod(3),hid(3) - k = (kc-lod(3))*ratio(3) - if ( bc_neumann(mm(i,j,k),1, 1) ) dd(hid(1),jc,kc) = TWO*dd(hid(1),jc,kc) - end do - - k = 0 - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - if ( bc_neumann(mm(i,j,k),3,-1) ) dd(ic,jc,lod(3)) = TWO*dd(ic,jc,lod(3)) - end do - - k = (hid(3)-lod(3))*ratio(3) - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - if ( bc_neumann(mm(i,j,k),3, 1) ) dd(ic,jc,hid(3)) = TWO*dd(ic,jc,hid(3)) - end do - ! - ! Now average towards the interior of the grid. - ! - fac0 = fac0 / ratio(2) - jc = lod(2) - do l = 0, ratio(3)-1 - fac2 = (ratio(3)-l) * fac0 - if (l == 0) fac2 = HALF * fac2 - do n = 0, ratio(1)-1 - fac1 = (ratio(1)-n) * fac2 - if (n == 0) fac1 = HALF * fac1 - do m = 1, ratio(2)-1 - joff = j+isign*m - fac = (ratio(2)-m) * fac1 - if (m == 0) fac = HALF * fac - - do kc = lod(3),hid(3) - k = (kc-lod(3))*ratio(3) - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - irght = i+n - ileft = i-n - kup = k+l - kdwn = k-l - if (i==0 .and. bc_neumann(mm(i,j,k),1,-1)) ileft = irght - if (i==nx .and. bc_neumann(mm(i,j,k),1,+1)) irght = ileft - if (k==0 .and. bc_neumann(mm(i,j,k),3,-1)) kdwn = kup - if (k==nz .and. bc_neumann(mm(i,j,k),3,+1)) kup = kdwn - - ll1 = .false.; lh1 = .false.; ll3 = .false.; lh3 = .false. - - if (ic==lod(1) .and. (.not. bc_neumann(mm(i,j,k),1,-1))) ll1 = .true. - if (ic==hid(1) .and. (.not. bc_neumann(mm(i,j,k),1,+1))) lh1 = .true. - if (kc==lod(3) .and. (.not. bc_neumann(mm(i,j,k),3,-1))) ll3 = .true. - if (kc==hid(3) .and. (.not. bc_neumann(mm(i,j,k),3,+1))) lh3 = .true. - - if ( ( ll1 .or. lh1 ) .and. ( ll3 .or. lh3 ) ) then - corner_fac = THIRD - else if ( ( ll1 .or. lh1 ) .and. .not. ( ll3 .or. lh3 ) ) then - corner_fac = HALF - else if ( .not. & - ( ll1 .or. lh1 ) .and. ( ll3 .or. lh3 ) ) then - corner_fac = HALF - else - corner_fac = 1.0_dp_t - end if - - ll1 = (i-n > 0); if (.not. ll1) ll1 = bc_neumann(mm(i,j,k),1,-1) - lh1 = (i-n < nx); if (.not. lh1) lh1 = bc_neumann(mm(i,j,k),1,+1) - ll2 = (k-l > 0); if (.not. ll2) ll2 = bc_neumann(mm(i,j,k),3,-1) - lh2 = (k-l < nz); if (.not. lh2) lh2 = bc_neumann(mm(i,j,k),3,+1) - ll3 = (k+l > 0); if (.not. ll3) ll3 = bc_neumann(mm(i,j,k),3,-1) - lh3 = (k+l < nz); if (.not. lh3) lh3 = bc_neumann(mm(i,j,k),3,+1) - - if ( ll1 .and. lh1 ) then - if ( ll2 .and. lh2 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ileft,joff,kdwn) - if ( ll3 .and. lh3 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ileft,joff,kup) - end if - - ll1 = (i+n > 0); if (.not. ll1) ll1 = bc_neumann(mm(i,j,k),1,-1) - lh1 = (i+n < nx); if (.not. lh1) lh1 = bc_neumann(mm(i,j,k),1,+1) - - if ( ll1 .and. lh1 ) then - if ( ll2 .and. lh2 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(irght,joff,kdwn) - if ( ll3 .and. lh3 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(irght,joff,kup) - end if - - end do - end do - - end do - end do - end do - - do kc = lod(3),hid(3) - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - k = (kc-lod(3))*ratio(3) - if ( .not. bc_dirichlet(mm(i,j,k),1,0) ) dd(ic,jc,kc) = ZERO - end do - end do - - else - - if (side == -3) then - k = 0 - isign = 1 - else - k = nz - isign = -1 - end if - - kc = lod(3) - fac0 = 1.0_dp_t / (ratio(1)*ratio(2)) - ! - ! First average along the coarse-fine face. - ! - do jc = lod(2),hid(2) - do ic = lod(1),hid(1) - do n = 0,ratio(1)-1 - fac2 = (ratio(1)-n)*fac0 - if (n == 0) fac2 = HALF * fac2 - - i = (ic-lod(1))*ratio(1) + n - if (i < nx) then - do l = 0,ratio(2)-1 - fac = (ratio(2)-l)*fac2 - if (l == 0) fac = HALF * fac - - j = (jc-lod(2))*ratio(2) + l - if (j < ny) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - - j = (jc-lod(2))*ratio(2) - l - if (j > 0) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - end do - end if - - i = (ic-lod(1))*ratio(1) - n - if (i > 0) then - do l = 0,ratio(2)-1 - fac = (ratio(2)-l)*fac2 - if (l == 0) fac = HALF * fac - - j = (jc-lod(2))*ratio(2) + l - if (j < ny) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - - j = (jc-lod(2))*ratio(2) - l - if (j > 0) dd(ic,jc,kc) = dd(ic,jc,kc) + fac * res(i,j,k) - end do - end if - - end do - end do - end do - - ic = lod(1) - jc = lod(2) - i = 0 - j = 0 - if ( .not. bc_neumann(mm(i,j,k),1,-1) .and. (.not. bc_neumann(mm(i,j,k),2,-1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - ic = hid(1) - jc = lod(2) - i = nx - j = 0 - if ( .not. bc_neumann(mm(i,j,k),1,+1) .and. (.not. bc_neumann(mm(i,j,k),2,-1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - ic = lod(1) - jc = hid(2) - i = 0 - j = ny - if ( .not. bc_neumann(mm(i,j,k),1,-1) .and. (.not. bc_neumann(mm(i,j,k),2,+1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - ic = hid(1) - jc = hid(2) - i = nx - j = ny - if ( .not. bc_neumann(mm(i,j,k),1,+1) .and. (.not. bc_neumann(mm(i,j,k),2,+1)) ) then - dd(ic,jc,kc) = dd(ic,jc,kc) + VAL * res(i,j,k) - end if - - i = 0 - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - if ( bc_neumann(mm(i,j,k),1,-1) ) dd(lod(1),jc,kc) = TWO*dd(lod(1),jc,kc) - end do - - i = (hid(1)-lod(1))*ratio(1) - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - if ( bc_neumann(mm(i,j,k),1,+1) ) dd(hid(1),jc,kc) = TWO*dd(hid(1),jc,kc) - end do - - j = 0 - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - if ( bc_neumann(mm(i,j,k),2,-1) ) dd(ic,lod(2),kc) = TWO*dd(ic,lod(2),kc) - end do - - j = (hid(2)-lod(2))*ratio(2) - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - if ( bc_neumann(mm(i,j,k),2,+1) ) dd(ic,hid(2),kc) = TWO*dd(ic,hid(2),kc) - end do - ! - ! Now average towards the interior of the grid. - ! - fac0 = fac0 / ratio(3) - kc = lod(3) - do l = 0, ratio(2)-1 - fac2 = (ratio(2)-l) * fac0 - if (l == 0) fac2 = HALF * fac2 - do n = 0, ratio(1)-1 - fac1 = (ratio(1)-n) * fac2 - if (n == 0) fac1 = HALF * fac1 - do m = 1, ratio(3)-1 - koff = k+isign*m - fac = (ratio(3)-m) * fac1 - if (m == 0) fac = HALF * fac - - do jc = lod(2),hid(2) - j = (jc-lod(2))*ratio(2) - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - irght = i+n - ileft = i-n - jtop = j+l - jbot = j-l - if (i==0 .and. bc_neumann(mm(i,j,k),1,-1)) ileft = irght - if (i==nx .and. bc_neumann(mm(i,j,k),1,+1)) irght = ileft - if (j==0 .and. bc_neumann(mm(i,j,k),2,-1)) jbot = jtop - if (j==ny .and. bc_neumann(mm(i,j,k),2,+1)) jtop = jbot - - ll1 = .false.; lh1 = .false.; ll2 = .false.; lh2 = .false. - - if (ic==lod(1) .and. (.not. bc_neumann(mm(i,j,k),1,-1))) ll1 = .true. - if (ic==hid(1) .and. (.not. bc_neumann(mm(i,j,k),1,+1))) lh1 = .true. - if (jc==lod(2) .and. (.not. bc_neumann(mm(i,j,k),2,-1))) ll2 = .true. - if (jc==hid(2) .and. (.not. bc_neumann(mm(i,j,k),2,+1))) lh2 = .true. - - if ( ( ll1 .or. lh1 ) .and. ( ll2 .or. lh2 ) ) then - corner_fac = THIRD - else if ( ( ll1 .or. lh1 ) .and. .not. ( ll2 .or. lh2 ) ) then - corner_fac = HALF - else if ( .not. & - ( ll1 .or. lh1 ) .and. ( ll2 .or. lh2 ) ) then - corner_fac = HALF - else - corner_fac = 1.0_dp_t - end if - - ll1 = (i-n > 0); if (.not. ll1) ll1 = bc_neumann(mm(i,j,k),1,-1) - lh1 = (i-n < nx); if (.not. lh1) lh1 = bc_neumann(mm(i,j,k),1,+1) - ll2 = (j-l > 0); if (.not. ll2) ll2 = bc_neumann(mm(i,j,k),2,-1) - lh2 = (j-l < ny); if (.not. lh2) lh2 = bc_neumann(mm(i,j,k),2,+1) - ll3 = (j+l > 0); if (.not. ll3) ll3 = bc_neumann(mm(i,j,k),2,-1) - lh3 = (j+l < ny); if (.not. lh3) lh3 = bc_neumann(mm(i,j,k),2,+1) - - if ( ll1 .and. lh1 ) then - if ( ll2 .and. lh2 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ileft,jbot,koff) - if ( ll3 .and. lh3 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(ileft,jtop,koff) - end if - - ll1 = (i+n > 0); if (.not. ll1) ll1 = bc_neumann(mm(i,j,k),1,-1) - lh1 = (i+n < nx); if (.not. lh1) lh1 = bc_neumann(mm(i,j,k),1,+1) - - if ( ll1 .and. lh1 ) then - if ( ll2 .and. lh2 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(irght,jbot,koff) - if ( ll3 .and. lh3 ) dd(ic,jc,kc) = dd(ic,jc,kc) + corner_fac * fac * res(irght,jtop,koff) - end if - - end do - end do - - end do - end do - end do - - do jc = lod(2),hid(2) - do ic = lod(1),hid(1) - i = (ic-lod(1))*ratio(1) - j = (jc-lod(2))*ratio(2) - if ( .not. bc_dirichlet(mm(i,j,k),1,0) ) dd(ic,jc,kc) = ZERO - end do - end do - - end if - - end subroutine fine_edge_resid_3d - -end module nodal_interface_stencil_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_mg_cpp.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_mg_cpp.f90 deleted file mode 100644 index ee030d5e8..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_mg_cpp.f90 +++ /dev/null @@ -1,936 +0,0 @@ -module nodal_cpp_mg_module - - use mg_module - use multifab_module - use ml_layout_module - use bl_constants_module - - implicit none - - type mg_server - - logical :: final = .false. - integer :: dim = 0 - integer :: nlevel - integer :: nu1, nu2, nuf, nub - integer :: max_iter - integer :: max_nlevel - integer :: min_width - integer :: smoother - integer :: cycle_type - integer :: verbose - integer :: cg_verbose - integer :: bottom_max_iter - integer :: bottom_solver - integer :: stencil_type - real(dp_t) :: bottom_solver_eps - real(dp_t) :: eps - type(ml_layout) :: mla - type(mg_tower) :: mg_tower_default - type(mg_tower), pointer :: mgt(:) => Null() - type(box), pointer :: pd(:) => Null() - logical, pointer :: nodal(:) => Null() - integer, pointer :: bc(:,:) => Null() - integer, pointer :: rr(:,:) - type(multifab) , pointer :: rh(:) => Null() - type(multifab) , pointer :: uu(:) => Null() - type(multifab) , pointer :: vel(:) => Null() - type(multifab) , pointer :: cell_coeffs(:) => Null() - type(multifab) , pointer :: amr_coeffs(:) => Null() - type(multifab) , pointer :: one_sided_ss(:) => Null() - type(lmultifab), pointer :: fine_mask(:) => Null() - type(multifab) , pointer :: sync_res(:) => Null() - type(multifab) , pointer :: sync_msk(:) => Null() - type(multifab) , pointer :: vold(:) => Null() - type(multifab) , pointer :: rhcc(:) => Null() - end type mg_server - - type(mg_server), save :: mgts - -contains - - subroutine mgt_verify(str) - character(len=*), intent(in) :: str - - if ( mgts%dim == 0 ) then - call bl_error( trim(str) // ": MGT invalid DIM: not allocated: ") - end if - - end subroutine mgt_verify - - subroutine mgt_verify_lev(str, lev) - integer, intent(in) :: lev - character(len=*), intent(in) :: str - call mgt_verify(str) - if ( lev < 1 .or. lev > mgts%nlevel ) then - call bl_error( trim(str) // ": Level out of bounds", lev) - end if - end subroutine mgt_verify_lev - - subroutine mgt_verify_n(str, lev, n, lo, hi) - integer, intent(in) :: lev, n, lo(:), hi(:) - character(len=*), intent(in) :: str - type(box) :: bx - - call mgt_verify_lev(str, lev) - if ( n < 1 .or. n > nboxes(mgts%mla, lev) ) then - call bl_error( trim(str) // ": Box out of bounds", n) - end if - bx = make_box(lo, hi) - if ( bx /= get_box(mgts%mla, lev, n) ) then - call bl_error( trim(str) // ": Box no filling") - end if - - end subroutine mgt_verify_n - - subroutine mgt_not_final(str) - character(len=*), intent(in) :: str - - call mgt_verify(str) - if ( mgts%final ) then - call bl_error( trim(str) // ": Changes made to finalized solver!") - end if - end subroutine mgt_not_final - -end module nodal_cpp_mg_module - -subroutine mgt_nodal_alloc(dm, nlevel, stencil_type_in) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: dm, nlevel, stencil_type_in - - if ( mgts%dim == 0 ) then - mgts%dim = dm - mgts%nlevel = nlevel - allocate(mgts%nodal(dm)) - mgts%nodal = .true. - end if - - mgts%stencil_type = stencil_type_in - - allocate(mgts%rr(nlevel-1,dm)) - allocate(mgts%rh(nlevel)) - allocate(mgts%vel(nlevel)) - allocate(mgts%pd(nlevel)) - allocate(mgts%uu(nlevel)) - allocate(mgts%mgt(nlevel)) - allocate(mgts%amr_coeffs(nlevel)) - allocate(mgts%one_sided_ss(nlevel)) - allocate(mgts%fine_mask(nlevel)) - - call build(mgts%mla, nlevel, dm) - -end subroutine mgt_nodal_alloc - -subroutine mgt_set_nodal_level(lev, nb, dm, lo, hi, pd_lo, pd_hi, pm, pmap) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, nb, dm - integer, intent(in) :: lo(nb,dm), hi(nb,dm), pd_lo(dm), pd_hi(dm), pm(dm), pmap(nb+1) - - type(box) :: bxs(nb) - integer :: i - logical :: pmask(dm) - integer :: flev - - flev = lev + 1 - call mgt_verify_lev("MGT_SET_NODAL_LEVEL", flev) - - pmask = (pm /= 0) - - if ( dm /= mgts%dim ) then - call bl_error("MGT_SET_NODAL_LEVEL: Input DIM doesn't match internal DIM") - end if - call build(mgts%pd(flev), pd_lo(1:dm), pd_hi(1:dm)) - do i = 1, nb - bxs(i) = make_box(lo(i,:), hi(i,:)) - end do - call build(mgts%mla%mba%bas(flev), bxs) - call build(mgts%mla%la(flev), & - mgts%mla%mba%bas(flev), & - mgts%pd(flev), pmask = pmask, & - mapping = LA_EXPLICIT, explicit_mapping = pmap(1:nb)) - -end subroutine mgt_set_nodal_level - -subroutine mgt_nodal_finalize(dx,bc) - - use nodal_cpp_mg_module - use stencil_types_module - - implicit none - real(dp_t), intent(in) :: dx(mgts%nlevel,mgts%dim) - integer , intent(in) :: bc(2,mgts%dim) - integer :: dm, i, nlev, n - integer :: ns - logical, allocatable :: nodal(:) - - integer :: max_nlevel_in - integer :: bottom_solver_in - - type(boxarray) :: bac - - integer :: bottom_max_iter_in - - call mgt_verify("MGT_FINALIZE") - - dm = mgts%dim - - allocate(mgts%bc(dm,2)) - mgts%bc = transpose(bc) - - allocate(nodal(1:dm)) - nodal = mgts%nodal - - nlev = mgts%nlevel - - do i = 1, nlev-1 - mgts%mla%mba%rr(i,:) = (upb(mgts%pd(i+1)) - lwb(mgts%pd(i+1)) + 1) / & - (upb(mgts%pd(i )) - lwb(mgts%pd(i )) + 1) - mgts%rr(i,:) = mgts%mla%mba%rr(i,:) - end do - - do i = 1, nlev - call build(mgts%uu(i) , mgts%mla%la(i), nc = 1, ng = 1, nodal = nodal) - call build(mgts%rh(i) , mgts%mla%la(i), nc = 1, ng = 1, nodal = nodal) - call build(mgts%vel(i), mgts%mla%la(i), nc =dm, ng = 1) - - call setval(mgts%uu(i),ZERO,all=.true.) - call setval(mgts%rh(i),ZERO,all=.true.) - call setval(mgts%vel(i),ZERO,all=.true.) - end do - - do i = nlev-1, 1, -1 - call build(mgts%mla%mask(i), mgts%mla%la(i), nc = 1, ng = 0) - call setval(mgts%mla%mask(i), val = .TRUE.) - call copy(bac, mgts%mla%mba%bas(i+1)) - call boxarray_coarsen(bac, mgts%rr(i,:)) - call setval(mgts%mla%mask(i), .false., bac) - call destroy(bac) - end do - - if (mgts%stencil_type .eq. ND_DENSE_STENCIL) then - - if ( parallel_ioprocessor() .and. mgts%verbose > 0 ) & - print *,'Using dense stencil in nodal solver ...' - - if (dm .eq. 3) then - if ( dx(nlev,1) .eq. dx(nlev,2) .and. dx(nlev,1) .eq. dx(nlev,3) ) then - ns = 21 - else - ns = 27 - end if - else if (dm .eq. 2) then - ns = 9 - end if - - else if (mgts%stencil_type .eq. ND_CROSS_STENCIL) then - - if ( parallel_ioprocessor() .and. mgts%verbose > 0 ) & - print *,'Using cross stencil in nodal solver ...' - - ns = 2*dm+1 - do n = nlev, 2, -1 - call multifab_build(mgts%one_sided_ss(n), mgts%mla%la(n), ns, 0, nodal, stencil=.true.) - end do - - else - if ( parallel_ioprocessor()) & - print *,'Dont know this stencil type ',mgts%stencil_type - call bl_error("MGT_FINALIZE: stuck") - end if - - do n = nlev, 1, -1 - if ( n == 1 ) then - max_nlevel_in = mgts%max_nlevel - bottom_solver_in = mgts%bottom_solver - bottom_max_iter_in = mgts%bottom_max_iter - else - if ( all(mgts%rr(n-1,:) == 2) ) then - max_nlevel_in = 1 - else if ( all(mgts%rr(n-1,:) == 4) ) then - max_nlevel_in = 2 - else - call bl_error("MGT_FINALIZE: confused about ref_ratio") - end if - bottom_solver_in = 0 - bottom_max_iter_in = mgts%nu1 - end if - - call mg_tower_build(mgts%mgt(n), mgts%mla%la(n), mgts%pd(n), mgts%bc, mgts%stencil_type, & - dh = dx(n,:), & - ns = ns, & - smoother = mgts%smoother, & - nu1 = mgts%nu1, & - nu2 = mgts%nu2, & - nuf = mgts%nuf, & - nub = mgts%nub, & - cycle_type = mgts%cycle_type, & - bottom_solver = bottom_solver_in, & - bottom_max_iter = bottom_max_iter_in, & - bottom_solver_eps = mgts%bottom_solver_eps, & - max_iter = mgts%max_iter, & - max_nlevel = max_nlevel_in, & - min_width = mgts%min_width, & - verbose = mgts%verbose, & - cg_verbose = mgts%cg_verbose, & - nodal = nodal) - - end do - - if ( parallel_IOProcessor() .and. mgts%verbose > 0) then - call mg_tower_print(mgts%mgt(nlev)) - end if - - deallocate(nodal) - deallocate(mgts%bc) - -end subroutine mgt_nodal_finalize - -subroutine mgt_init_nodal_coeffs_lev(lev) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev - integer :: nlev - integer :: flev - flev = lev + 1 - call mgt_verify_lev("MGT_INIT_STENCIL_LEV", flev) - - nlev = mgts%mgt(flev)%nlevels - allocate(mgts%cell_coeffs(nlev)) - - call build(mgts%cell_coeffs(nlev), mgts%mgt(flev)%ss(nlev)%la, 1, 1) - call setval(mgts%cell_coeffs(nlev), 0.0_dp_t, all=.true.) - - ! These only exist at amr levels, not the lower multigrid levels - call build(mgts%amr_coeffs(flev), mgts%mgt(flev)%ss(nlev)%la, 1, 1) - call setval(mgts%amr_coeffs(flev), 0.0_dp_t, all=.true.) - -end subroutine mgt_init_nodal_coeffs_lev - -subroutine mgt_finalize_nodal_stencil_lev(lev) - use nodal_cpp_mg_module - use nodal_stencil_fill_module - implicit none - integer, intent(in) :: lev - integer :: nlev - integer :: flev - - flev = lev + 1 - - call mgt_verify_lev("MGT_FINALIZE_NODAL_STENCIL_LEV", flev) - - nlev = mgts%mgt(flev)%nlevels - - call multifab_fill_boundary(mgts%cell_coeffs(nlev)) - - call stencil_fill_nodal_all_mglevels(mgts%mgt(flev), mgts%cell_coeffs, mgts%stencil_type) - - if (mgts%stencil_type .eq. ND_CROSS_STENCIL .and. flev .gt. 1) then - call stencil_fill_one_sided(mgts%one_sided_ss(flev), mgts%cell_coeffs(nlev), & - mgts%mgt(flev)%dh(:,nlev), & - mgts%mgt(flev)%mm(nlev), mgts%mgt(flev)%face_type) - end if - - call destroy(mgts%cell_coeffs(nlev)) - deallocate(mgts%cell_coeffs) - -end subroutine mgt_finalize_nodal_stencil_lev - -subroutine mgt_divu(lo_inflow, hi_inflow) - - use nodal_divu_module - use nodal_cpp_mg_module - - integer, intent(in) :: lo_inflow(3), hi_inflow(3) - - integer :: n - real(dp_t) :: r, rhmax - - call divu(mgts%nlevel,mgts%mgt,mgts%vel,mgts%rh,mgts%rr,mgts%nodal, & - lo_inflow, hi_inflow) - - if (mgts%verbose > 0) then - rhmax = norm_inf(mgts%rh(mgts%nlevel),local=.true.) - do n = mgts%nlevel-1, 1, -1 - r = norm_inf(mgts%rh(n),mgts%fine_mask(n),local=.true.) - rhmax = max(r,rhmax) - end do - call parallel_reduce(r, rhmax, MPI_MAX, proc = parallel_IOProcessorNode()) - rhmax = r - if (parallel_IOProcessor()) then - print *,'F90: Source norm is ',rhmax - endif - end if - -end subroutine mgt_divu - -subroutine mgt_newu() - use nodal_cpp_mg_module - use nodal_newu_module - - integer :: n - - do n = 1,mgts%nlevel - call mkunew(mgts%vel(n),mgts%uu(n),mgts%amr_coeffs(n), & - mgts%mgt(n)%dh(:,mgts%mgt(n)%nlevels), & - mgts%vel(n)%ng) - end do - -end subroutine mgt_newu - -subroutine mgt_finalize_nodal_stencil() - use nodal_mask_module - use nodal_cpp_mg_module - implicit none - integer :: i - call mgt_verify("MGT_FINALIZE_NODAL_STENCIL") - - do i = 1, mgts%nlevel-1 - call build(mgts%fine_mask(i), mgts%mla%la(i), nc = 1, ng = 0, nodal = mgts%nodal) - call setval(mgts%fine_mask(i), val = .TRUE., all = .TRUE.) - call create_nodal_mask(i,mgts%fine_mask(i), & - mgts%mgt(i )%mm(mgts%mgt(i )%nlevels), & - mgts%mgt(i+1)%mm(mgts%mgt(i+1)%nlevels), & - mgts%mla) - end do - - mgts%final = .true. -end subroutine mgt_finalize_nodal_stencil - -subroutine mgt_set_vel_1d(lev, n, vel_in, plo, phi, lo, hi, nv, iv) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1), nv, iv - real(kind=dp_t), intent(in) :: vel_in(plo(1):phi(1), nv) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - call mgt_verify_n("MGT_SET_VEL_1D", flev, fn, lo, hi) - - vp => dataptr(mgts%vel(flev), local_index(mgts%vel(flev),fn)) - vp(lo(1)-1:hi(1)+1,1,1,1) = vel_in(lo(1)-1:hi(1)+1,iv+1) - -end subroutine mgt_set_vel_1d - -subroutine mgt_get_vel_1d(lev, n, vel_out, plo, phi, lo, hi, nv, iv) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1), nv, iv - real(kind=dp_t), intent(inout) :: vel_out(plo(1):phi(1), nv) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - vp => dataptr(mgts%vel(flev), local_index(mgts%vel(flev),fn)) - vel_out(lo(1):hi(1),iv+1) = vp(lo(1):hi(1),1,1,1) - -end subroutine mgt_get_vel_1d - -subroutine mgt_set_vel_2d(lev, n, vel_in, plo, phi, lo, hi, nv, iv) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2), nv, iv - real(kind=dp_t), intent(in) :: vel_in(plo(1):phi(1), plo(2):phi(2), nv) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - call mgt_verify_n("MGT_SET_VEL_2D", flev, fn, lo, hi) - - vp => dataptr(mgts%vel(flev), local_index(mgts%vel(flev),fn)) - vp(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1, 1, 1:2) = & - vel_in(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1, iv+1:iv+2) - -end subroutine mgt_set_vel_2d - -subroutine mgt_get_vel_2d(lev, n, vel_out, plo, phi, lo, hi, nv, iv) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2), nv, iv - real(kind=dp_t), intent(inout) :: vel_out(plo(1):phi(1), plo(2):phi(2), nv) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - vp => dataptr(mgts%vel(flev), local_index(mgts%vel(flev),fn)) - vel_out(lo(1):hi(1), lo(2):hi(2), iv+1:iv+2) = vp(lo(1):hi(1), lo(2):hi(2), 1, 1:2) - -end subroutine mgt_get_vel_2d - -subroutine mgt_set_vel_3d(lev, n, vel_in, plo, phi, lo, hi, nv, iv) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3), nv, iv - real(kind=dp_t), intent(in) :: vel_in(plo(1):phi(1), plo(2):phi(2), plo(3):phi(3), nv) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - call mgt_verify_n("MGT_SET_VEL_3D", flev, fn, lo, hi) - - vp => dataptr(mgts%vel(flev), local_index(mgts%vel(flev),fn)) - vp(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1, lo(3)-1:hi(3)+1, 1:3) = & - vel_in(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1, lo(3)-1:hi(3)+1, iv+1:iv+3) - -end subroutine mgt_set_vel_3d - -subroutine mgt_get_vel_3d(lev, n, vel_out, plo, phi, lo, hi, nv, iv) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3), nv, iv - real(kind=dp_t), intent(inout) :: vel_out(plo(1):phi(1), plo(2):phi(2), plo(3):phi(3), nv) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - vp => dataptr(mgts%vel(flev), local_index(mgts%vel(flev),fn)) - vel_out(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3), iv+1:iv+3) = & - vp(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3), 1:3) - -end subroutine mgt_get_vel_3d - -subroutine mgt_set_cfs_1d(lev, n, cf, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1) - real(kind=dp_t), intent(in) :: cf(plo(1):phi(1)) - real(kind=dp_t), pointer :: cp(:,:,:,:) - real(kind=dp_t), pointer :: acp(:,:,:,:) - integer :: flev, fn, nlev - fn = n + 1 - flev = lev+1 - nlev = size(mgts%cell_coeffs) - call mgt_verify_n("MGT_SET_CFS_1D", flev, fn, lo, hi) - - cp => dataptr(mgts%cell_coeffs(nlev), local_index(mgts%cell_coeffs(nlev),fn)) - cp(lo(1):hi(1), 1, 1, 1) = cf(lo(1):hi(1)) - - acp => dataptr(mgts%amr_coeffs(flev), local_index(mgts%amr_coeffs(flev),fn)) - acp(lo(1):hi(1), 1, 1, 1) = cf(lo(1):hi(1)) - -end subroutine mgt_set_cfs_1d - -subroutine mgt_set_cfs_2d(lev, n, cf, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2) - real(kind=dp_t), intent(in) :: cf(plo(1):phi(1), plo(2):phi(2)) - real(kind=dp_t), pointer :: cp(:,:,:,:) - real(kind=dp_t), pointer :: acp(:,:,:,:) - integer :: flev, fn, nlev - fn = n + 1 - flev = lev+1 - nlev = size(mgts%cell_coeffs) - call mgt_verify_n("MGT_SET_CFS_2D", flev, fn, lo, hi) - - cp => dataptr(mgts%cell_coeffs(nlev), local_index(mgts%cell_coeffs(nlev),fn)) - cp(lo(1):hi(1), lo(2):hi(2), 1, 1) = cf(lo(1):hi(1), lo(2):hi(2)) - - acp => dataptr(mgts%amr_coeffs(flev), local_index(mgts%amr_coeffs(flev),fn)) - acp(lo(1):hi(1), lo(2):hi(2), 1, 1) = cf(lo(1):hi(1), lo(2):hi(2)) - -end subroutine mgt_set_cfs_2d - -subroutine mgt_set_cfs_3d(lev, n, cf, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3) - real(kind=dp_t), intent(in) :: cf(plo(1):phi(1), plo(2):phi(2), plo(3):phi(3)) - real(kind=dp_t), pointer :: cp(:,:,:,:) - real(kind=dp_t), pointer :: acp(:,:,:,:) - integer :: flev, fn, nlev - fn = n + 1 - flev = lev+1 - nlev = size(mgts%cell_coeffs) - call mgt_verify_n("MGT_SET_CFS_3D", flev, fn, lo, hi) - - cp => dataptr(mgts%cell_coeffs(nlev), local_index(mgts%cell_coeffs(nlev),fn)) - cp(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3), 1) = cf(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3)) - - acp => dataptr(mgts%amr_coeffs(flev), local_index(mgts%amr_coeffs(flev),fn)) - acp(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3), 1) = cf(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3)) - -end subroutine mgt_set_cfs_3d - -subroutine mgt_set_pr_1d(lev, n, uu, plo, phi, lo, hi, np, ip) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1), np, ip - real(kind=dp_t), intent(in) :: uu(plo(1):phi(1), np) - real(kind=dp_t), pointer :: up(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - up => dataptr(mgts%uu(flev), local_index(mgts%uu(flev),fn)) - up(lo(1)-1:hi(1)+1,1,1,1) = uu(lo(1)-1:hi(1)+1, ip+1) - -end subroutine mgt_set_pr_1d - -subroutine mgt_set_pr_2d(lev, n, uu, plo, phi, lo, hi, np, ip) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2), np, ip - real(kind=dp_t), intent(in) :: uu(plo(1):phi(1), plo(2):phi(2), np) - real(kind=dp_t), pointer :: up(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - up => dataptr(mgts%uu(flev), local_index(mgts%uu(flev),fn)) - up(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1,1,1) = uu(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1, ip+1) - -end subroutine mgt_set_pr_2d - -subroutine mgt_set_pr_3d(lev, n, uu, plo, phi, lo, hi, np, ip) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3), np, ip - real(kind=dp_t), intent(in) :: uu(plo(1):phi(1), plo(2):phi(2), plo(3):phi(3), np) - real(kind=dp_t), pointer :: up(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - up => dataptr(mgts%uu(flev), local_index(mgts%uu(flev),fn)) - up(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1, lo(3)-1:hi(3)+1, 1) = & - uu(lo(1)-1:hi(1)+1, lo(2)-1:hi(2)+1, lo(3)-1:hi(3)+1, ip+1) - -end subroutine mgt_set_pr_3d - -subroutine mgt_get_pr_1d(lev, n, uu, plo, phi, lo, hi, np, ip) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1), np, ip - real(kind=dp_t), intent(inout) :: uu(plo(1):phi(1), np) - real(kind=dp_t), pointer :: up(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - up => dataptr(mgts%uu(flev), local_index(mgts%uu(flev),fn)) - uu(lo(1):hi(1), ip+1) = up(lo(1):hi(1),1,1,1) - -end subroutine mgt_get_pr_1d - -subroutine mgt_get_pr_2d(lev, n, uu, plo, phi, lo, hi, np, ip) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2), np, ip - real(kind=dp_t), intent(inout) :: uu(plo(1):phi(1), plo(2):phi(2), np) - real(kind=dp_t), pointer :: up(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - up => dataptr(mgts%uu(flev), local_index(mgts%uu(flev),fn)) - uu(lo(1):hi(1), lo(2):hi(2), ip+1) = up(lo(1):hi(1), lo(2):hi(2),1,1) - -end subroutine mgt_get_pr_2d - -subroutine mgt_get_pr_3d(lev, n, uu, plo, phi, lo, hi, np, ip) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3), np, ip - real(kind=dp_t), intent(inout) :: uu(plo(1):phi(1), plo(2):phi(2), plo(3):phi(3), np) - real(kind=dp_t), pointer :: up(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - up => dataptr(mgts%uu(flev), local_index(mgts%uu(flev),fn)) - uu(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3), ip+1) = & - up(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3), 1) - -end subroutine mgt_get_pr_3d - -subroutine mgt_add_rh_nodal_1d(lev, n, rh_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1) - real(kind=dp_t), intent(in) :: rh_in(plo(1):phi(1)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - rp => dataptr(mgts%rh(flev), local_index(mgts%rh(flev),fn)) - rp(lo(1):hi(1),1,1,1) = rp(lo(1):hi(1),1,1,1) + rh_in(lo(1):hi(1)) - -end subroutine mgt_add_rh_nodal_1d - -subroutine mgt_add_rh_nodal_2d(lev, n, rh_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2) - real(kind=dp_t), intent(in) :: rh_in(plo(1):phi(1), plo(2):phi(2)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - rp => dataptr(mgts%rh(flev), local_index(mgts%rh(flev),fn)) - rp(lo(1):hi(1),lo(2):hi(2),1,1) = & - rp(lo(1):hi(1),lo(2):hi(2),1,1) + & - rh_in(lo(1):hi(1),lo(2):hi(2)) - -end subroutine mgt_add_rh_nodal_2d - -subroutine mgt_add_rh_nodal_3d(lev, n, rh_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3) - real(kind=dp_t), intent(in) :: rh_in(plo(1):phi(1),plo(2):phi(2),plo(3):phi(3)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - rp => dataptr(mgts%rh(flev), local_index(mgts%rh(flev),fn)) - rp(lo(1):hi(1),lo(2):hi(2),lo(3):hi(3),1) = & - rp(lo(1):hi(1),lo(2):hi(2),lo(3):hi(3),1) + & - rh_in(lo(1):hi(1),lo(2):hi(2),lo(3):hi(3)) - -end subroutine mgt_add_rh_nodal_3d - -subroutine mgt_nodal_dealloc() - use nodal_cpp_mg_module - implicit none - integer :: i - - call mgt_verify("MGT_NODAL_DEALLOC") - if ( .not. mgts%final ) then - call bl_error("MGT_NODAL_DEALLOC: MGT not finalized") - end if - - do i = 1, mgts%nlevel - call mg_tower_destroy(mgts%mgt(i)) - end do - - deallocate(mgts%nodal) - - do i = 1,mgts%nlevel - call destroy(mgts%rh(i)) - call destroy(mgts%uu(i)) - call destroy(mgts%vel(i)) - call destroy(mgts%amr_coeffs(i)) - end do - do i = 1,mgts%nlevel-1 - call destroy(mgts%fine_mask(i)) - end do - if (mgts%stencil_type .eq. ND_CROSS_STENCIL) then - do i = 2,mgts%nlevel - call destroy(mgts%one_sided_ss(i)) - end do - endif - call destroy(mgts%mla) - mgts%dim = 0 - mgts%final = .false. - - deallocate(mgts%rr) - deallocate(mgts%rh) - deallocate(mgts%vel) - deallocate(mgts%pd) - deallocate(mgts%uu) - deallocate(mgts%mgt) - deallocate(mgts%amr_coeffs) - deallocate(mgts%one_sided_ss) - deallocate(mgts%fine_mask) - - call parallel_finalize(.false.) ! do not finalize MPI but free communicator - -end subroutine mgt_nodal_dealloc - -subroutine mgt_nodal_solve(tol, abs_tol) - use nodal_cpp_mg_module - use ml_nd_module - - implicit none - real(kind=dp_t), intent(in) :: tol, abs_tol - - integer :: do_diagnostics - - call mgt_verify("MGT_SOLVE") - if ( .not. mgts%final ) then - call bl_error("MGT_SOLVE: MGT not finalized") - end if - - if (mgts%verbose >= 4) then - do_diagnostics = 1 - else - do_diagnostics = 0 - endif - - call ml_nd(mgts%mla, mgts%mgt, & - mgts%rh, mgts%uu, & - mgts%fine_mask, & - mgts%one_sided_ss(2:), mgts%rr, & - do_diagnostics, tol, abs_tol) - -end subroutine mgt_nodal_solve - -subroutine mgt_set_nodal_defaults(nu_1,nu_2,nu_b,nu_f,max_iter,bottom_max_iter, & - bottom_solver,bottom_solver_eps, & - verbose,cg_verbose,max_nlevel,min_width,cycle_type,smoother,stencil_type) - use nodal_cpp_mg_module - implicit none - integer , intent(in) :: nu_1,nu_2,nu_b,nu_f,max_iter,bottom_max_iter,bottom_solver - integer , intent(in) :: verbose, cg_verbose, max_nlevel, min_width, cycle_type, smoother, stencil_type - real(dp_t), intent(in) :: bottom_solver_eps - - call mgt_not_final("MGT_SET_NODAL_DEFAULTS") - - mgts%nu1 = nu_1 - mgts%nu2 = nu_2 - mgts%nuf = nu_f - mgts%nub = nu_b - mgts%max_iter = max_iter - mgts%verbose = verbose - mgts%cg_verbose = cg_verbose - mgts%smoother = smoother - mgts%cycle_type = cycle_type - mgts%bottom_max_iter = bottom_max_iter - mgts%bottom_solver = bottom_solver - mgts%bottom_solver_eps = bottom_solver_eps - mgts%max_nlevel = max_nlevel - mgts%min_width = min_width - - mgts%stencil_type = stencil_type - -end subroutine mgt_set_nodal_defaults - -subroutine mgt_get_nodal_defaults(nu_1,nu_2,nu_b,nu_f,max_iter,bottom_max_iter, & - bottom_solver, & - verbose,cg_verbose,max_nlevel,min_width,cycle_type,smoother) - use nodal_cpp_mg_module - implicit none - integer , intent(out) :: nu_1,nu_2,nu_b,nu_f,max_iter,bottom_max_iter,bottom_solver - integer , intent(out) :: verbose, cg_verbose, max_nlevel, min_width, cycle_type, smoother - - nu_1 = mgts%mg_tower_default%nu1 - nu_2 = mgts%mg_tower_default%nu2 - nu_f = mgts%mg_tower_default%nuf - nu_b = mgts%mg_tower_default%nub - max_iter = mgts%mg_tower_default%max_iter - verbose = mgts%mg_tower_default%verbose - cg_verbose = mgts%mg_tower_default%cg_verbose - smoother = mgts%mg_tower_default%smoother - cycle_type = mgts%mg_tower_default%cycle_type - - bottom_max_iter = mgts%mg_tower_default%bottom_max_iter - bottom_solver = mgts%mg_tower_default%bottom_solver - max_nlevel = mgts%mg_tower_default%max_nlevel - min_width = mgts%mg_tower_default%min_width - -end subroutine mgt_get_nodal_defaults - - -subroutine mgt_alloc_rhcc_nodal() - use nodal_cpp_mg_module - implicit none - integer :: i - - allocate(mgts%rhcc(mgts%nlevel)) - - do i = 1, mgts%nlevel - call build(mgts%rhcc(i), mgts%mla%la(i), nc = 1, ng = 1) - call setval(mgts%rhcc(i),ZERO,all=.true.) - end do - -end subroutine mgt_alloc_rhcc_nodal - -subroutine mgt_dealloc_rhcc_nodal() - use nodal_cpp_mg_module - implicit none - integer :: i - - do i = 1, mgts%nlevel - call destroy(mgts%rhcc(i)) - end do - - deallocate(mgts%rhcc) - -end subroutine mgt_dealloc_rhcc_nodal - -subroutine mgt_set_rhcc_nodal_1d(lev, n, rh, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1) - real(kind=dp_t), intent(in) :: rh(plo(1):phi(1)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - call mgt_verify_n("MGT_SET_RHCC_NODAL_1D", flev, fn, lo, hi) - - rp => dataptr(mgts%rhcc(flev), local_index(mgts%rhcc(flev),fn)) - rp(lo(1):hi(1), 1,1,1) = rh(lo(1):hi(1)) - -end subroutine mgt_set_rhcc_nodal_1d - -subroutine mgt_set_rhcc_nodal_2d(lev, n, rh, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2) - real(kind=dp_t), intent(in) :: rh(plo(1):phi(1), plo(2):phi(2)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - call mgt_verify_n("MGT_SET_RHCC_NODAL_2D", flev, fn, lo, hi) - - rp => dataptr(mgts%rhcc(flev), local_index(mgts%rhcc(flev),fn)) - rp(lo(1):hi(1), lo(2):hi(2),1,1) = rh(lo(1):hi(1), lo(2):hi(2)) - -end subroutine mgt_set_rhcc_nodal_2d - -subroutine mgt_set_rhcc_nodal_3d(lev, n, rh, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3) - real(kind=dp_t), intent(in) :: rh(plo(1):phi(1), plo(2):phi(2), plo(3):phi(3)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - call mgt_verify_n("MGT_SET_RHCC_NODAL_3D", flev, fn, lo, hi) - - rp => dataptr(mgts%rhcc(flev), local_index(mgts%rhcc(flev),fn)) - rp(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3),1) = rh(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3)) - -end subroutine mgt_set_rhcc_nodal_3d - -subroutine mgt_add_divucc() - - use nodal_divu_module - use nodal_cpp_mg_module - - integer :: n - real(dp_t) :: r, rhmax - - call divucc(mgts%nlevel,mgts%mgt,mgts%rhcc,mgts%rh,mgts%rr,mgts%nodal) - - if (mgts%verbose > 0) then - rhmax = norm_inf(mgts%rh(mgts%nlevel),local=.true.) - do n = mgts%nlevel-1, 1, -1 - r = norm_inf(mgts%rh(n),mgts%fine_mask(n),local=.true.) - rhmax = max(r,rhmax) - end do - call parallel_reduce(r, rhmax, MPI_MAX, proc = parallel_IOProcessorNode()) - rhmax = r - if (parallel_IOProcessor()) then - print *,'F90: Source norm after adding rhs is ',rhmax - endif - end if - -end subroutine mgt_add_divucc diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_mg_tower_smoother.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_mg_tower_smoother.f90 deleted file mode 100644 index 49592bc25..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_mg_tower_smoother.f90 +++ /dev/null @@ -1,138 +0,0 @@ -module nodal_mg_tower_smoother_module - - use multifab_module - use cc_stencil_module - use mg_tower_module - use bl_timer_module - - implicit none - -contains - - subroutine nodal_mg_tower_smoother(mgt, lev, ss, uu, ff, mm) - - use omp_module - use bl_prof_module - use nodal_smoothers_module, only: nodal_smoother_1d, & - nodal_smoother_2d, nodal_smoother_3d, nodal_line_solve_1d - - integer , intent(in ) :: lev - type( mg_tower), intent(inout) :: mgt - type( multifab), intent(inout) :: uu - type( multifab), intent(in ) :: ff - type( multifab), intent(in ) :: ss - type(imultifab), intent(in ) :: mm - - real(kind=dp_t), pointer :: fp(:,:,:,:) - real(kind=dp_t), pointer :: up(:,:,:,:) - real(kind=dp_t), pointer :: sp(:,:,:,:) - integer , pointer :: mp(:,:,:,:) - integer :: i, k, n, ng - integer :: lo(mgt%dim) - type(bl_prof_timer), save :: bpt - logical :: pmask(mgt%dim) - - pmask = get_pmask(get_layout(uu)) - ! - ! Make sure to define this here so we don't assume a certain number of ghost cells for uu. - ! - ng = nghost(uu) - - call build(bpt, "mgt_smoother") - - ! - ! Nodal stencils. - ! - if (mgt%lcross) then - ! - ! Cross stencils. - ! - if ( get_dim(ff) == 1 ) then - - call fill_boundary(uu, cross = mgt%lcross) - - do i = 1, nfabs(ff) - up => dataptr(uu, i) - fp => dataptr(ff, i) - sp => dataptr(ss, i) - mp => dataptr(mm, i) - lo = lwb(get_box(ss, i)) - do n = 1, mgt%nc - select case ( mgt%dim) - case (1) - call nodal_line_solve_1d(sp(:,:,1,1), up(:,1,1,n), fp(:,1,1,n), & - mp(:,1,1,1), lo, ng) - end select - end do - end do - - else - - do k = 0, 1 - call fill_boundary(uu, cross = mgt%lcross) - do i = 1, nfabs(ff) - up => dataptr(uu, i) - fp => dataptr(ff, i) - sp => dataptr(ss, i) - mp => dataptr(mm, i) - lo = lwb(get_box(ss, i)) - do n = 1, mgt%nc - select case ( mgt%dim) - case (1) - if ( k.eq.0 ) & - call nodal_line_solve_1d(sp(:,:,1,1), up(:,1,1,n), & - fp(:,1,1,n), mp(:,1,1,1), lo, ng) - case (2) - call nodal_smoother_2d(sp(:,:,:,1), up(:,:,1,n), & - fp(:,:,1,n), mp(:,:,1,1), lo, ng, & - pmask, mgt%stencil_type, k) - case (3) - call nodal_smoother_3d(sp(:,:,:,:), up(:,:,:,n), & - fp(:,:,:,n), mp(:,:,:,1), lo, ng, & - mgt%uniform_dh, pmask, mgt%stencil_type, k) - end select - end do - end do - end do - end if - else - ! - ! Nodal dense stencils. - ! - call fill_boundary(uu, cross = mgt%lcross) - ! - ! Thread over FABS. - ! - !$OMP PARALLEL DO PRIVATE(i,n,up,fp,sp,mp,lo) - do i = 1, nfabs(ff) - up => dataptr(uu, i) - fp => dataptr(ff, i) - sp => dataptr(ss, i) - mp => dataptr(mm, i) - lo = lwb(get_box(ss, i)) - do n = 1, mgt%nc - select case (mgt%dim) - case (1) - call nodal_line_solve_1d(sp(:,:,1,1), up(:,1,1,n), & - fp(:,1,1,n), mp(:,1,1,1), lo, ng) - case (2) - call nodal_smoother_2d(sp(:,:,:,1), up(:,:,1,n), & - fp(:,:,1,n), mp(:,:,1,1), lo, ng, & - pmask, mgt%stencil_type, 0) - case (3) - call nodal_smoother_3d(sp(:,:,:,:), up(:,:,:,n), & - fp(:,:,:,n), mp(:,:,:,1), lo, ng, & - mgt%uniform_dh, pmask, mgt%stencil_type, 0) - end select - end do - end do - !$OMP END PARALLEL DO - endif - - call multifab_internal_sync(uu) - - call destroy(bpt) - - end subroutine nodal_mg_tower_smoother - -end module nodal_mg_tower_smoother_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_multi.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_multi.f90 deleted file mode 100644 index 6948d7a59..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_multi.f90 +++ /dev/null @@ -1,203 +0,0 @@ -subroutine t_nodal_ml_multigrid(mla, mgt, rh, coeffs_type, domain_bc, & - do_diagnostics,eps, fabio, stencil_type) - use BoxLib - use nodal_stencil_module - use mg_module - use list_box_module - use ml_boxarray_module - use ml_layout_module - use itsol_module - use bl_mem_stat_module - use bl_timer_module - use box_util_module - use bl_IO_module - use fabio_module - use ml_nd_module - use nodal_mask_module - use ml_restriction_module - use ml_prolongation_module - use bndry_reg_module - use ml_norm_module - use coarsen_coeffs_module - use nodal_stencil_fill_module - use stencil_types_module - use init_cell_coeffs_module - - use nodal_rhs_module - - implicit none - - type(ml_layout), intent(inout) :: mla - type(mg_tower) , intent(inout) :: mgt(:) - type(multifab) , intent(inout) :: rh(:) - integer , intent(in ) :: coeffs_type - integer , intent(in ) :: domain_bc(:,:) - integer , intent(in ) :: do_diagnostics - real(dp_t) , intent(in ) :: eps - logical , intent(in ) :: fabio - integer , intent(in ) :: stencil_type - - type(lmultifab), allocatable :: fine_mask(:) - type( multifab), allocatable :: cell_coeffs(:) - type( multifab), allocatable :: full_soln(:) - type( multifab), allocatable :: one_sided_ss(:) - - type(box) :: pd - type(layout) :: la - integer :: nlevs, n, i, j, dm, ns - real(dp_t) :: snrm(2) - real(dp_t), pointer :: p(:,:,:,:) - - logical, allocatable :: nodal(:) - integer, allocatable :: ref_ratio(:,:) - integer, allocatable :: lo(:), hi(:) - - logical :: make_solvable - - make_solvable = .true. - if ( any(domain_bc == BC_DIR) ) make_solvable = .false. - - dm = mla%dim - - allocate(lo(dm), hi(dm)) - allocate(nodal(dm)) - nodal = .True. - - nlevs = mla%nlevel - - allocate(full_soln(nlevs),fine_mask(nlevs)) - - allocate(ref_ratio(nlevs-1,dm)) - do n = 1,nlevs-1 - ref_ratio(n,:) = mla%mba%rr(n,:) - end do - - ! NOTE: we need to allocate for both stencils even for the dense stencil - ! we don't actually create or use the multifabs - allocate(one_sided_ss(2:nlevs)) - - if (stencil_type .eq. ND_DENSE_STENCIL) then - if (dm .eq. 3) then - i = mgt(nlevs)%nlevels - if ( (mgt(nlevs)%dh(1,i) .eq. mgt(nlevs)%dh(2,i)) .and. & - (mgt(nlevs)%dh(1,i) .eq. mgt(nlevs)%dh(3,i)) ) then - ns = 21 - else - ns = 27 - end if - else if (dm .eq. 2) then - ns = 9 - end if - if ( parallel_ioprocessor() ) print *,'SETTING UP DENSE STENCIL WITH NS = ',ns - else - ns = 2*dm+1 - do n = nlevs, 2, -1 - la = mla%la(n) - call multifab_build(one_sided_ss(n), la, ns, 0, nodal, stencil=.true.) - ! - ! Set the stencil to zero; gotta do it by hand as multifab routines won't work. - ! - do j = 1, nfabs(one_sided_ss(n)) - p => dataptr(one_sided_ss(n), j) - p = 0.d0 - end do - end do - end if - - do n = nlevs, 1, -1 - - pd = mla%mba%pd(n) - if ( parallel_ioprocessor() ) & - print *,'PD AT LEVEL ',n,' IS ',extent(pd) - - la = mla%la(n) - call multifab_build(full_soln(n), la, 1, 1, nodal) - call lmultifab_build(fine_mask(n), la, 1, 0, nodal) - - call setval(full_soln(n), ZERO,all=.true.) - - end do - - !! Fill coefficient array - - do n = nlevs, 1, -1 - - allocate(cell_coeffs(mgt(n)%nlevels)) - - la = get_layout(full_soln(n)) - - pd = mla%mba%pd(n) - - call multifab_build(cell_coeffs(mgt(n)%nlevels), la, 1, 1) - - if (coeffs_type .eq. 1) then - call setval(cell_coeffs(mgt(n)%nlevels), 1.0_dp_t, 1, all=.true.) - else - call init_cell_coeffs(mla,cell_coeffs(mgt(n)%nlevels),pd,coeffs_type,fabio) - end if - - call stencil_fill_nodal_all_mglevels(mgt(n), cell_coeffs, stencil_type) - - if (stencil_type .eq. ND_CROSS_STENCIL .and. n .gt. 1) then - i = mgt(n)%nlevels - call stencil_fill_one_sided(one_sided_ss(n), cell_coeffs(i), mgt(n)%dh(:,i), & - mgt(n)%mm(i), mgt(n)%face_type) - end if - - call setval(fine_mask(n), val = .TRUE., all = .true.) - - if ( n < nlevs ) then - call create_nodal_mask(n,fine_mask(n), & - mgt(n )%mm(mgt(n )%nlevels), & - mgt(n+1)%mm(mgt(n+1)%nlevels), & - mla) - endif - - call multifab_destroy(cell_coeffs(mgt(n)%nlevels)) - deallocate(cell_coeffs) - - end do - - if ( fabio ) then - call fabio_ml_write(rh, ref_ratio(:,1), "rh-init_nodal") - end if - -! **************************************************************************** - - call ml_nd(mla,mgt,rh,full_soln,fine_mask,one_sided_ss,ref_ratio,do_diagnostics,eps) - -! **************************************************************************** - - if ( fabio ) then - call fabio_ml_write(full_soln, ref_ratio(:,1), "soln_nodal") - end if - - snrm(1) = ml_norm_l2(full_soln, ref_ratio, fine_mask) - snrm(2) = ml_norm_inf(full_soln, fine_mask) - if ( parallel_IOProcessor() ) then - print *, 'SOLUTION MAX NORM ', snrm(2) - print *, 'SOLUTION L2 NORM ', snrm(1) - end if - -! if ( parallel_IOProcessor() ) print *, 'MEMORY STATS' -! call print(multifab_mem_stats(), " multifab before") -! call print(imultifab_mem_stats(), "imultifab before") -! call print(fab_mem_stats(), " fab before") -! call print(ifab_mem_stats(), " ifab before") -! call print(boxarray_mem_stats(), " boxarray before") -! call print(boxassoc_mem_stats(), " boxassoc before") -! call print(layout_mem_stats(), " layout before") - - do n = 1,nlevs - call multifab_destroy(full_soln(n)) - call lmultifab_destroy(fine_mask(n)) - end do - if (stencil_type == ND_CROSS_STENCIL) then - do n = 2,nlevs - call multifab_destroy(one_sided_ss(n)) - end do - end if - -contains - -end subroutine t_nodal_ml_multigrid diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_rhs.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_rhs.f90 deleted file mode 100644 index 065bcb142..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_rhs.f90 +++ /dev/null @@ -1,86 +0,0 @@ -module nodal_rhs_module - - use BoxLib - use ml_layout_module - use multifab_module - use mg_module - - implicit none - -contains - - subroutine nodal_rhs(mla, rh) - - type(ml_layout), intent(inout) :: mla - type(box ) :: pd - type( multifab), intent(inout) :: rh(:) - - integer :: n, dm, nlevs - - dm = mla%dim - - nlevs = mla%nlevel - - do n = nlevs, 1, -1 - call setval(rh(n), val = ZERO, all=.true.) - end do - - call mf_init(rh(nlevs)) - - end subroutine nodal_rhs - - subroutine mf_init(mf) - type(multifab), intent(inout) :: mf - integer i - type(box) bx - do i = 1, nfabs(mf) - -! Single point of non-zero RHS - bx = get_ibox(mf,i) - bx%lo(1:bx%dim) = (bx%hi(1:bx%dim) + bx%lo(1:bx%dim))/2 - bx%hi(1:bx%dim) = bx%lo(1:bx%dim) - call setval(mf%fbs(i), ONE, bx) -! print *,'SETTING RHS TO 1 IN BOX ',i,' : ', bx%lo(1:bx%dim) - -! Single point of non-zero RHS: use this to make system solvable - bx = get_ibox(mf,i) - bx%lo(1 ) = (bx%hi(1 ) + bx%lo(1 ))/2 + 1 - bx%lo(2:bx%dim) = (bx%hi(2:bx%dim) + bx%lo(2:bx%dim))/2 - bx%hi(1:bx%dim) = bx%lo(1:bx%dim) - call setval(mf%fbs(i), -ONE, bx) -! print *,'SETTING RHS TO -1 IN BOX ',i,' : ', bx%lo(1:bx%dim) - -! 1-d strip of non-zero RHS in vertical -! bx%lo(1) = (bx%hi(1) + bx%lo(1))/2 -! bx%hi(1) = bx%lo(1) - -! 1-d strip of non-zero RHS in horizontal -! bx%lo(2) = (bx%hi(2) + bx%lo(2))/2 -! bx%hi(2) = bx%lo(2) - - end do - end subroutine mf_init - - subroutine mf_init1(mf) - type(multifab), intent(inout) :: mf - integer i - type(box) bx - type(box) rhs_box, rhs_intersect_box - - rhs_box%dim = mf%dim - rhs_box%lo(1:rhs_box%dim) = 8 - rhs_box%hi(1:rhs_box%dim) = 8 - - do i = 1, nfabs(mf) - bx = get_ibox(mf,i) - rhs_intersect_box = box_intersection(bx,rhs_box) - if (.not. empty(rhs_intersect_box)) then - bx%lo(1:bx%dim) = lwb(rhs_intersect_box) - bx%hi(1:bx%dim) = upb(rhs_intersect_box) - call setval(mf%fbs(i), ONE, bx) - end if - end do - - end subroutine mf_init1 - -end module nodal_rhs_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_smoothers.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_smoothers.f90 deleted file mode 100644 index 6563de549..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_smoothers.f90 +++ /dev/null @@ -1,382 +0,0 @@ -module nodal_smoothers_module - - use bl_constants_module - use bc_functions_module - use nodal_stencil_module - - implicit none - -contains - - subroutine nodal_line_solve_1d(ss, uu, ff, mm, lo, ng) - - use tridiag_module, only: tridiag - - integer , intent(in ) :: lo(:),ng - real(kind=dp_t), intent(in ) :: ff(lo(1)-1:) - real(kind=dp_t), intent(inout) :: uu(lo(1)-ng:) - real(kind=dp_t), intent(in ) :: ss(0:,lo(1):) - integer , intent(in ) :: mm(lo(1):) - -! real(kind=dp_t) :: dd - real(kind=dp_t), allocatable :: a_ls(:), b_ls(:), c_ls(:), r_ls(:), u_ls(:) - integer :: is, ie, ilen, i, hi(size(lo)) - - hi = ubound(uu)-ng - - if (.not. bc_dirichlet(mm(lo(1)),1,0)) then - is = lo(1) - else - is = lo(1)+1 - end if - if (.not. bc_dirichlet(mm(hi(1)),1,0)) then - ie = hi(1) - else - ie = hi(1)-1 - end if - - ilen = ie-is+1 - - allocate(a_ls(0:ilen-1)) - allocate(b_ls(0:ilen-1)) - allocate(c_ls(0:ilen-1)) - allocate(r_ls(0:ilen-1)) - allocate(u_ls(0:ilen-1)) - - do i = is,ie - a_ls(i-is) = ss(2,i) - b_ls(i-is) = ss(0,i) - c_ls(i-is) = ss(1,i) - r_ls(i-is) = ff(i) - end do - - ! Adjust low end for Neumann boundary condition - if (bc_neumann(mm(is),1,-1)) then - c_ls(0) = 2.d0*c_ls(0) - end if - - ! Adjust high end for Neumann boundary condition - if (bc_neumann(mm(ie),1,1)) then - a_ls(0) = 2.d0*a_ls(0) - end if - - r_ls(0) = r_ls(0) - ss(2,is) * uu(is-1) - r_ls(ilen-1) = r_ls(ilen-1) - ss(1,ie) * uu(ie+1) - - call tridiag(a_ls,b_ls,c_ls,r_ls,u_ls,ilen) - - do i = is, ie - uu(i) = u_ls(i-is) - end do - -! TESTING ONLY -! i = lo(1) -! if (.not. bc_dirichlet(mm(i),1,0)) then -! dd = ss(0,i)*uu(i) + ss(1,i)*uu(i+1) -! print *,'RES AT ',i, ff(i) - dd -! end if - -! do i = lo(1)+1,hi(1)-1 -! dd = ss(0,i)*uu(i) + ss(1,i)*uu(i+1) + ss(2,i)*uu(i-1) -! print *,'RES AT ',i, ff(i) - dd -! end do - -! i = hi(1) -! if (.not. bc_dirichlet(mm(i),1,0)) then -! dd = ss(0,i)*uu(i) + ss(1,i)*uu(i+1) + ss(2,i)*uu(i-1) -! print *,'RES AT ',i, ff(i) - dd -! end if - - deallocate(a_ls,b_ls,c_ls,r_ls,u_ls) - - end subroutine nodal_line_solve_1d - - subroutine nodal_smoother_1d(ss, uu, ff, mm, lo, ng, red_black) - integer, intent(in) :: lo(:) - integer, intent(in) :: ng, red_black - - real (kind = dp_t), intent(in) :: ff(lo(1)-1:) - real (kind = dp_t), intent(inout) :: uu(lo(1)-ng:) - real (kind = dp_t), intent(in) :: ss(0:,lo(1):) - integer ,intent(in) :: mm(lo(1):) - real (kind = dp_t) :: dd - integer :: i, hi(size(lo)) - - real (kind = dp_t), parameter :: omega = 1.33_dp_t - - hi = ubound(uu)-ng - - ! Red/black - do i = lo(1)+red_black,hi(1),2 - if ( .not. bc_dirichlet(mm(i),1,0) ) then - dd = ss(0,i)*uu(i) + ss(1,i)*uu(i+1) + ss(2,i)*uu(i-1) - uu(i) = uu(i) + (omega/ss(0,i)) * (ff(i) - dd) - end if - end do - - end subroutine nodal_smoother_1d - - subroutine nodal_smoother_2d(ss, uu, ff, mm, lo, ng, pmask, stencil_type, red_black) - - use bl_prof_module - use impose_neumann_bcs_module - - integer, intent(in) :: ng - integer, intent(in) :: lo(:) - logical, intent(in) :: pmask(:) - real (kind = dp_t), intent(in) :: ff(lo(1)-1:, lo(2)-1:) - real (kind = dp_t), intent(inout) :: uu(lo(1)-ng:, lo(2)-ng:) - real (kind = dp_t), intent(in) :: ss(0:,lo(1):,lo(2):) - integer ,intent(in) :: mm(lo(1):,lo(2):) - integer ,intent(in) :: stencil_type - integer ,intent(in) :: red_black - - integer :: j, i, ipar, hi(size(lo)) - real (kind = dp_t) :: dd - type(bl_prof_timer), save :: bpt - - call build(bpt, "nodal_smoother_2d") - - hi = ubound(uu)-ng - - call impose_neumann_bcs_2d(uu,mm,lo,ng) - - if ( stencil_type .eq. ND_DENSE_STENCIL ) then - - do j = lo(2),hi(2) - do i = lo(1),hi(1) - if ( .not. bc_dirichlet(mm(i,j),1,0) ) then - dd = ss(0,i,j) * uu(i ,j ) & - + ss(1,i,j) * uu(i-1,j-1) & - + ss(2,i,j) * uu(i ,j-1) & - + ss(3,i,j) * uu(i+1,j-1) & - + ss(4,i,j) * uu(i-1,j ) & - + ss(5,i,j) * uu(i+1,j ) & - + ss(6,i,j) * uu(i-1,j+1) & - + ss(7,i,j) * uu(i ,j+1) & - + ss(8,i,j) * uu(i+1,j+1) - uu(i,j) = uu(i,j) + (one/ss(0,i,j)) * (ff(i,j) - dd) - end if - end do - end do - - else if ( stencil_type .eq. ND_CROSS_STENCIL ) then - - ipar = 1-red_black - do j = lo(2),hi(2) - ipar = 1 - ipar - do i = lo(1)+ipar,hi(1),2 - if ( .not. bc_dirichlet(mm(i,j),1,0) ) then - dd = ss(0,i,j) * uu(i ,j ) & - + ss(2,i,j) * uu(i-1,j ) + ss(1,i,j) * uu(i+1,j ) & - + ss(4,i,j) * uu(i ,j-1) + ss(3,i,j) * uu(i ,j+1) - uu(i,j) = uu(i,j) + (one/ss(0,i,j)) * (ff(i,j) - dd) - end if - end do - end do - - else - call bl_error('BAD STENCIL_TYPE IN NODAL_SMOOTHER ',stencil_type) - end if - - call destroy(bpt) - - end subroutine nodal_smoother_2d - - subroutine nodal_smoother_3d(ss, uu, ff, mm, lo, ng, uniform_dh, pmask, stencil_type, red_black) - - use bl_prof_module - use impose_neumann_bcs_module - - integer, intent(in ) :: ng - integer, intent(in ) :: lo(:) - logical, intent(in ) :: pmask(:) - real (kind = dp_t), intent(in ) :: ff(lo(1)-1:,lo(2)-1:,lo(3)-1:) - real (kind = dp_t), intent(inout) :: uu(lo(1)-ng:,lo(2)-ng:,lo(3)-ng:) - real (kind = dp_t), intent(in ) :: ss(0:,lo(1):,lo(2):,lo(3):) - integer, intent(in ) :: mm(lo(1):,lo(2):,lo(3):) - logical, intent(in ) :: uniform_dh - integer ,intent(in ) :: stencil_type - integer, intent(in ) :: red_black - - integer :: i, j, k, ipar, hi(size(lo)) - logical :: jface, kface, doit - real (kind = dp_t) :: dd - type(bl_prof_timer), save :: bpt - - call build(bpt, "nodal_smoother_3d") - - hi(1) = lo(1) + size(mm,dim=1)-1 - hi(2) = lo(2) + size(mm,dim=2)-1 - hi(3) = lo(3) + size(mm,dim=3)-1 - - call impose_neumann_bcs_3d(uu,mm,lo,ng) - - if ( stencil_type .eq. ND_CROSS_STENCIL ) then - - !$OMP PARALLEL DO PRIVATE(k,ipar,j,i,dd,jface,kface,doit) - do k = lo(3),hi(3) - kface = .false. ; if ( (k.eq.lo(3)) .or. (k.eq.hi(3)) ) kface = .true. - - do j = lo(2),hi(2) - jface = .false. ; if ( (j.eq.lo(2)) .or. (j.eq.hi(2)) ) jface = .true. - - ipar = MOD(j + k + red_black,2) - - do i = lo(1)+ipar,hi(1),2 - - doit = .true. - - if ( jface .or. kface .or. (i.eq.lo(1)) .or. (i.eq.hi(1)) ) then - if ( bc_dirichlet(mm(i,j,k),1,0) ) doit = .false. - end if - - if (doit) then - dd = ss(0,i,j,k) * uu(i ,j ,k ) & - + ss(2,i,j,k) * uu(i-1,j ,k ) + ss(1,i,j,k) * uu(i+1,j ,k ) & - + ss(4,i,j,k) * uu(i ,j-1,k ) + ss(3,i,j,k) * uu(i ,j+1,k ) & - + ss(6,i,j,k) * uu(i ,j ,k-1) + ss(5,i,j,k) * uu(i ,j ,k+1) - - uu(i,j,k) = uu(i,j,k) + (one/ss(0,i,j,k)) * (ff(i,j,k) - dd) - end if - end do - end do - end do - !$OMP END PARALLEL DO - - else if ( stencil_type .eq. ND_DENSE_STENCIL ) then - ! - ! Gauss-Seidel. - ! - do k = lo(3),hi(3) - kface = .false. ; if ( (k.eq.lo(3)) .or. (k.eq.hi(3)) ) kface = .true. - - do j = lo(2),hi(2) - jface = .false. ; if ( (j.eq.lo(2)) .or. (j.eq.hi(2)) ) jface = .true. - - do i = lo(1),hi(1) - - doit = .true. - - if ( jface .or. kface .or. (i.eq.lo(1)) .or. (i.eq.hi(1)) ) then - if ( bc_dirichlet(mm(i,j,k),1,0) ) doit = .false. - end if - - if ( doit ) then - dd = ss(0,i,j,k)*uu(i,j,k) & - + ss( 1,i,j,k) * uu(i-1,j-1,k-1) + ss( 2,i,j,k) * uu(i ,j-1,k-1) & - + ss( 3,i,j,k) * uu(i+1,j-1,k-1) + ss( 4,i,j,k) * uu(i-1,j ,k-1) & - + ss( 5,i,j,k) * uu(i+1,j ,k-1) + ss( 6,i,j,k) * uu(i-1,j+1,k-1) & - + ss( 7,i,j,k) * uu(i ,j+1,k-1) + ss( 8,i,j,k) * uu(i+1,j+1,k-1) & - + ss( 9,i,j,k) * uu(i-1,j-1,k ) + ss(10,i,j,k) * uu(i+1,j-1,k ) & - + ss(11,i,j,k) * uu(i-1,j+1,k ) + ss(12,i,j,k) * uu(i+1,j+1,k ) & - + ss(13,i,j,k) * uu(i-1,j-1,k+1) + ss(14,i,j,k) * uu(i ,j-1,k+1) & - + ss(15,i,j,k) * uu(i+1,j-1,k+1) + ss(16,i,j,k) * uu(i-1,j ,k+1) & - + ss(17,i,j,k) * uu(i+1,j ,k+1) + ss(18,i,j,k) * uu(i-1,j+1,k+1) & - + ss(19,i,j,k) * uu(i ,j+1,k+1) + ss(20,i,j,k) * uu(i+1,j+1,k+1) - - if ( (size(ss,dim=1) .eq. 27) .and. (.not. uniform_dh) ) then - ! - ! Add faces (only non-zero for non-uniform dx) - ! - dd = dd + & - ss(21,i,j,k) * uu(i-1,j ,k ) + ss(22,i,j,k) * uu(i+1,j ,k ) & - + ss(23,i,j,k) * uu(i ,j-1,k ) + ss(24,i,j,k) * uu(i ,j+1,k ) & - + ss(25,i,j,k) * uu(i ,j ,k-1) + ss(26,i,j,k) * uu(i ,j ,k+1) - end if - - uu(i,j,k) = uu(i,j,k) + (one/ss(0,i,j,k)) * (ff(i,j,k) - dd) - end if - end do - end do - end do - - else - call bl_error('BAD STENCIL_TYPE IN NODAL_SMOOTHER ',stencil_type) - end if - - call destroy(bpt) - - end subroutine nodal_smoother_3d - - subroutine nodal_smoother_3d_opt(ss, uu, ff, mm, lo, ng, uniform_dh, pmask, & - stencil_type, dx) - - use bl_prof_module - use impose_neumann_bcs_module - - integer, intent(in ) :: ng - integer, intent(in ) :: lo(:) - logical, intent(in ) :: pmask(:) - real (kind = dp_t), intent(in ) :: ff(lo(1)-1:,lo(2)-1:,lo(3)-1:) - real (kind = dp_t), intent(inout) :: uu(lo(1)-ng:,lo(2)-ng:,lo(3)-ng:) - real (kind = dp_t), intent(in ) :: ss(0:,lo(1):,lo(2):,lo(3):) - integer, intent(in ) :: mm(lo(1):,lo(2):,lo(3):) - logical, intent(in ) :: uniform_dh - integer ,intent(in ) :: stencil_type - real (kind = dp_t), intent(in ) :: dx(:) - - integer :: i, j, k, hi(size(lo)) - logical :: jface, kface, doit - real (kind = dp_t) :: dd - type(bl_prof_timer), save :: bpt - - call build(bpt, "nodal_smoother_3d") - - hi(1) = lo(1) + size(mm,dim=1)-1 - hi(2) = lo(2) + size(mm,dim=2)-1 - hi(3) = lo(3) + size(mm,dim=3)-1 - - print *,'In nodal_smoother_3d_opt with dx ', dx(1) - - call impose_neumann_bcs_3d(uu,mm,lo,ng) - - if ( stencil_type .ne. ND_DENSE_STENCIL ) then - call bl_error('Bad stencil_type in nodal_smoother_3d_opt: ',stencil_type) - end if - - if ( .not. uniform_dh) then - call bl_error('Want uniform_dh = true in nodal_smoother_3d_opt: ') - end if - - ! - ! Gauss-Seidel. - ! - do k = lo(3),hi(3) - kface = .false. ; if ( (k.eq.lo(3)) .or. (k.eq.hi(3)) ) kface = .true. - - do j = lo(2),hi(2) - jface = .false. ; if ( (j.eq.lo(2)) .or. (j.eq.hi(2)) ) jface = .true. - - do i = lo(1),hi(1) - - doit = .true. - - if ( jface .or. kface .or. (i.eq.lo(1)) .or. (i.eq.hi(1)) ) then - if ( bc_dirichlet(mm(i,j,k),1,0) ) doit = .false. - end if - - if ( doit ) then - dd = ss(0,i,j,k)*uu(i,j,k) & - + ss( 1,i,j,k) * uu(i-1,j-1,k-1) + ss( 2,i,j,k) * uu(i ,j-1,k-1) & - + ss( 3,i,j,k) * uu(i+1,j-1,k-1) + ss( 4,i,j,k) * uu(i-1,j ,k-1) & - + ss( 5,i,j,k) * uu(i+1,j ,k-1) + ss( 6,i,j,k) * uu(i-1,j+1,k-1) & - + ss( 7,i,j,k) * uu(i ,j+1,k-1) + ss( 8,i,j,k) * uu(i+1,j+1,k-1) & - + ss( 9,i,j,k) * uu(i-1,j-1,k ) + ss(10,i,j,k) * uu(i+1,j-1,k ) & - + ss(11,i,j,k) * uu(i-1,j+1,k ) + ss(12,i,j,k) * uu(i+1,j+1,k ) & - + ss(13,i,j,k) * uu(i-1,j-1,k+1) + ss(14,i,j,k) * uu(i ,j-1,k+1) & - + ss(15,i,j,k) * uu(i+1,j-1,k+1) + ss(16,i,j,k) * uu(i-1,j ,k+1) & - + ss(17,i,j,k) * uu(i+1,j ,k+1) + ss(18,i,j,k) * uu(i-1,j+1,k+1) & - + ss(19,i,j,k) * uu(i ,j+1,k+1) + ss(20,i,j,k) * uu(i+1,j+1,k+1) - - uu(i,j,k) = uu(i,j,k) + (one/ss(0,i,j,k)) * (ff(i,j,k) - dd) - end if - end do - end do - end do - - call destroy(bpt) - - end subroutine nodal_smoother_3d_opt - -end module nodal_smoothers_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil.f90 deleted file mode 100644 index dc6727857..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil.f90 +++ /dev/null @@ -1,672 +0,0 @@ -module nodal_stencil_module - - use bl_types - use multifab_module - use bc_functions_module - use impose_neumann_bcs_module - use stencil_types_module - - implicit none - - real (kind = dp_t), private, parameter :: ZERO = 0.0_dp_t - real (kind = dp_t), private, parameter :: ONE = 1.0_dp_t - real (kind = dp_t), private, parameter :: TWO = 2.0_dp_t - real (kind = dp_t), private, parameter :: THREE = 3.0_dp_t - real (kind = dp_t), private, parameter :: FOUR = 4.0_dp_t - real (kind = dp_t), private, parameter :: FIVE = 5.0_dp_t - real (kind = dp_t), private, parameter :: SIX = 6.0_dp_t - real (kind = dp_t), private, parameter :: SEVEN = 7.0_dp_t - real (kind = dp_t), private, parameter :: EIGHT = 8.0_dp_t - real (kind = dp_t), private, parameter :: TEN = 10.0_dp_t - real (kind = dp_t), private, parameter :: HALF = 0.5_dp_t - real (kind = dp_t), private, parameter :: FOURTH= 0.25_dp_t - real (kind = dp_t), private, parameter :: THIRD = 1.0_dp_t/3.0_dp_t - real (kind = dp_t), private, parameter :: SIXTH = 1.0_dp_t/6.0_dp_t - real (kind = dp_t), private, parameter :: FOUR_THIRD = 4.0_dp_t/3.0_dp_t - - private :: set_faces_edges_corners_2d,set_faces_edges_corners_3d - -contains - - subroutine stencil_set_bc_nodal(sdim, bx, nbx, idx, mask, face_type, pd_periodic, la_periodic) - integer, intent(in ) :: sdim - type(box), intent(in ) :: bx, nbx - type(imultifab), intent(inout) :: mask - integer, intent(in ) :: idx - integer, intent(in ) :: face_type(:,:,:) - type(box), intent(in ) :: pd_periodic - type(layout), intent(inout) :: la_periodic - - integer, pointer :: mp(:,:,:,:) - type(box) :: bx1 - type(boxarray) :: ba - integer :: ii, dm, ib, jb, kb, jb_lo, kb_lo - logical :: nodal(sdim) - - nodal = .true. - ! - ! Set the mask to BC_DIR or BC_NEU based on face_type at a physical boundary. - ! - do dm = 1, sdim - ! - ! Lo side - ! - bx1 = nbx - bx1%hi(dm) = bx1%lo(dm) - mp => dataptr(mask, idx, bx1) - if (face_type(idx,dm,1) == BC_NEU) then - mp = ibset(mp, BC_BIT(BC_NEU, dm, -1)) - else if (face_type(idx,dm,1) == BC_DIR) then - mp = ibset(mp, BC_BIT(BC_DIR, 1, 0)) - end if - ! - ! Hi side - ! - bx1 = nbx - bx1%lo(dm) = bx1%hi(dm) - mp => dataptr(mask, idx, bx1) - if (face_type(idx,dm,2) == BC_NEU) then - mp = ibset(mp, BC_BIT(BC_NEU, dm, +1)) - else if (face_type(idx,dm,2) == BC_DIR) then - mp = ibset(mp, BC_BIT(BC_DIR, 1, 0)) - end if - end do - ! - ! Set the mask to BC_DIR at coarse-fine boundaries. - ! - jb_lo = -1; if (sdim .lt. 2) jb_lo = 1 - kb_lo = -1; if (sdim .lt. 3) kb_lo = 1 - - do kb = kb_lo, 1 - do jb = jb_lo, 1 - do ib = -1, 1 - bx1 = shift(bx,ib,1) - if (sdim > 1) bx1 = shift(bx1,jb,2) - if (sdim > 2) bx1 = shift(bx1,kb,3) - bx1 = intersection(bx1, pd_periodic) - if ( empty(bx1) ) cycle - call layout_boxarray_diff(ba, bx1, la_periodic) - do ii = 1, nboxes(ba) - bx1 = intersection(box_nodalize(get_box(ba,ii),nodal), nbx) - if ( empty(bx1) ) cycle - mp => dataptr(mask, idx, bx1) - mp = ibset(mp, BC_BIT(BC_DIR,1,0)) - end do - call destroy(ba) - end do - end do - end do - - end subroutine stencil_set_bc_nodal - - subroutine s_simple_1d_nodal(ss, sg, mm, dh) - real (kind = dp_t), intent(inout) :: ss(0:,:) - real (kind = dp_t), intent(inout) :: sg(0:) - integer , intent(in ) :: mm(:) - real (kind = dp_t), intent(in ) :: dh(:) - - integer :: i,nx - real (kind = dp_t) :: f1 - - f1 = ONE/dh(1)**2 - - nx = size(ss,dim=2) - - if (bc_neumann(mm( 1),1,-1)) sg( 0) = sg( 1) - if (bc_neumann(mm(nx),1,+1)) sg(nx) = sg(nx-1) - - do i = 1,nx - ss(1,i) = sg(i )*f1 - ss(2,i) = sg(i-1)*f1 - ss(0,i) = -(sg(i)+sg(i-1))*f1 - end do - - end subroutine s_simple_1d_nodal - - subroutine s_cross_2d_nodal(ss, sg, mm, face_type, dh) - real (kind = dp_t), intent(inout) :: ss(0:,:,:) - real (kind = dp_t), intent(inout) :: sg(0:,0:) - integer , intent(in ) :: mm(:,:) - integer , intent(in ) :: face_type(:,:) - real (kind = dp_t), intent(in ) :: dh(:) - - integer :: i, j, nx, ny - real (kind = dp_t) :: fac - - nx = size(ss,dim=2) - ny = size(ss,dim=3) - - call set_faces_edges_corners_2d(nx, ny, sg, mm, face_type) - - fac = (HALF / (dh(1))**2) - - do j = 1,ny - do i = 1,nx - ss(1,i,j) = fac*(sg(i ,j-1) + sg(i ,j )) - ss(2,i,j) = fac*(sg(i-1,j-1) + sg(i-1,j )) - ss(3,i,j) = fac*(sg(i-1,j ) + sg(i ,j )) - ss(4,i,j) = fac*(sg(i-1,j-1) + sg(i ,j-1)) - ss(0,i,j) = -(ss(1,i,j) + ss(2,i,j) + ss(3,i,j) + ss(4,i,j)) - end do - end do - - end subroutine s_cross_2d_nodal - - subroutine s_simple_2d_one_sided(ss, sg, mm, face_type, dh) - real (kind = dp_t), intent(inout) :: ss(0:,:,:) - real (kind = dp_t), intent(inout) :: sg(0:,0:) - integer , intent(in ) :: mm(:,:) - integer , intent(in ) :: face_type(:,:) - real (kind = dp_t), intent(in ) :: dh(:) - - integer :: i, j, nx, ny - real (kind = dp_t) :: fac - real (kind = dp_t) :: sg_int(0:size(sg,dim=1)-1,0:size(sg,dim=2)-1) - - nx = size(ss,dim=2) - ny = size(ss,dim=3) - - sg_int = ZERO - - do j = 1, ny-1 - do i = 1, nx-1 - sg_int(i,j) = sg(i,j) - end do - end do - - call set_faces_edges_corners_2d(nx, ny, sg_int, mm, face_type) - - fac = (HALF / (dh(1))**2) - - do j = 1,ny - do i = 1,nx - ss(1,i,j) = fac*(sg_int(i ,j-1) + sg_int(i ,j )) - ss(2,i,j) = fac*(sg_int(i-1,j-1) + sg_int(i-1,j )) - ss(3,i,j) = fac*(sg_int(i-1,j ) + sg_int(i ,j )) - ss(4,i,j) = fac*(sg_int(i-1,j-1) + sg_int(i ,j-1)) - ss(0,i,j) = -(ss(1,i,j) + ss(2,i,j) + ss(3,i,j) + ss(4,i,j)) - end do - end do - - end subroutine s_simple_2d_one_sided - - subroutine s_dense_2d_nodal(ss, sg, ng_s, mm, face_type, dh, lo, hi) - - integer , intent(in ) :: lo(:),hi(:),ng_s - real (kind = dp_t), intent(inout) :: ss(0:,lo(1):,lo(2):) - real (kind = dp_t), intent(inout) :: sg(lo(1)-ng_s:,lo(2)-ng_s:,:) - integer , intent(in ) :: mm(lo(1):,lo(2):) - integer , intent(in ) :: face_type(:,:) - real (kind = dp_t), intent(in ) :: dh(:) - - integer :: i, j - real (kind = dp_t) :: fac - - ! Set sg on edges at a Neumann boundary. - do i = lo(1),hi(1) - if (bc_neumann(mm(i,lo(2) ),2,-1)) sg(i,lo(2)-1,:) = sg(i,lo(2),:) - if (bc_neumann(mm(i,hi(2)+1),2,+1)) sg(i,hi(2)+1,:) = sg(i,hi(2),:) - end do - - do j = lo(2),hi(2) - if (bc_neumann(mm(lo(1) ,j),1,-1)) sg(lo(1)-1,j,:) = sg(lo(1),j,:) - if (bc_neumann(mm(hi(1)+1,j),1,+1)) sg(hi(1)+1,j,:) = sg(hi(1),j,:) - end do - - ! Note: we do the corners *after* each of the edge has been done. - ! Lo i - if (face_type(1,1) == BC_NEU) then - sg(lo(1)-1,lo(2)-1,:) = sg(lo(1),lo(2)-1,:) - sg(lo(1)-1,hi(2)+1,:) = sg(lo(1),hi(2)+1,:) - end if - - ! Hi i - if (face_type(1,2) == BC_NEU) then - sg(hi(1)+1,lo(2)-1,:) = sg(hi(1),lo(2)-1,:) - sg(hi(1)+1,hi(2)+1,:) = sg(hi(1),hi(2)+1,:) - end if - - ! Lo j - if (face_type(2,1) == BC_NEU) then - sg(lo(1)-1,lo(2)-1,:) = sg(lo(1)-1,lo(2),:) - sg(hi(1)+1,lo(2)-1,:) = sg(hi(1)+1,lo(2),:) - end if - - ! Hi j - if (face_type(2,2) == BC_NEU) then - sg(lo(1)-1,hi(2)+1,:) = sg(lo(1)-1,hi(2),:) - sg(hi(1)+1,hi(2)+1,:) = sg(hi(1)+1,hi(2),:) - end if - - fac = (THIRD / (dh(1))**2) - - do j = lo(2),hi(2)+1 - do i = lo(1),hi(1)+1 - - ! Faces - ss(2,i,j) = fac*(HALF * (sg(i ,j-1,1) + sg(i-1,j-1,1))) - ss(4,i,j) = fac*(HALF * (sg(i-1,j ,1) + sg(i-1,j-1,1))) - ss(5,i,j) = fac*(HALF * (sg(i ,j ,1) + sg(i ,j-1,1))) - ss(7,i,j) = fac*(HALF * (sg(i ,j ,1) + sg(i-1,j ,1))) - - ! Corners - ss(1,i,j) = fac*sg(i-1,j-1,1) - ss(3,i,j) = fac*sg(i ,j-1,1) - ss(6,i,j) = fac*sg(i-1,j ,1) - ss(8,i,j) = fac*sg(i, j ,1) - - ss(0,i,j) = -(ss(1,i,j) + ss(2,i,j) + ss(3,i,j) + ss(4,i,j) & - + ss(5,i,j) + ss(6,i,j) + ss(7,i,j) + ss(8,i,j) ) - end do - end do - - end subroutine s_dense_2d_nodal - - subroutine set_faces_edges_corners_2d(nx, ny, sg, mm, face_type) - integer , intent(in ) :: nx, ny - real (kind = dp_t), intent(inout) :: sg(0:,0:) - integer , intent(in ) :: mm(:,:) - integer , intent(in ) :: face_type(:,:) - - integer :: i, j - ! - ! Set sg on edges at a Neumann boundary. - ! - do i = 1,nx-1 - if (bc_neumann(mm(i, 1),2,-1)) sg(i, 0) = sg(i,1) - if (bc_neumann(mm(i,ny),2,+1)) sg(i,ny) = sg(i,ny-1) - end do - - do j = 1,ny-1 - if (bc_neumann(mm( 1,j),1,-1)) sg( 0,j) = sg( 1,j) - if (bc_neumann(mm(nx,j),1,+1)) sg(nx,j) = sg(nx-1,j) - end do - ! - ! Note: we do the corners *after* each of the edges has been done. - ! - if (face_type(1,1) == BC_NEU) then - sg(0, 0) = sg(1, 0) - sg(0,ny) = sg(1,ny) - end if - if (face_type(1,2) == BC_NEU) then - sg(nx, 0) = sg(nx-1,0) - sg(nx,ny) = sg(nx-1,ny) - end if - if (face_type(2,1) == BC_NEU) then - sg( 0,0) = sg( 0,1) - sg(nx,0) = sg(nx,1) - end if - if (face_type(2,2) == BC_NEU) then - sg( 0,ny) = sg( 0,ny-1) - sg(nx,ny) = sg(nx,ny-1) - end if - - end subroutine set_faces_edges_corners_2d - - subroutine set_faces_edges_corners_3d(nx, ny, nz, sg, mm) - integer , intent(in ) :: nx, ny, nz - real (kind = dp_t), intent(inout) :: sg(0:,0:,0:) - integer , intent(in ) :: mm(:,:,:) - - integer :: i, j, k - ! - ! Set sg on faces at a Neumann boundary. - ! - do j = 1,ny-1 - do i = 1,nx-1 - if (bc_neumann(mm(i,j, 1),3,-1)) sg(i,j, 0) = sg(i,j,1) - if (bc_neumann(mm(i,j,nz),3,+1)) sg(i,j,nz) = sg(i,j,nz-1) - end do - end do - - do k = 1,nz-1 - do i = 1,nx-1 - if (bc_neumann(mm(i, 1,k),2,-1)) sg(i, 0,k) = sg(i,1,k) - if (bc_neumann(mm(i,ny,k),2,+1)) sg(i,ny,k) = sg(i,ny-1,k) - end do - end do - - do k = 1,nz-1 - do j = 1,ny-1 - if (bc_neumann(mm( 1,j,k),1,-1)) sg( 0,j,k) = sg( 1,j,k) - if (bc_neumann(mm(nx,j,k),1,+1)) sg(nx,j,k) = sg(nx-1,j,k) - end do - end do - ! - ! Set sg on edges at a Neumann boundary. - ! - do i = 1,nx-1 - if (bc_neumann(mm(i, 1, 1),2,-1)) sg(i, 0, 0) = sg(i,1, 0) - if (bc_neumann(mm(i, 1,nz),2,-1)) sg(i, 0,nz) = sg(i,1,nz) - - if (bc_neumann(mm(i,ny, 1),2,+1)) sg(i,ny, 0) = sg(i,ny-1, 0) - if (bc_neumann(mm(i,ny,nz),2,+1)) sg(i,ny,nz) = sg(i,ny-1,nz) - - if (bc_neumann(mm(i, 1, 1),3,-1)) sg(i, 0, 0) = sg(i, 0,1) - if (bc_neumann(mm(i,ny, 1),3,-1)) sg(i,ny, 0) = sg(i,ny,1) - - if (bc_neumann(mm(i, 1,nz),3,+1)) sg(i, 0,nz) = sg(i, 0,nz-1) - if (bc_neumann(mm(i,ny,nz),3,+1)) sg(i,ny,nz) = sg(i,ny,nz-1) - end do - - do j = 1,ny-1 - if (bc_neumann(mm( 1,j, 1),1,-1)) sg( 0,j, 0) = sg(1,j, 0) - if (bc_neumann(mm( 1,j,nz),1,-1)) sg( 0,j,nz) = sg(1,j,nz) - - if (bc_neumann(mm(nx,j, 1),1,+1)) sg(nx,j, 0) = sg(nx-1,j, 0) - if (bc_neumann(mm(nx,j,nz),1,+1)) sg(nx,j,nz) = sg(nx-1,j,nz) - - if (bc_neumann(mm( 1,j, 1),3,-1)) sg( 0,j, 0) = sg( 0,j,1) - if (bc_neumann(mm(nx,j, 1),3,-1)) sg(nx,j, 0) = sg(nx,j,1) - - if (bc_neumann(mm( 1,j,nz),3,+1)) sg( 0,j,nz) = sg( 0,j,nz-1) - if (bc_neumann(mm(nx,j,nz),3,+1)) sg(nx,j,nz) = sg(nx,j,nz-1) - end do - - do k = 1,nz-1 - if (bc_neumann(mm( 1, 1,k),1,-1)) sg( 0, 0,k) = sg(1, 0,k) - if (bc_neumann(mm( 1,ny,k),1,-1)) sg( 0,ny,k) = sg(1,ny,k) - - if (bc_neumann(mm(nx, 1,k),1,+1)) sg(nx, 0,k) = sg(nx-1, 0,k) - if (bc_neumann(mm(nx,ny,k),1,+1)) sg(nx,ny,k) = sg(nx-1,ny,k) - - if (bc_neumann(mm( 1, 1,k),2,-1)) sg( 0, 0,k) = sg( 0,1,k) - if (bc_neumann(mm(nx, 1,k),2,-1)) sg(nx, 0,k) = sg(nx,1,k) - - if (bc_neumann(mm( 1,ny,k),2,+1)) sg( 0,ny,k) = sg( 0,ny-1,k) - if (bc_neumann(mm(nx,ny,k),2,+1)) sg(nx,ny,k) = sg(nx,ny-1,k) - end do - - if (bc_neumann(mm( 1, 1, 1),1,-1)) sg( 0, 0, 0) = sg( 1, 0, 0) - if (bc_neumann(mm( 1, 1, 1),2,-1)) sg( 0, 0, 0) = sg( 0, 1, 0) - if (bc_neumann(mm( 1, 1, 1),3,-1)) sg( 0, 0, 0) = sg( 0, 0, 1) - - if (bc_neumann(mm(nx, 1, 1),1,+1)) sg(nx, 0, 0) = sg(nx-1, 0, 0) - if (bc_neumann(mm(nx, 1, 1),2,-1)) sg(nx, 0, 0) = sg(nx , 1, 0) - if (bc_neumann(mm(nx, 1, 1),3,-1)) sg(nx, 0, 0) = sg(nx , 0, 1) - - if (bc_neumann(mm( 1,ny, 1),1,-1)) sg( 0,ny, 0) = sg( 1,ny , 0) - if (bc_neumann(mm( 1,ny, 1),2,+1)) sg( 0,ny, 0) = sg( 0,ny-1, 0) - if (bc_neumann(mm( 1,ny, 1),3,-1)) sg( 0,ny, 0) = sg( 0,ny , 1) - - if (bc_neumann(mm( 1, 1,nz),1,-1)) sg( 0, 0,nz) = sg( 1, 0,nz ) - if (bc_neumann(mm( 1, 1,nz),2,-1)) sg( 0, 0,nz) = sg( 0, 1,nz ) - if (bc_neumann(mm( 1, 1,nz),3,+1)) sg( 0, 0,nz) = sg( 0, 0,nz-1) - - if (bc_neumann(mm(nx,ny, 1),1,+1)) sg(nx,ny, 0) = sg(nx-1,ny , 0) - if (bc_neumann(mm(nx,ny, 1),2,+1)) sg(nx,ny, 0) = sg(nx ,ny-1, 0) - if (bc_neumann(mm(nx,ny, 1),3,-1)) sg(nx,ny, 0) = sg(nx ,ny , 1) - - if (bc_neumann(mm(nx, 1,nz),1,+1)) sg(nx, 0,nz) = sg(nx-1, 0,nz ) - if (bc_neumann(mm(nx, 1,nz),2,-1)) sg(nx, 0,nz) = sg(nx , 1,nz ) - if (bc_neumann(mm(nx, 1,nz),3,+1)) sg(nx, 0,nz) = sg(nx , 0,nz-1) - - if (bc_neumann(mm( 1,ny,nz),1,-1)) sg( 0,ny,nz) = sg( 1,ny ,nz ) - if (bc_neumann(mm( 1,ny,nz),2,+1)) sg( 0,ny,nz) = sg( 0,ny-1,nz ) - if (bc_neumann(mm( 1,ny,nz),3,+1)) sg( 0,ny,nz) = sg( 0,ny ,nz-1) - - if (bc_neumann(mm(nx,ny,nz),1,+1)) sg(nx,ny,nz) = sg(nx-1,ny ,nz ) - if (bc_neumann(mm(nx,ny,nz),2,+1)) sg(nx,ny,nz) = sg(nx ,ny-1,nz ) - if (bc_neumann(mm(nx,ny,nz),3,+1)) sg(nx,ny,nz) = sg(nx ,ny ,nz-1) - - end subroutine set_faces_edges_corners_3d - - subroutine s_cross_3d_nodal(ss, sg, mm, dh) - real (kind = dp_t), intent(inout) :: ss(0:,:,:,:) - real (kind = dp_t), intent(inout) :: sg(0:,0:,0:) - integer , intent(inout) :: mm(:,:,:) - real (kind = dp_t), intent(in ) :: dh(:) - - integer :: i, j, k, nx, ny, nz - real (kind = dp_t) :: fac - - nx = size(ss,dim=2) - ny = size(ss,dim=3) - nz = size(ss,dim=4) - ! - ! BEGIN STENCIL - ! - ! Stencil applies as follows : (i is left to right, j is down to up) - ! - ! at k-1 at k at k+1 - ! - ! 3 - ! 6 2 0 1 5 - ! 4 - ! - ! END STENCIL - ! - call set_faces_edges_corners_3d(nx, ny, nz, sg, mm) - - fac = (FOURTH / (dh(1))**2) - - !$OMP PARALLEL DO PRIVATE(i,j,k) IF(nz.ge.4) - do k = 1, nz - do j = 1, ny - do i = 1, nx - ! - ! Faces in x-direction - ! - ss(2,i,j,k) = fac*((sg(i-1,j-1,k-1) + sg(i-1,j-1,k ) & - +sg(i-1,j ,k-1) + sg(i-1,j ,k ))) - ss(1,i,j,k) = fac*((sg(i ,j-1,k-1) + sg(i ,j-1,k ) & - +sg(i ,j ,k-1) + sg(i ,j ,k ))) - ! - ! Faces in y-direction - ! - ss(4,i,j,k) = fac*((sg(i-1,j-1,k-1) + sg(i-1,j-1,k ) & - +sg(i ,j-1,k-1) + sg(i ,j-1,k ))) - ss(3,i,j,k) = fac*((sg(i-1,j ,k-1) + sg(i-1,j ,k ) & - +sg(i ,j ,k-1) + sg(i ,j ,k ))) - ! - ! Faces in z-direction - ! - ss(6,i,j,k) = fac*((sg(i-1,j-1,k-1) + sg(i-1,j ,k-1) & - +sg(i ,j-1,k-1) + sg(i ,j ,k-1))) - ss(5,i,j,k) = fac*((sg(i-1,j-1,k ) + sg(i-1,j ,k ) & - +sg(i ,j-1,k ) + sg(i ,j ,k ))) - - ss(0,i,j,k) = -( ss(1,i,j,k) + ss(2,i,j,k) & - +ss(3,i,j,k) + ss(4,i,j,k) & - +ss(5,i,j,k) + ss(6,i,j,k) ) - end do - end do - end do - !$OMP END PARALLEL DO - - end subroutine s_cross_3d_nodal - - subroutine s_simple_3d_one_sided(ss, sg, mm, dh) - - real (kind = dp_t), intent(inout) :: ss(0:,:,:,:) - real (kind = dp_t), intent(inout) :: sg(0:,0:,0:) - integer , intent(inout) :: mm(:,:,:) - real (kind = dp_t), intent(in ) :: dh(:) - - integer :: i, j, k, nx, ny, nz - real (kind = dp_t) :: fac - real (kind = dp_t), allocatable :: sg_int(:,:,:) - - nx = size(ss,dim=2) - ny = size(ss,dim=3) - nz = size(ss,dim=4) - ! - ! BEGIN STENCIL - ! - ! Stencil applies as follows : (i is left to right, j is down to up) - ! - ! at k-1 at k at k+1 - ! - ! 3 - ! 6 2 0 1 5 - ! 4 - ! - ! END STENCIL - ! - allocate(sg_int(0:size(sg,dim=1)-1,0:size(sg,dim=2)-1,0:size(sg,dim=3)-1)) - - sg_int = ZERO - - do k = 1, nz-1 - do j = 1, ny-1 - do i = 1, nx-1 - sg_int(i,j,k) = sg(i,j,k) - end do - end do - end do - - call set_faces_edges_corners_3d(nx, ny, nz, sg_int, mm) - - fac = (FOURTH / (dh(1))**2) - - !$OMP PARALLEL DO PRIVATE(i,j,k) IF(nz.ge.4) - do k = 1, nz - do j = 1, ny - do i = 1, nx - ! - ! Faces in x-direction - ! - ss(2,i,j,k) = fac*((sg_int(i-1,j-1,k-1) + sg_int(i-1,j-1,k ) & - +sg_int(i-1,j ,k-1) + sg_int(i-1,j ,k ))) - ss(1,i,j,k) = fac*((sg_int(i ,j-1,k-1) + sg_int(i ,j-1,k ) & - +sg_int(i ,j ,k-1) + sg_int(i ,j ,k ))) - ! - ! Faces in y-direction - ! - ss(4,i,j,k) = fac*((sg_int(i-1,j-1,k-1) + sg_int(i-1,j-1,k ) & - +sg_int(i ,j-1,k-1) + sg_int(i ,j-1,k ))) - ss(3,i,j,k) = fac*((sg_int(i-1,j ,k-1) + sg_int(i-1,j ,k ) & - +sg_int(i ,j ,k-1) + sg_int(i ,j ,k ))) - ! - ! Faces in z-direction - ! - ss(6,i,j,k) = fac*((sg_int(i-1,j-1,k-1) + sg_int(i-1,j ,k-1) & - +sg_int(i ,j-1,k-1) + sg_int(i ,j ,k-1))) - ss(5,i,j,k) = fac*((sg_int(i-1,j-1,k ) + sg_int(i-1,j ,k ) & - +sg_int(i ,j-1,k ) + sg_int(i ,j ,k ))) - - ss(0,i,j,k) = -( ss(1,i,j,k) + ss(2,i,j,k) & - +ss(3,i,j,k) + ss(4,i,j,k) & - +ss(5,i,j,k) + ss(6,i,j,k) ) - end do - end do - end do - !$OMP END PARALLEL DO - - deallocate(sg_int) - - end subroutine s_simple_3d_one_sided - - subroutine s_dense_3d_nodal(ss, sg, mm, dh) - real (kind = dp_t), intent(inout) :: ss(0:,:,:,:) - real (kind = dp_t), intent(inout) :: sg(0:,0:,0:) - integer , intent(inout) :: mm(:,:,:) - real (kind = dp_t), intent(in ) :: dh(:) - - integer :: i, j, k, nx, ny, nz - real (kind = dp_t) :: fx,fy,fz,f0,fac,fxyz,f2y2zx,f2x2zy,f2x2yz - - real (kind = dp_t), parameter :: ONETHIRTYSIXTH = ONE / (36.0_dp_t) - - nx = size(ss,dim=2) - ny = size(ss,dim=3) - nz = size(ss,dim=4) - ! - ! BEGIN STENCIL - ! - ! Stencil applies as follows : (i is left to right, j is down to up) - ! - ! at k-1 at k at k+1 - ! - ! 6 7 8 11 24 12 18 19 20 - ! 4 25 5 21 0 22 16 26 17 - ! 1 2 3 9 23 10 13 14 15 - ! - ! END STENCIL - ! - call set_faces_edges_corners_3d(nx, ny, nz, sg, mm) - - fx = ONETHIRTYSIXTH - fy = ONETHIRTYSIXTH - fz = ONETHIRTYSIXTH - f0 = FOUR * (fx + fy + fz) - fac = (ONE / ((dh(1))**2)) - fxyz = (fx+fy+fz) - f2y2zx = (TWO*fy+TWO*fz-fx) - f2x2zy = (TWO*fx+TWO*fz-fy) - f2x2yz = (TWO*fx+TWO*fy-fz) - - !$OMP PARALLEL DO PRIVATE(i,j,k) - do k = 1, nz - do j = 1, ny - do i = 1, nx - ! - ! Corners - ! - ss( 1,i,j,k) = fac*fxyz*sg(i-1,j-1,k-1) - ss( 3,i,j,k) = fac*fxyz*sg(i ,j-1,k-1) - ss( 6,i,j,k) = fac*fxyz*sg(i-1,j ,k-1) - ss( 8,i,j,k) = fac*fxyz*sg(i ,j ,k-1) - ss(13,i,j,k) = fac*fxyz*sg(i-1,j-1,k ) - ss(15,i,j,k) = fac*fxyz*sg(i ,j-1,k ) - ss(18,i,j,k) = fac*fxyz*sg(i-1,j ,k ) - ss(20,i,j,k) = fac*fxyz*sg(i ,j ,k ) - ! - ! Edges in x-direction - ! - ss( 2,i,j,k) = fac*(f2y2zx*(sg(i ,j-1,k-1) + sg(i-1,j-1,k-1))) - ss( 7,i,j,k) = fac*(f2y2zx*(sg(i ,j ,k-1) + sg(i-1,j ,k-1))) - ss(14,i,j,k) = fac*(f2y2zx*(sg(i ,j-1,k ) + sg(i-1,j-1,k ))) - ss(19,i,j,k) = fac*(f2y2zx*(sg(i ,j ,k ) + sg(i-1,j ,k ))) - ! - ! Edges in y-direction - ! - ss( 4,i,j,k) = fac*(f2x2zy*(sg(i-1,j-1,k-1) + sg(i-1,j ,k-1))) - ss( 5,i,j,k) = fac*(f2x2zy*(sg(i ,j-1,k-1) + sg(i ,j ,k-1))) - ss(16,i,j,k) = fac*(f2x2zy*(sg(i-1,j-1,k ) + sg(i-1,j ,k ))) - ss(17,i,j,k) = fac*(f2x2zy*(sg(i ,j-1,k ) + sg(i ,j ,k ))) - ! - ! Edges in z-direction - ! - ss( 9,i,j,k) = fac*(f2x2yz*(sg(i-1,j-1,k-1) + sg(i-1,j-1,k ))) - ss(10,i,j,k) = fac*(f2x2yz*(sg(i ,j-1,k-1) + sg(i ,j-1,k ))) - ss(11,i,j,k) = fac*(f2x2yz*(sg(i-1,j ,k-1) + sg(i-1,j ,k ))) - ss(12,i,j,k) = fac*(f2x2yz*(sg(i ,j ,k-1) + sg(i ,j ,k ))) - - if (size(ss,dim=1) .eq. 27) then - ! - ! Faces in x-direction (only non-zero for non-uniform dx) - ! - ss(21,i,j,k) = fac*((FOUR*fx-TWO*fy-TWO*fz)*(sg(i-1,j-1,k-1) + sg(i-1,j-1,k ) & - +sg(i-1,j ,k-1) + sg(i-1,j ,k ))) - ss(22,i,j,k) = fac*((FOUR*fx-TWO*fy-TWO*fz)*(sg(i ,j-1,k-1) + sg(i ,j-1,k ) & - +sg(i ,j ,k-1) + sg(i ,j ,k ))) - ! - ! Faces in y-direction (only non-zero for non-uniform dx) - ! - ss(23,i,j,k) = fac*((FOUR*fy-TWO*fx-TWO*fz)*(sg(i-1,j-1,k-1) + sg(i-1,j-1,k ) & - +sg(i ,j-1,k-1) + sg(i ,j-1,k ))) - ss(24,i,j,k) = fac*((FOUR*fy-TWO*fx-TWO*fz)*(sg(i-1,j ,k-1) + sg(i-1,j ,k ) & - +sg(i ,j ,k-1) + sg(i ,j ,k ))) - ! - ! Faces in z-direction (only non-zero for non-uniform dx) - ! - ss(25,i,j,k) = fac*((FOUR*fz-TWO*fx-TWO*fy)*(sg(i-1,j-1,k-1) + sg(i-1,j ,k-1) & - +sg(i ,j-1,k-1) + sg(i ,j ,k-1))) - ss(26,i,j,k) = fac*((FOUR*fz-TWO*fx-TWO*fy)*(sg(i-1,j-1,k ) + sg(i-1,j ,k ) & - +sg(i ,j-1,k ) + sg(i ,j ,k ))) - end if - - ss(0,i,j,k) = -fac*f0*( sg(i-1,j-1,k-1) + sg(i,j-1,k-1) & - +sg(i-1,j ,k-1) + sg(i,j ,k-1) & - +sg(i-1,j-1,k ) + sg(i,j-1,k ) & - +sg(i-1,j ,k ) + sg(i,j ,k ) ) - - end do - end do - end do - !$OMP END PARALLEL DO - - end subroutine s_dense_3d_nodal - -end module nodal_stencil_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil_apply.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil_apply.f90 deleted file mode 100644 index 245b4ee9c..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil_apply.f90 +++ /dev/null @@ -1,230 +0,0 @@ -module nodal_stencil_apply_module - - use bl_types - use multifab_module - use bc_functions_module - use impose_neumann_bcs_module - use stencil_types_module - - implicit none - - real (kind = dp_t), private, parameter :: ZERO = 0.0_dp_t - real (kind = dp_t), private, parameter :: ONE = 1.0_dp_t - real (kind = dp_t), private, parameter :: TWO = 2.0_dp_t - real (kind = dp_t), private, parameter :: THREE = 3.0_dp_t - real (kind = dp_t), private, parameter :: FOUR = 4.0_dp_t - real (kind = dp_t), private, parameter :: FIVE = 5.0_dp_t - real (kind = dp_t), private, parameter :: SIX = 6.0_dp_t - real (kind = dp_t), private, parameter :: SEVEN = 7.0_dp_t - real (kind = dp_t), private, parameter :: EIGHT = 8.0_dp_t - real (kind = dp_t), private, parameter :: TEN = 10.0_dp_t - real (kind = dp_t), private, parameter :: HALF = 0.5_dp_t - real (kind = dp_t), private, parameter :: FOURTH= 0.25_dp_t - real (kind = dp_t), private, parameter :: THIRD = 1.0_dp_t/3.0_dp_t - real (kind = dp_t), private, parameter :: SIXTH = 1.0_dp_t/6.0_dp_t - real (kind = dp_t), private, parameter :: FOUR_THIRD = 4.0_dp_t/3.0_dp_t - -contains - - subroutine stencil_apply_1d_nodal(ss, dd, uu, mm, ng) - integer, intent(in) :: ng - real (kind = dp_t), intent(in ) :: ss(0:,:) - real (kind = dp_t), intent(inout) :: dd(0:) - real (kind = dp_t), intent(inout) :: uu(1-ng:) - integer , intent(in ) :: mm(:) - - integer :: i,lo(1) - - dd = ZERO - - lo = 1 - call impose_neumann_bcs_1d(uu,mm,lo,ng) - - i = 1 - if (.not. bc_dirichlet(mm(i),1,0)) then - dd(i) = ss(0,i)*uu(i) + ss(1,i)*uu(i+1) + ss(2,i)*uu(i-1) - end if - - do i = 2,size(ss,dim=2)-1 - dd(i) = ss(0,i)*uu(i) + ss(1,i) * uu(i+1) + ss(2,i) * uu(i-1) - end do - - i = size(ss,dim=2) - if (.not. bc_dirichlet(mm(i),1,0)) then - dd(i) = ss(0,i)*uu(i) + ss(1,i)*uu(i+1) + ss(2,i)*uu(i-1) - end if - - end subroutine stencil_apply_1d_nodal - - subroutine stencil_apply_2d_nodal(ss, dd, uu, mm, ng, stencil_type) - integer, intent(in) :: ng - real (kind = dp_t), intent(inout) :: uu(1-ng:,1-ng:) - real (kind = dp_t), intent(inout) :: dd(0:,0:) - real (kind = dp_t), intent(in ) :: ss(0:,:,:) - integer , intent(in ) :: mm(:,:) - integer , intent(in ) :: stencil_type - - integer :: i,j,lo(2),nx,ny - logical :: zeroit,iface,jface - - lo = 1 - call impose_neumann_bcs_2d(uu,mm,lo,ng) - - nx = size(ss,dim=2) - ny = size(ss,dim=3) - - if (stencil_type .eq. ND_CROSS_STENCIL) then - - do j = 1,ny - jface = .false. ; if ( (j.eq.1).or.(j.eq.ny) ) jface = .true. - do i = 1,nx - iface = .false. ; if ( (i.eq.1).or.(i.eq.nx) ) iface = .true. - - zeroit = .false. - - if ( iface .or. jface ) then - if (bc_dirichlet(mm(i,j),1,0)) zeroit = .true. - end if - - if (zeroit) then - dd(i,j) = ZERO - else - dd(i,j) = ss(0,i,j)*uu(i,j) + ss(1,i,j) * uu(i+1,j ) & - + ss(2,i,j) * uu(i-1,j ) & - + ss(3,i,j) * uu(i ,j+1) & - + ss(4,i,j) * uu(i ,j-1) - end if - end do - end do - - else if (stencil_type .eq. ND_DENSE_STENCIL) then - - do j = 1,ny - jface = .false. ; if ( (j.eq.1).or.(j.eq.ny) ) jface = .true. - do i = 1,nx - iface = .false. ; if ( (i.eq.1).or.(i.eq.nx) ) iface = .true. - - zeroit = .false. - - if ( iface .or. jface ) then - if (bc_dirichlet(mm(i,j),1,0)) zeroit = .true. - end if - - if (zeroit) then - dd(i,j) = ZERO - else - dd(i,j) = ss(0,i,j)*uu(i,j) + ss(1,i,j) * uu(i-1,j-1) & - + ss(2,i,j) * uu(i ,j-1) & - + ss(3,i,j) * uu(i+1,j-1) & - + ss(4,i,j) * uu(i-1,j ) & - + ss(5,i,j) * uu(i+1,j ) & - + ss(6,i,j) * uu(i-1,j+1) & - + ss(7,i,j) * uu(i ,j+1) & - + ss(8,i,j) * uu(i+1,j+1) - end if - end do - end do - - else - call bl_error("stencil_apply_2d_nodal: dont know this stencil_type") - end if - - end subroutine stencil_apply_2d_nodal - - subroutine stencil_apply_3d_nodal(ss, dd, uu, mm, ng, stencil_type, uniform_dh, bottom_solver) - integer , intent(in ) :: ng - real (kind = dp_t), intent(inout) :: uu(1-ng:,1-ng:,1-ng:) - real (kind = dp_t), intent(inout) :: dd(0:,0:,0:) - real (kind = dp_t), intent(in ) :: ss(0:,:,:,:) - integer , intent(in ) :: mm(:,:,:) - integer , intent(in ) :: stencil_type - logical , intent(in ) :: uniform_dh, bottom_solver - - integer :: i,j,k,lo(3),nx,ny,nz - logical :: jface,kface - - lo = 1 - - call impose_neumann_bcs_3d(uu,mm,lo,ng) - - nz = size(ss,dim=4) - ny = size(ss,dim=3) - nx = size(ss,dim=2) - - if (stencil_type .eq. ND_CROSS_STENCIL) then - - !$OMP PARALLEL DO PRIVATE(i,j,k,jface,kface) IF(.not.bottom_solver) - do k = 1,nz - kface = .false. ; if ( (k.eq.1) .or. (k.eq.nz) ) kface = .true. - - do j = 1,ny - jface = .false. ; if ( (j.eq.1) .or. (j.eq.ny) ) jface = .true. - - do i = 1,nx - - if ( (jface .or. kface .or. (i.eq.1) .or. (i.eq.nx)) .and. bc_dirichlet(mm(i,j,k),1,0) ) then - dd(i,j,k) = ZERO - else - dd(i,j,k) = & - ss(0,i,j,k) * uu(i,j,k) + & - ss(1,i,j,k) * uu(i+1,j ,k ) + & - ss(2,i,j,k) * uu(i-1,j ,k ) + & - ss(3,i,j,k) * uu(i ,j+1,k ) + & - ss(4,i,j,k) * uu(i ,j-1,k ) + & - ss(5,i,j,k) * uu(i ,j ,k+1) + & - ss(6,i,j,k) * uu(i ,j ,k-1) - end if - - end do - end do - end do - !$OMP END PARALLEL DO - - else if (stencil_type .eq. ND_DENSE_STENCIL) then - - !$OMP PARALLEL DO PRIVATE(i,j,k,jface,kface) IF(.not.bottom_solver) - do k = 1,nz - kface = .false. ; if ( (k.eq.1) .or. (k.eq.nz) ) kface = .true. - - do j = 1,ny - jface = .false. ; if ( (j.eq.1) .or. (j.eq.ny) ) jface = .true. - - do i = 1,nx - - if ( (jface .or. kface .or. (i.eq.1) .or. (i.eq.nx)) .and. bc_dirichlet(mm(i,j,k),1,0) ) then - dd(i,j,k) = ZERO - else - dd(i,j,k) = ss(0,i,j,k)*uu(i,j,k) & - + ss( 1,i,j,k) * uu(i-1,j-1,k-1) + ss( 2,i,j,k) * uu(i ,j-1,k-1) & - + ss( 3,i,j,k) * uu(i+1,j-1,k-1) + ss( 4,i,j,k) * uu(i-1,j ,k-1) & - + ss( 5,i,j,k) * uu(i+1,j ,k-1) + ss( 6,i,j,k) * uu(i-1,j+1,k-1) & - + ss( 7,i,j,k) * uu(i ,j+1,k-1) + ss( 8,i,j,k) * uu(i+1,j+1,k-1) & - + ss( 9,i,j,k) * uu(i-1,j-1,k ) + ss(10,i,j,k) * uu(i+1,j-1,k ) & - + ss(11,i,j,k) * uu(i-1,j+1,k ) + ss(12,i,j,k) * uu(i+1,j+1,k ) & - + ss(13,i,j,k) * uu(i-1,j-1,k+1) + ss(14,i,j,k) * uu(i ,j-1,k+1) & - + ss(15,i,j,k) * uu(i+1,j-1,k+1) + ss(16,i,j,k) * uu(i-1,j ,k+1) & - + ss(17,i,j,k) * uu(i+1,j ,k+1) + ss(18,i,j,k) * uu(i-1,j+1,k+1) & - + ss(19,i,j,k) * uu(i ,j+1,k+1) + ss(20,i,j,k) * uu(i+1,j+1,k+1) - - if ((size(ss,dim=1) .eq. 27) .and. (.not. uniform_dh)) then - ! - ! Add faces (only non-zero for non-uniform dx) - ! - dd(i,j,k) = dd(i,j,k) + & - ss(21,i,j,k) * uu(i-1,j ,k ) + ss(22,i,j,k) * uu(i+1,j ,k ) & - + ss(23,i,j,k) * uu(i ,j-1,k ) + ss(24,i,j,k) * uu(i ,j+1,k ) & - + ss(25,i,j,k) * uu(i ,j ,k-1) + ss(26,i,j,k) * uu(i ,j ,k+1) - end if - - end if - end do - end do - end do - !$OMP END PARALLEL DO - else - call bl_error("stencil_apply_3d_nodal: dont know this stencil_type") - end if - - end subroutine stencil_apply_3d_nodal - -end module nodal_stencil_apply_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil_fill.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil_fill.f90 deleted file mode 100644 index 794301338..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_stencil_fill.f90 +++ /dev/null @@ -1,326 +0,0 @@ -module nodal_stencil_fill_module - - use bl_types - use bc_module - use multifab_module - use nodal_stencil_module - - implicit none - - real (kind = dp_t), private, parameter :: ZERO = 0.0_dp_t - real (kind = dp_t), private, parameter :: ONE = 1.0_dp_t - real (kind = dp_t), private, parameter :: TWO = 2.0_dp_t - real (kind = dp_t), private, parameter :: THREE = 3.0_dp_t - real (kind = dp_t), private, parameter :: FOUR = 4.0_dp_t - real (kind = dp_t), private, parameter :: FIVE = 5.0_dp_t - real (kind = dp_t), private, parameter :: SIX = 6.0_dp_t - real (kind = dp_t), private, parameter :: SEVEN = 7.0_dp_t - real (kind = dp_t), private, parameter :: EIGHT = 8.0_dp_t - real (kind = dp_t), private, parameter :: TEN = 10.0_dp_t - real (kind = dp_t), private, parameter :: HALF = 0.5_dp_t - real (kind = dp_t), private, parameter :: THIRD = 1.0_dp_t/3.0_dp_t - real (kind = dp_t), private, parameter :: FOUR_THIRD = 4.0_dp_t/3.0_dp_t - -contains - - recursive subroutine stencil_fill_nodal_all_mglevels(mgt, sg, stencil_type) - - use coarsen_coeffs_module - use mg_tower_module - - type(mg_tower ), intent(inout) :: mgt - type(multifab ), intent(inout) :: sg(:) - integer , intent(in ) :: stencil_type - - type(multifab) :: stored_coeffs, stored_coeffs_grown - type(multifab) :: new_coeffs_grown - type(multifab), allocatable :: coarse_coeffs(:) - type(boxarray) :: ba_cc - type( layout) :: old_la_grown, new_la_grown - integer :: i, maxlev, maxlev_bottom - integer :: sg_ncomp - real(dp_t), pointer :: sc_orig(:,:,:,:), sc_grown(:,:,:,:) - - maxlev = mgt%nlevels - sg_ncomp = ncomp(sg(maxlev)) - - ! NOTE: sg(maxlev) comes in built and filled, but the other levels - ! are not even built yet - do i = maxlev-1, 1, -1 - call multifab_build(sg(i), get_layout(mgt%ss(i)), sg_ncomp, 1) - call setval(sg(i), ZERO, all=.true.) - call coarsen_cell_coeffs(sg(i+1),sg(i)) - call multifab_fill_boundary(sg(i)) - end do - - do i = maxlev, 1, -1 - call stencil_fill_nodal(mgt%ss(i), sg(i), mgt%dh(:,i), mgt%mm(i), & - mgt%face_type, stencil_type) - end do - - if (associated(mgt%bottom_mgt)) then - - call multifab_build(stored_coeffs, get_layout(mgt%ss(1)), 1, 1) - call multifab_copy_c(stored_coeffs,1,sg(1),1,1,ng = nghost(sg(1))) - call multifab_fill_boundary(stored_coeffs) - - maxlev_bottom = mgt%bottom_mgt%nlevels - allocate(coarse_coeffs(maxlev_bottom)) - call multifab_build(coarse_coeffs(maxlev_bottom),get_layout(mgt%bottom_mgt%cc(maxlev_bottom)),1,1) - call setval(coarse_coeffs(maxlev_bottom),ZERO,all=.true.) - - ! Grow the stored coefficients - call boxarray_build_copy(ba_cc,get_boxarray(stored_coeffs)) - call boxarray_grow(ba_cc,1) - call layout_build_ba(old_la_grown,ba_cc,boxarray_bbox(ba_cc),pmask = get_pmask(get_layout(mgt%ss(1))), & - explicit_mapping=get_proc(get_layout(mgt%ss(1)))) - call destroy(ba_cc) - call multifab_build(stored_coeffs_grown,old_la_grown,1,ng=0) - - do i = 1, nfabs(stored_coeffs_grown) - sc_orig => dataptr(stored_coeffs ,i,get_pbox(stored_coeffs_grown,i),1,1) - sc_grown => dataptr(stored_coeffs_grown,i,get_pbox(stored_coeffs_grown,i),1,1) - sc_grown = sc_orig - end do - - call boxarray_build_copy(ba_cc,get_boxarray(mgt%bottom_mgt%ss(maxlev_bottom))) - call boxarray_grow(ba_cc,1) - call layout_build_ba(new_la_grown,ba_cc,boxarray_bbox(ba_cc),pmask = get_pmask(get_layout(mgt%ss(1))), & - explicit_mapping = get_proc(get_layout(mgt%bottom_mgt%ss(maxlev_bottom)))) - call destroy(ba_cc) - call multifab_build(new_coeffs_grown,new_la_grown,1,ng=0) - call multifab_copy_c(new_coeffs_grown,1,stored_coeffs_grown,1,1) - - do i = 1, nfabs(new_coeffs_grown) - sc_orig => dataptr(coarse_coeffs(maxlev_bottom),i,get_pbox(new_coeffs_grown,i),1,1) - sc_grown => dataptr(new_coeffs_grown ,i,get_pbox(new_coeffs_grown,i),1,1) - sc_orig = sc_grown - end do - - call destroy(new_coeffs_grown) - - call stencil_fill_nodal_all_mglevels(mgt%bottom_mgt, coarse_coeffs, stencil_type) - - call destroy(coarse_coeffs(maxlev_bottom)) - deallocate(coarse_coeffs) - - call destroy(stored_coeffs) - call destroy(stored_coeffs_grown) - call destroy(old_la_grown) - call destroy(new_la_grown) - - end if - - do i = maxlev-1, 1, -1 - call destroy(sg(i)) - end do - - end subroutine stencil_fill_nodal_all_mglevels - - subroutine stencil_fill_nodal(ss, sg, dh, mask, face_type, stencil_type) - - type(multifab ), intent(inout) :: ss - type(multifab ), intent(inout) :: sg - real(kind=dp_t), intent(in ) :: dh(:) - type(imultifab), intent(inout) :: mask - integer , intent(in ) :: face_type(:,:,:) - integer , intent(in ) :: stencil_type - - real(kind=dp_t), pointer :: sp(:,:,:,:) - real(kind=dp_t), pointer :: cp(:,:,:,:) - integer , pointer :: mp(:,:,:,:) - - type(layout) :: la - type(box) :: pd_periodic, bx, nbx, bx1, pd - type(boxarray) :: bxa_periodic, bxa_temp - integer :: i, ib, jb, kb, ib_lo, jb_lo, kb_lo, dm - integer :: shift_vect(get_dim(ss)) - integer :: lo(get_dim(ss)), hi(get_dim(ss)) - integer :: ng_sg - type(list_box) :: lb,nbxs - type(box), allocatable :: bxs(:) - logical :: pmask(get_dim(ss)) - - type(bl_prof_timer), save :: bpt - - call build(bpt, "stencil_fill_nodal") - ! - ! Do this just to set everything in the mask to zero. - ! - call setval(mask,BC_INT) - ! - ! Construct a new boxarray that has periodically translated boxes as well - ! as the original boxes. - ! - pd_periodic = get_pd(get_layout(ss)) - - call boxarray_build_copy(bxa_periodic, get_boxarray(ss)) - - pmask = get_pmask(get_layout(ss)) - - dm = get_dim(ss) - - if ( any(pmask) ) then - ! - ! First trim out all boxes that can't effect periodicity. - ! - do i = 1,nboxes(bxa_periodic) - if ( .not. contains(pd_periodic, get_box(bxa_periodic,i), strict = .true.) ) then - call push_back(lb, get_box(bxa_periodic,i)) - end if - end do - - do i = 1,dm - if ( pmask(i) ) then - pd_periodic = grow(grow(pd_periodic,1,i,-1),1,i,1) - end if - end do - - ib_lo = 1 - if ( pmask(1) ) ib_lo = -1 - - jb_lo = 1 - if ( dm > 1 ) then - if ( pmask(2) ) jb_lo = -1 - end if - - kb_lo = 1 - if ( dm > 2 ) then - if ( pmask(3) ) kb_lo = -1 - end if - - pd = get_pd(get_layout(ss)) - - do kb = kb_lo, 1 - do jb = jb_lo, 1 - do ib = ib_lo, 1 - call copy(bxa_temp,lb) - - shift_vect = 0 - - if ( pmask(1) ) shift_vect(1) = ib * extent(pd,1) - - if ( dm > 1 ) then - if ( pmask(2) ) shift_vect(2) = jb * extent(pd,2) - end if - - if ( dm > 2 ) then - if ( pmask(3) ) shift_vect(3) = kb * extent(pd,3) - end if - - call boxarray_shift(bxa_temp,shift_vect) - - do i = 1, nboxes(bxa_temp) - bx1 = intersection(get_box(bxa_temp,i),pd_periodic) - if ( .not. empty(bx1) ) then - call push_back(nbxs, bx1) - end if - end do - - call destroy(bxa_temp) - end do - end do - end do - - call destroy(lb) - - allocate(bxs(size(nbxs))) - - do i = 1, size(bxs) - bxs(i) = front(nbxs) - call pop_front(nbxs) - end do - - call boxarray_add_clean_boxes(bxa_periodic,bxs,simplify = .false.) - - call destroy(nbxs) - - end if - ! - ! Build layout on bxa_periodic. We use a layout to make the stencil_set_bc_nodal() more efficient. - ! - call build(la,bxa_periodic,get_pd(get_layout(ss))) - - ng_sg = nghost(sg) - - do i = 1, nfabs(ss) - - sp => dataptr(ss, i) - cp => dataptr(sg, i) - mp => dataptr(mask, i) - - bx = get_box(ss,i) - nbx = get_ibox(ss, i) - - call stencil_set_bc_nodal(dm, bx, nbx, i, mask, face_type, pd_periodic, la) - - lo = lwb(get_box(sg,i)) - hi = upb(get_box(sg,i)) - - select case (dm) - case (1) - call s_simple_1d_nodal(sp(:,:,1,1), cp(:,1,1,1), mp(:,1,1,1), dh) - case (2) - if (stencil_type == ND_DENSE_STENCIL) then - call s_dense_2d_nodal(sp(:,:,:,1), cp(:,:,1,:), ng_sg, mp(:,:,1,1), & - face_type(i,:,:), dh, lo, hi) - else if (stencil_type == ND_CROSS_STENCIL) then - call s_cross_2d_nodal(sp(:,:,:,1), cp(:,:,1,1), mp(:,:,1,1), & - face_type(i,:,:), dh) - else - print *,'DONT KNOW THIS NODAL STENCIL TYPE ',stencil_type - call bl_error('stencil_fill_nodal') - end if - case (3) - if (stencil_type == ND_DENSE_STENCIL) then - call s_dense_3d_nodal(sp(:,:,:,:), cp(:,:,:,1), mp(:,:,:,1), dh) - else if (stencil_type == ND_CROSS_STENCIL) then - call s_cross_3d_nodal(sp(:,:,:,:), cp(:,:,:,1), mp(:,:,:,1), dh) - else - print*,'DONT KNOW THIS NODAL STENCIL TYPE ',stencil_type - call bl_error('stencil_fill_nodal') - end if - end select - end do - - call destroy(bxa_periodic) - call destroy(la) - call destroy(bpt) - - end subroutine stencil_fill_nodal - - subroutine stencil_fill_one_sided(ss, sg, dh, mask, face_type) - - type(multifab ), intent(inout) :: ss - type(multifab ), intent(inout) :: sg - real(kind=dp_t), intent(in ) :: dh(:) - type(imultifab), intent(inout) :: mask - integer , intent(in ) :: face_type(:,:,:) - - real(kind=dp_t), pointer :: sp(:,:,:,:) - real(kind=dp_t), pointer :: cp(:,:,:,:) - integer , pointer :: mp(:,:,:,:) - integer :: i, dm - - dm = get_dim(ss) - - do i = 1, nfabs(ss) - - sp => dataptr(ss, i) - cp => dataptr(sg, i) - mp => dataptr(mask, i) - - select case (dm) - case (1) - call bl_error('s_simple_1d_one_sided() not implemented') - case (2) - call s_simple_2d_one_sided(sp(:,:,:,1), cp(:,:,1,1), mp(:,:,1,1), & - face_type(i,:,:), dh) - case (3) - call s_simple_3d_one_sided(sp(:,:,:,:), cp(:,:,:,1), mp(:,:,:,1), dh) - end select - end do - - end subroutine stencil_fill_one_sided - -end module nodal_stencil_fill_module diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_sync_resid.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_sync_resid.f90 deleted file mode 100644 index e6dcdd3ff..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/nodal_sync_resid.f90 +++ /dev/null @@ -1,675 +0,0 @@ -module nodal_sync_resid_module - use bl_constants_module - use bc_functions_module - use multifab_module - implicit none - -contains - - subroutine compute_divuo(divuo, mask, vold, dx, face_type) - type(multifab) , intent(inout) :: divuo - type(multifab) , intent(in ) :: mask - type(multifab) , intent(in ) :: vold - real(kind=dp_t), intent(in ) :: dx(:) - integer , intent(in ) :: face_type(:,:,:) - - integer :: i, dm - real(kind=dp_t), pointer :: msk(:,:,:,:) - real(kind=dp_t), pointer :: vo(:,:,:,:) - real(kind=dp_t), pointer :: dvo(:,:,:,:) - - dm = get_dim(vold) - - do i = 1, nfabs(divuo) - dvo => dataptr(divuo, i) - msk => dataptr(mask , i) - vo => dataptr(vold , i) - select case (dm) - case (1) - call bl_error('divuo: 1d not done') - case (2) - call divuo_2d(dvo(:,:,1,1), msk(:,:,1,1), vo(:,:,1,:), dx, face_type(i,:,:)) - case (3) - call divuo_3d(dvo(:,:,:,1), msk(:,:,:,1), vo(:,:,:,:), dx, face_type(i,:,:)) - end select - end do - - end subroutine compute_divuo - - subroutine divuo_2d(dvo, msk, vel, dx, face_type) - real(kind=dp_t), intent(inout) :: dvo(-1:,-1:) - real(kind=dp_t), intent(in ) :: msk(-1:,-1:) - real(kind=dp_t), intent(in ) :: vel(-1:,-1:,:) - real(kind=dp_t), intent(in ) :: dx(:) - integer , intent(in ) :: face_type(:,:) - - integer :: i, j, nx, ny - real(kind=dp_t) :: divv - - nx = size(msk,dim=1) - 2 - ny = size(msk,dim=2) - 2 - - do j = 0, ny - do i = 0, nx - divv = (vel(i ,j,1)*msk(i , j) + vel(i ,j-1,1)*msk(i ,j-1) & - - vel(i-1,j,1)*msk(i-1,j) - vel(i-1,j-1,1)*msk(i-1,j-1)) / dx(1) & - + (vel(i,j ,2)*msk(i,j ) + vel(i-1,j ,2)*msk(i-1,j ) & - - vel(i,j-1,2)*msk(i,j-1) - vel(i-1,j-1,2)*msk(i-1,j-1)) / dx(2) - dvo(i,j) = HALF * divv - end do - end do - - if (face_type(1,1) == BC_NEU) dvo( 0,:) = TWO*dvo( 0,:) - if (face_type(1,2) == BC_NEU) dvo(nx,:) = TWO*dvo(nx,:) - if (face_type(2,1) == BC_NEU) dvo(:, 0) = TWO*dvo(:, 0) - if (face_type(2,2) == BC_NEU) dvo(:,ny) = TWO*dvo(:,ny) - - end subroutine divuo_2d - - subroutine divuo_3d(dvo, msk, vel, dx, face_type) - real(kind=dp_t), intent(inout) :: dvo(-1:,-1:,-1:) - real(kind=dp_t), intent(in ) :: msk(-1:,-1:,-1:) - real(kind=dp_t), intent(in ) :: vel(-1:,-1:,-1:,:) - real(kind=dp_t), intent(in ) :: dx(:) - integer , intent(in ) :: face_type(:,:) - - integer :: i, j, k, nx, ny, nz - real(kind=dp_t) :: ivdx,ivdy,ivdz - - nx = size(msk,dim=1) - 2 - ny = size(msk,dim=2) - 2 - nz = size(msk,dim=3) - 2 - - ivdx = 1.0d0 / dx(1) - ivdy = 1.0d0 / dx(2) - ivdz = 1.0d0 / dx(3) - - !$OMP PARALLEL DO PRIVATE(i,j,k) - do k = 0, nz - do j = 0, ny - do i = 0, nx - dvo(i,j,k) = FOURTH * ( & - & (vel(i ,j ,k ,1) * msk(i ,j ,k ) & - + vel(i ,j-1,k ,1) * msk(i ,j-1,k ) & - + vel(i ,j ,k-1,1) * msk(i ,j ,k-1) & - + vel(i ,j-1,k-1,1) * msk(i ,j-1,k-1) & - - vel(i-1,j ,k ,1) * msk(i-1,j ,k ) & - - vel(i-1,j-1,k ,1) * msk(i-1,j-1,k ) & - - vel(i-1,j ,k-1,1) * msk(i-1,j ,k-1) & - - vel(i-1,j-1,k-1,1) * msk(i-1,j-1,k-1)) * ivdx & - + (vel(i ,j ,k ,2) * msk(i ,j ,k ) & - + vel(i-1,j ,k ,2) * msk(i-1,j ,k ) & - + vel(i ,j ,k-1,2) * msk(i ,j ,k-1) & - + vel(i-1,j ,k-1,2) * msk(i-1,j ,k-1) & - - vel(i ,j-1,k ,2) * msk(i ,j-1,k ) & - - vel(i-1,j-1,k ,2) * msk(i-1,j-1,k ) & - - vel(i ,j-1,k-1,2) * msk(i ,j-1,k-1) & - - vel(i-1,j-1,k-1,2) * msk(i-1,j-1,k-1)) * ivdy & - + (vel(i ,j ,k ,3) * msk(i ,j ,k ) & - + vel(i-1,j ,k ,3) * msk(i-1,j ,k ) & - + vel(i ,j-1,k ,3) * msk(i ,j-1,k ) & - + vel(i-1,j-1,k ,3) * msk(i-1,j-1,k ) & - - vel(i ,j ,k-1,3) * msk(i ,j ,k-1) & - - vel(i-1,j ,k-1,3) * msk(i-1,j ,k-1) & - - vel(i ,j-1,k-1,3) * msk(i ,j-1,k-1) & - - vel(i-1,j-1,k-1,3) * msk(i-1,j-1,k-1)) * ivdz ) - end do - end do - end do - !$OMP END PARALLEL DO - - if (face_type(1,1) == BC_NEU) dvo( 0,:,:) = TWO*dvo( 0,:,:) - if (face_type(1,2) == BC_NEU) dvo(nx,:,:) = TWO*dvo(nx,:,:) - if (face_type(2,1) == BC_NEU) dvo(:, 0,:) = TWO*dvo(:, 0,:) - if (face_type(2,2) == BC_NEU) dvo(:,ny,:) = TWO*dvo(:,ny,:) - if (face_type(3,1) == BC_NEU) dvo(:,:, 0) = TWO*dvo(:,:, 0) - if (face_type(3,2) == BC_NEU) dvo(:,:,nz) = TWO*dvo(:,:,nz) - - end subroutine divuo_3d - - subroutine comp_sync_res(sync_res, divuo, mask, sign_res) - type(multifab) , intent(inout) :: sync_res - type(multifab) , intent(in ) :: divuo - type(multifab) , intent(in ) :: mask - real(kind=dp_t), intent(in ) :: sign_res - - integer :: i, dm - real(kind=dp_t), pointer :: res(:,:,:,:) - real(kind=dp_t), pointer :: dvo(:,:,:,:) - real(kind=dp_t), pointer :: msk(:,:,:,:) - - dm = get_dim(sync_res) - - do i = 1, nfabs(sync_res) - res => dataptr(sync_res, i) - dvo => dataptr(divuo , i) - msk => dataptr(mask , i) - select case (dm) - case (1) - call bl_error('comp_sync_res: 1d not done') - case (2) - call comp_sync_res_2d(res(:,:,1,1), dvo(:,:,1,1), msk(:,:,1,1), sign_res) - case (3) - call comp_sync_res_3d(res(:,:,:,1), dvo(:,:,:,1), msk(:,:,:,1), sign_res) - end select - end do - - end subroutine comp_sync_res - - subroutine comp_sync_res_2d(res, dvo, msk, sgnr) - real(kind=dp_t), intent(inout) :: res(-1:,-1:) - real(kind=dp_t), intent(in ) :: dvo(-1:,-1:) - real(kind=dp_t), intent(in ) :: msk(-1:,-1:) - real(kind=dp_t), intent(in ) :: sgnr - - integer :: i, j, nx, ny - - nx = size(msk,dim=1) - 2 - ny = size(msk,dim=2) - 2 - - do j = 0, ny - do i = 0, nx - if ( any(msk(i-1:i,j-1:j) .eq. ONE) .and. & - any(msk(i-1:i,j-1:j) .eq. ZERO) ) then - res(i,j) = sgnr*res(i,j) + dvo(i,j) - else - res(i,j) = ZERO - end if - end do - end do - - end subroutine comp_sync_res_2d - - subroutine comp_sync_res_3d(res, dvo, msk, sgnr) - real(kind=dp_t), intent(inout) :: res(-1:,-1:,-1:) - real(kind=dp_t), intent(in ) :: dvo(-1:,-1:,-1:) - real(kind=dp_t), intent(in ) :: msk(-1:,-1:,-1:) - real(kind=dp_t), intent(in ) :: sgnr - - integer :: i, j, k, nx, ny, nz - real(kind=dp_t) :: result - - nx = size(msk,dim=1) - 2 - ny = size(msk,dim=2) - 2 - nz = size(msk,dim=3) - 2 - - !$OMP PARALLEL DO PRIVATE(i,j,k,result) - do k = 0, nz - do j = 0, ny - do i = 0, nx - result = ZERO - if ( any(msk(i-1:i,j-1:j,k-1:k) .eq. ONE) ) then - if ( any(msk(i-1:i,j-1:j,k-1:k) .eq. ZERO) ) then - result = sgnr*res(i,j,k) + dvo(i,j,k) - endif - endif - res(i,j,k) = result - end do - end do - end do - !$OMP END PARALLEL DO - - end subroutine comp_sync_res_3d - - subroutine divuo_add_rhcc(divuo, rhcc, mask, face_type) - type(multifab) , intent(inout) :: divuo - type(multifab) , intent(inout) :: rhcc - type(multifab) , intent(in ) :: mask - integer , intent(in ) :: face_type(:,:,:) - - integer :: i, dm - real(kind=dp_t), pointer :: msk(:,:,:,:) - real(kind=dp_t), pointer :: dvo(:,:,:,:) - real(kind=dp_t), pointer :: rc(:,:,:,:) - - dm = get_dim(rhcc) - - do i = 1, nfabs(divuo) - dvo => dataptr(divuo, i) - msk => dataptr(mask , i) - rc => dataptr(rhcc , i) - select case (dm) - case (1) - call bl_error('divuo_rhcc_1d: 1d not done') - case (2) - call divuo_rhcc_2d(dvo(:,:,1,1), msk(:,:,1,1), rc(:,:,1,1), face_type(i,:,:)) - case (3) - call divuo_rhcc_3d(dvo(:,:,:,1), msk(:,:,:,1), rc(:,:,:,1), face_type(i,:,:)) - end select - end do - - end subroutine divuo_add_rhcc - - subroutine divuo_rhcc_2d(dvo, msk, rc, face_type) - real(kind=dp_t), intent(inout) :: dvo(-1:,-1:) - real(kind=dp_t), intent(in ) :: msk(-1:,-1:) - real(kind=dp_t), intent(inout) :: rc(-1:,-1:) - integer , intent(in ) :: face_type(:,:) - - integer :: i, j, nx, ny - real(kind=dp_t), pointer :: tmp(:,:) - - nx = size(msk,dim=1) - 2 - ny = size(msk,dim=2) - 2 - - rc(-1,:) = ZERO - rc(nx,:) = ZERO - rc(:,-1) = ZERO - rc(:,ny) = ZERO - - allocate(tmp(0:nx,0:ny)) - - do j = 0, ny - do i = 0, nx - tmp(i,j) = FOURTH * & - ( rc(i-1,j-1) * msk(i-1,j-1) & - + rc(i ,j-1) * msk(i ,j-1) & - + rc(i-1,j ) * msk(i-1,j ) & - + rc(i ,j ) * msk(i ,j ) ) - end do - end do - - if (face_type(1,1) == BC_NEU) tmp( 0,:) = TWO*tmp( 0,:) - if (face_type(1,2) == BC_NEU) tmp(nx,:) = TWO*tmp(nx,:) - if (face_type(2,1) == BC_NEU) tmp(:, 0) = TWO*tmp(:, 0) - if (face_type(2,2) == BC_NEU) tmp(:,ny) = TWO*tmp(:,ny) - - do j = 0, ny - do i = 0, nx - dvo(i,j) = dvo(i,j) + tmp(i,j) - end do - end do - - deallocate(tmp) - - end subroutine divuo_rhcc_2d - - subroutine divuo_rhcc_3d(dvo, msk, rc, face_type) - real(kind=dp_t), intent(inout) :: dvo(-1:,-1:,-1:) - real(kind=dp_t), intent(in ) :: msk(-1:,-1:,-1:) - real(kind=dp_t), intent(inout) :: rc(-1:,-1:,-1:) - integer , intent(in ) :: face_type(:,:) - - integer :: i, j, k, nx, ny, nz - real(kind=dp_t), pointer :: tmp(:,:,:) - - nx = size(msk,dim=1) - 2 - ny = size(msk,dim=2) - 2 - nz = size(msk,dim=3) - 2 - - rc(-1,:,:) = ZERO - rc(nx,:,:) = ZERO - rc(:,-1,:) = ZERO - rc(:,ny,:) = ZERO - rc(:,:,-1) = ZERO - rc(:,:,nz) = ZERO - - allocate(tmp(0:nx,0:ny,0:nz)) - - !$OMP PARALLEL DO PRIVATE(i,j,k) - do k = 0, nz - do j = 0, ny - do i = 0, nx - tmp(i,j,k) = EIGHTH * & - ( rc(i-1,j-1,k-1) * msk(i-1,j-1,k-1) & - + rc(i ,j-1,k-1) * msk(i ,j-1,k-1) & - + rc(i-1,j ,k-1) * msk(i-1,j ,k-1) & - + rc(i ,j ,k-1) * msk(i ,j ,k-1) & - + rc(i-1,j-1,k ) * msk(i-1,j-1,k ) & - + rc(i ,j-1,k ) * msk(i ,j-1,k ) & - + rc(i-1,j ,k ) * msk(i-1,j ,k ) & - + rc(i ,j ,k ) * msk(i ,j ,k ) ) - end do - end do - end do - !$OMP END PARALLEL DO - - if (face_type(1,1) == BC_NEU) tmp( 0,:,:) = TWO*tmp( 0,:,:) - if (face_type(1,2) == BC_NEU) tmp(nx,:,:) = TWO*tmp(nx,:,:) - if (face_type(2,1) == BC_NEU) tmp(:, 0,:) = TWO*tmp(:, 0,:) - if (face_type(2,2) == BC_NEU) tmp(:,ny,:) = TWO*tmp(:,ny,:) - if (face_type(3,1) == BC_NEU) tmp(:,:, 0) = TWO*tmp(:,:, 0) - if (face_type(3,2) == BC_NEU) tmp(:,:,nz) = TWO*tmp(:,:,nz) - - !$OMP PARALLEL DO PRIVATE(i,j,k) - do k = 0, nz - do j = 0, ny - do i = 0, nx - dvo(i,j,k) = dvo(i,j,k) + tmp(i,j,k) - end do - end do - end do - !$OMP END PARALLEL DO - - deallocate(tmp) - - end subroutine divuo_rhcc_3d - - subroutine sync_res_fine_bndry(res_fine, face_type) - type(multifab), intent(inout) :: res_fine - integer, intent(in) :: face_type(:,:,:) - - integer :: i, dm - real(kind=dp_t), pointer :: resp(:,:,:,:) - - dm = get_dim(res_fine) - - do i = 1, nfabs(res_fine) - resp => dataptr(res_fine, i) - select case (dm) - case (1) - call bl_error('sync_res_fine_bndry: 1d not done') - case (2) - call res_fine_bndry_2d(resp(:,:,1,1), face_type(i,:,:)) - case (3) - call res_fine_bndry_3d(resp(:,:,:,1), face_type(i,:,:)) - end select - end do - - end subroutine sync_res_fine_bndry - - subroutine res_fine_bndry_2d(res, face_type) - real(kind=dp_t), intent(inout) :: res(-1:,-1:) - integer , intent(in ) :: face_type(:,:) - integer :: nx, ny - - nx = size(res,dim=1) - 3 - ny = size(res,dim=2) - 3 - - if (face_type(1,1) == BC_NEU) res( 0,:) = HALF*res( 0,:) - if (face_type(1,2) == BC_NEU) res(nx,:) = HALF*res(nx,:) - if (face_type(2,1) == BC_NEU) res(:, 0) = HALF*res(:, 0) - if (face_type(2,2) == BC_NEU) res(:,ny) = HALF*res(:,ny) - - end subroutine res_fine_bndry_2d - - subroutine res_fine_bndry_3d(res, face_type) - real(kind=dp_t), intent(inout) :: res(-1:,-1:,-1:) - integer , intent(in ) :: face_type(:,:) - integer :: nx, ny, nz - - nx = size(res,dim=1) - 3 - ny = size(res,dim=2) - 3 - nz = size(res,dim=3) - 3 - - if (face_type(1,1) == BC_NEU) res( 0,:,:) = HALF*res( 0,:,:) - if (face_type(1,2) == BC_NEU) res(nx,:,:) = HALF*res(nx,:,:) - if (face_type(2,1) == BC_NEU) res(:, 0,:) = HALF*res(:, 0,:) - if (face_type(2,2) == BC_NEU) res(:,ny,:) = HALF*res(:,ny,:) - if (face_type(3,1) == BC_NEU) res(:,:, 0) = HALF*res(:,:, 0) - if (face_type(3,2) == BC_NEU) res(:,:,nz) = HALF*res(:,:,nz) - - end subroutine res_fine_bndry_3d - -end module nodal_sync_resid_module - - -subroutine mgt_alloc_nodal_sync() - use nodal_cpp_mg_module - implicit none - logical,dimension(3) :: nodal - - allocate(mgts%sync_res(1)) - allocate(mgts%sync_msk(1)) - allocate(mgts%vold(1)) - - nodal = .true. - - call build(mgts%sync_res(1) , mgts%mla%la(1), nc = 1, ng = 1, nodal = nodal) - call build(mgts%sync_msk(1) , mgts%mla%la(1), nc = 1, ng = 1) - call build(mgts%vold(1) , mgts%mla%la(1), nc = mgts%dim, ng = 1) - - call setval(mgts%sync_res(1),ZERO,all=.true.) -! wqz. unnecessary to call setval(mgts%vold(1),ZERO,all=.true.) - -end subroutine mgt_alloc_nodal_sync - -subroutine mgt_dealloc_nodal_sync() - use nodal_cpp_mg_module - implicit none - - call destroy(mgts%sync_res(1)) - call destroy(mgts%sync_msk(1)) - call destroy(mgts%vold(1)) - - deallocate(mgts%sync_res) - deallocate(mgts%sync_msk) - deallocate(mgts%vold) - -end subroutine mgt_dealloc_nodal_sync - -subroutine mgt_set_sync_msk_1d(lev, n, msk_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1) - real(kind=dp_t), intent(in) :: msk_in(plo(1):phi(1)) - real(kind=dp_t), pointer :: mskp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - mskp => dataptr(mgts%sync_msk(flev), local_index(mgts%sync_msk(flev),fn)) - mskp(plo(1):phi(1),1,1,1) = msk_in(plo(1):phi(1)) -end subroutine mgt_set_sync_msk_1d - -subroutine mgt_set_sync_msk_2d(lev, n, msk_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2) - real(kind=dp_t), intent(in) :: msk_in(plo(1):phi(1),plo(2):phi(2)) - real(kind=dp_t), pointer :: mskp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - mskp => dataptr(mgts%sync_msk(flev), local_index(mgts%sync_msk(flev),fn)) - mskp(plo(1):phi(1),plo(2):phi(2),1,1) = msk_in(plo(1):phi(1),plo(2):phi(2)) -end subroutine mgt_set_sync_msk_2d - -subroutine mgt_set_sync_msk_3d(lev, n, msk_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3) - real(kind=dp_t), intent(in) :: msk_in(plo(1):phi(1),plo(2):phi(2),plo(3):phi(3)) - real(kind=dp_t), pointer :: mskp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - mskp => dataptr(mgts%sync_msk(flev), local_index(mgts%sync_msk(flev),fn)) - mskp(plo(1):phi(1),plo(2):phi(2),plo(3):phi(3),1) = & - msk_in(plo(1):phi(1),plo(2):phi(2),plo(3):phi(3)) -end subroutine mgt_set_sync_msk_3d - -subroutine mgt_set_vold_1d(lev, n, v_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1) - real(kind=dp_t), intent(in) :: v_in(plo(1):phi(1)) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - vp => dataptr(mgts%vold(flev), local_index(mgts%vold(flev),fn)) - vp(lo(1)-1:hi(1)+1,1,1,1) = v_in(lo(1)-1:hi(1)+1) -end subroutine mgt_set_vold_1d - -subroutine mgt_set_vold_2d(lev, n, v_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2) - real(kind=dp_t), intent(in) :: v_in(plo(1):phi(1),plo(2):phi(2),1:2) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - vp => dataptr(mgts%vold(flev), local_index(mgts%vold(flev),fn)) - vp(lo(1)-1:hi(1)+1,lo(2)-1:hi(2)+1,1,1:2) = & - v_in(lo(1)-1:hi(1)+1,lo(2)-1:hi(2)+1,1:2) -end subroutine mgt_set_vold_2d - -subroutine mgt_set_vold_3d(lev, n, v_in, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3) - real(kind=dp_t), intent(in) :: v_in(plo(1):phi(1),plo(2):phi(2),plo(3):phi(3),1:3) - real(kind=dp_t), pointer :: vp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - vp => dataptr(mgts%vold(flev), local_index(mgts%vold(flev),fn)) - vp(lo(1)-1:hi(1)+1,lo(2)-1:hi(2)+1,lo(3)-1:hi(3)+1,1:3) = & - v_in(lo(1)-1:hi(1)+1,lo(2)-1:hi(2)+1,lo(3)-1:hi(3)+1,1:3) -end subroutine mgt_set_vold_3d - -subroutine mgt_get_sync_res_1d(lev, n, res, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(1), hi(1), plo(1), phi(1) - real(kind=dp_t), intent(inout) :: res(plo(1):phi(1)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - rp => dataptr(mgts%sync_res(flev), local_index(mgts%sync_res(flev),fn)) - res(lo(1):hi(1)) = rp(lo(1):hi(1), 1, 1, 1) - -end subroutine mgt_get_sync_res_1d - -subroutine mgt_get_sync_res_2d(lev, n, res, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(2), hi(2), plo(2), phi(2) - real(kind=dp_t), intent(inout) :: res(plo(1):phi(1), plo(2):phi(2)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - rp => dataptr(mgts%sync_res(flev), local_index(mgts%sync_res(flev),fn)) - res(lo(1):hi(1), lo(2):hi(2)) = rp(lo(1):hi(1), lo(2):hi(2), 1, 1) - -end subroutine mgt_get_sync_res_2d - -subroutine mgt_get_sync_res_3d(lev, n, res, plo, phi, lo, hi) - use nodal_cpp_mg_module - implicit none - integer, intent(in) :: lev, n, lo(3), hi(3), plo(3), phi(3) - real(kind=dp_t), intent(inout) :: res(plo(1):phi(1), plo(2):phi(2), plo(3):phi(3)) - real(kind=dp_t), pointer :: rp(:,:,:,:) - integer :: flev, fn - fn = n + 1 - flev = lev+1 - - rp => dataptr(mgts%sync_res(flev), local_index(mgts%sync_res(flev),fn)) - res(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3)) = & - rp(lo(1):hi(1), lo(2):hi(2), lo(3):hi(3), 1) - -end subroutine mgt_get_sync_res_3d - -subroutine mgt_compute_sync_resid_crse() - use nodal_cpp_mg_module - use nodal_sync_resid_module - use nodal_stencil_fill_module, only : stencil_fill_nodal - use stencil_defect_module, only : stencil_apply - implicit none - - integer :: dm, mglev - real(kind=dp_t) :: sign_res - type(multifab) :: divuo - logical :: nodal(3) - - nodal = .true. - dm = get_dim(mgts%sync_res(1)) - mglev = mgts%mgt(1)%nlevels - - call build(divuo, mgts%mla%la(1), nc=1, ng=1, nodal=nodal) - - call compute_divuo(divuo, mgts%sync_msk(1), mgts%vold(1), mgts%mgt(1)%dh(:,mglev), & - mgts%mgt(1)%face_type) - - if (associated(mgts%rhcc)) then ! only single level solve could get here - call divuo_add_rhcc(divuo, mgts%rhcc(1), mgts%sync_msk(1), mgts%mgt(1)%face_type) - end if - - call multifab_mult_mult(mgts%amr_coeffs(1), mgts%sync_msk(1)) - - call stencil_fill_nodal(mgts%mgt(1)%ss(mglev), mgts%amr_coeffs(1), & - mgts%mgt(1)%dh(:,mglev), mgts%mgt(1)%mm(mglev), & - mgts%mgt(1)%face_type, mgts%stencil_type) - - call stencil_apply(mgts%mgt(1)%ss(mglev), mgts%sync_res(1), mgts%uu(1), & - mgts%mgt(1)%mm(mglev), mgts%mgt(1)%stencil_type, & - mgts%mgt(1)%lcross, mgts%mgt(1)%uniform_dh) - - sign_res = -ONE - call comp_sync_res(mgts%sync_res(1), divuo, mgts%sync_msk(1), sign_res) - - call destroy(divuo) - -end subroutine mgt_compute_sync_resid_crse - -subroutine mgt_compute_sync_resid_fine() - use nodal_cpp_mg_module - use nodal_sync_resid_module - use ml_nd_module - use nodal_stencil_fill_module, only : stencil_fill_nodal, stencil_fill_one_sided - implicit none - - integer :: dm, mglev - real(kind=dp_t) :: sign_res - type(multifab) :: ss1 - type(multifab) :: divuo - type(multifab) :: rh0 - logical :: nodal(3) - - nodal = .true. - dm = get_dim(mgts%sync_res(1)) - mglev = mgts%mgt(1)%nlevels - - call build(divuo, mgts%mla%la(1), nc=1, ng=1, nodal=nodal) - - call build(rh0, mgts%mla%la(1), nc=1, ng=1, nodal=nodal) - call setval(rh0,ZERO,all=.true.) - - call compute_divuo(divuo, mgts%sync_msk(1), mgts%vold(1), mgts%mgt(1)%dh(:,mglev), & - mgts%mgt(1)%face_type) - - if (associated(mgts%rhcc)) then - call divuo_add_rhcc(divuo, mgts%rhcc(1), mgts%sync_msk(1), mgts%mgt(1)%face_type) - end if - - if (mgts%stencil_type .eq. ND_CROSS_STENCIL) then - call multifab_build(ss1, mgts%mla%la(1), 2*dm+1, 0, nodal, stencil=.true.) - call stencil_fill_one_sided(ss1, mgts%amr_coeffs(1), mgts%mgt(1)%dh(:,mglev), & - mgts%mgt(1)%mm(mglev), mgts%mgt(1)%face_type) - - call grid_res(ss1, & - mgts%sync_res(1), rh0, mgts%uu(1), mgts%mgt(1)%mm(mglev), & - mgts%mgt(1)%face_type, & - mgts%mgt(1)%lcross, mgts%mgt(1)%uniform_dh) - else - call grid_res(mgts%mgt(1)%ss(mglev), & - mgts%sync_res(1), rh0, mgts%uu(1), mgts%mgt(1)%mm(mglev), & - mgts%mgt(1)%face_type, & - mgts%mgt(1)%lcross, mgts%mgt(1)%uniform_dh) - endif - - sign_res = ONE - call comp_sync_res(mgts%sync_res(1), divuo, mgts%sync_msk(1), sign_res) - - call sync_res_fine_bndry(mgts%sync_res(1), mgts%mgt(1)%face_type) - - if (mgts%stencil_type .eq. ND_CROSS_STENCIL) then - call destroy(ss1) - endif - - call destroy(divuo) - call destroy(rh0) - -end subroutine mgt_compute_sync_resid_fine - diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/regression b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/regression deleted file mode 100644 index 9d67ed167..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/regression +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# for i in ../Parallel/mglib/Test/grids/gr.2_* -# do -# echo $i -# ./main.exe --test_set_mglib --test_set $i --test 0 --verbose 2 -# ./main.exe --test_set_mglib --test_set $i --test 0 --verbose 2 --bottom_solver 3 -# ./main.exe --test_set_mglib --test_set $i --test 0 --verbose 2 --bottom_solver 2 -# ./main.exe --test_set_mglib --test_set $i --test 0 --verbose 2 --bottom_solver 0 -# ./main.exe --test_set_mglib --test_set $i --test 1 --verbose 2 -# ./main.exe --test_set_mglib --test_set $i --test 2 --verbose 2 -# ./main.exe --test_set_mglib --test_set $i --test 3 --verbose 2 -# done - -estr='MG finished at -solution norm' - -dim=${dim:-2} -nb=${nb:-32} -pdxyz=${pdxyz:-128} -mxiter=${mxiter:-20} - -max_iter=100 -((a=1)) -while [[ $a -le $max_iter ]] ; do - echo "Test $a, bottom solver 1" - ./main.exe \ - --test_random_boxes \ - --dim $dim \ - --random_iseed $a \ - --pd_xyz $pdxyz \ - --random_num_boxes $nb \ - --bottom_solver 1 \ - --max_iter $mxiter \ - | egrep "$estr" - echo "Test $a, bottom solver 3" - ./main.exe \ - --test_random_boxes \ - --dim $dim \ - --random_iseed $a \ - --pd_xyz $pdxyz \ - --random_num_boxes $nb \ - --bottom_solver 3 \ - --max_iter $mxiter \ - | egrep "$estr" - ((a=a+1)) -done diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/t_smoother.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/t_smoother.f90 deleted file mode 100644 index ab82f5ebb..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/t_smoother.f90 +++ /dev/null @@ -1,66 +0,0 @@ - -subroutine t_smoother - use cc_smoothers_module - implicit none - integer n, nn - real(kind=dp_t),allocatable :: ss(:,:,:) - real(kind=dp_t),allocatable :: uu(:,:) - real(kind=dp_t),allocatable :: ff(:,:) - integer ,allocatable :: mm(:,:) - logical :: skwd - integer :: ng, j, i - integer :: lo(2), ll, hh - real(kind=dp_t) :: omega - - n = 8 - allocate(ss(2*n,2*n,0:4)) - allocate(uu(0:2*n+1,0:2*n+1)) - allocate(ff(2*n,2*n)) - allocate(mm(n,n)) - - ss(:,:,0) = -4 - ss(:,:,1) = 1 - ss(:,:,2) = 1 - ss(:,:,3) = 1 - ss(:,:,4) = 1 - - uu = 0 - ff = 0 - ll = n/2-1 - hh = n/2 - ff(ll:hh ,ll:hh ) = 1 - ff(ll+n:hh+n,ll:hh ) = 1 - ff(ll:hh ,ll+n:hh+n) = 1 - ff(ll+n:hh+n,ll+n:hh+n) = 1 - omega = 1 - lo = 1 - ng = 1 - skwd = .false. - - do nn = 0, 1 - call gs_rb_smoother_2d(omega, ss, uu(0:n+1 ,0:n+1 ), ff(1:n ,1:n ), mm, & - lo + (/0,0/), ng, nn, skwd) - call gs_rb_smoother_2d(omega, ss, uu(n:2*n+1,0:n-1 ), ff(n+1:2*n,1:n ), mm, & - lo + (/n,0/), ng, nn, skwd) - call gs_rb_smoother_2d(omega, ss, uu(0:n+1 ,n:2*n+1), ff(1:n ,n+1:2*n), mm, & - lo + (/0,n/), ng, nn, skwd) - call gs_rb_smoother_2d(omega, ss, uu(n:2*n+1,n:2*n+1), ff(n+1:2*n,n+1:2*n), mm, & - lo + (/n,n/), ng, nn, skwd) - end do - - do j = 1, n - do i = 1, n - write(1,fmt=*) i,j,uu(i,j) - end do - end do - - uu = 0 - do nn = 0, 1 - call gs_rb_smoother_2d(omega, ss, uu, ff, mm, lo, ng, nn, skwd) - end do - do j = 1, n - do i = 1, n - write(2,fmt=*) i,j,uu(i,j) - end do - end do -end subroutine t_smoother diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/t_stencil.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/t_stencil.f90 deleted file mode 100644 index c5aea5e8d..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/t_stencil.f90 +++ /dev/null @@ -1,366 +0,0 @@ -subroutine t_stencil - use cc_stencil_module - use multifab_module - use itsol_module - use bl_IO_module - use fabio_module - use bl_constants_module - use f2kcli - implicit none - type(box) :: pd - type(boxarray):: ba - type(layout) :: la - type(stencil) :: st_2, st_4 - type(multifab) :: uu - type(multifab) :: ff_2, ff_4 - type(multifab) :: tm, tms - type(multifab) :: exact_rhs, exact_uu - type(multifab) :: coeffs - - integer :: dm, ms, sz - integer :: type_2, type_4 - integer :: exo_2, exo_4 - real(dp_t), allocatable :: dh(:), xa(:), xb(:), hh(:) - logical, allocatable :: pmask(:) - real(dp_t) :: hhh - logical, allocatable :: nodal(:) - integer, allocatable :: bc_face(:,:) - real(dp_t) :: alpha - - integer :: verbose - integer :: max_iter - real(dp_t) :: eps - - character(len=128) :: fname - logical :: lexist, pd_pmask(MAX_SPACEDIM), tl - integer :: un - integer :: narg, farg - - namelist /psten/ eps - namelist /psten/ max_iter - namelist /psten/ verbose - namelist /psten/ dm - namelist /psten/ sz - namelist /psten/ ms - namelist /psten/ hhh - namelist /psten/ pd_pmask - - verbose = 1 - dm = 2 - sz = 128 - ms = -Huge(ms) - hhh = 1 - eps = 1.0e-6_dp_t - max_iter = -Huge(max_iter) - pd_pmask = .false. - - narg = command_argument_count() - farg = 1 - - if ( narg >= 1 ) then - call get_command_argument(1, value = fname) - inquire(file = fname, exist = lexist ) - if ( lexist ) then - un = unit_new() - farg = farg + 1 - open(unit=un, file = fname, status = 'old', action = 'read') - read(unit=un, nml = psten) - close(unit=un) - end if - end if - do while ( farg <= narg ) - - call get_command_argument(farg, value = fname) - select case (fname) - case ('--dim') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) dm - case ('--size') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) sz - case ('--maxsize') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) ms - case ('--eps') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) eps - case ('--pd_pmask_x') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_pmask(1) - case ('--pd_pmask_y') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_pmask(2) - case ('--pd_pmask_z') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_pmask(3) - case ('--pd_pmask') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) tl - pd_pmask = tl - case ('--max_iter') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) max_iter - case ('--') - farg = farg + 1 - exit - case default - if ( .not. parallel_q() ) then - write(*,*) 'UNKNOWN option = ', fname - call bl_error("MAIN") - end if - end select - farg = farg + 1 - end do - - ms = max(ms, sz) - if ( max_iter < 0 ) max_iter = sz**dm - - allocate(dh(dm), nodal(dm), xa(dm), xb(dm), hh(dm), pmask(dm)) - allocate(bc_face(dm,2)) - pmask = pd_pmask(1:dm) - bc_face = BC_DIR - hh = hhh - alpha = hhh/20 - dh = hh/sz - nodal = .false. - xb = HALF*dh - xa = HALF*dh - - pd = refine(unit_box(dim=dm),sz) - call build(ba, pd) - call boxarray_maxsize(ba, ms) - if ( verbose > 2 ) then - call boxarray_print(ba) - end if - call build(la, ba, pd = pd, pmask = pmask) - - call build(uu, la, 1, 1) - call build(ff_2, la, 1, 0) - call build(ff_4, la, 1, 0) - call build(tm, la, 1, 1) - call build(tms, la, 1, 0) - call build(exact_rhs, la, 1, 0) - call build(exact_uu, la, 1, 1) - call build(coeffs, la, 1+dm, 1) - call setval(coeffs, ZERO, 1, all=.true.) - call setval(coeffs, ONE, 2, dm, all=.true.) - - - !! -LAPLACIAN - exo_2 = 2 - type_2 = ST_CROSS - call stencil_build(st_2, la, dh, type_2) - st_2%xa = xa - st_2%xb = xb - call stencil_set_bc_st(st_2, bc_face) - call stencil_set_extrap_bc(st_2, exo_2) - call stencil_fill(st_2, ba, bc_face, coeffs = coeffs, fill = ST_FILL_LAPLACE_2) - - !! -MEHERSTALLEN - exo_4 = 5 - type_4 = ST_DENSE - call stencil_build(st_4, la, dh, type_4) - st_4%xa = xa - st_4%xb = xb - call stencil_set_bc_st(st_4, bc_face) - call stencil_set_extrap_bc(st_4, exo_4) - call stencil_fill(st_4, ba, bc_face, coeffs = coeffs, fill = ST_FILL_LAPLACE_4) - - if ( verbose > 2 ) then - call stencil_print(st_2, str = "ST_2") - call stencil_print(st_4, str = "ST_4") - end if - - call fabio_write(st_2%ss, "tdir", "ss_2") - call fabio_write(st_4%ss, "tdir", "ss_4") - - !! Stencil check .... - call mf_init(exact_rhs, pd, .true.) - call fabio_write(exact_rhs, "tdir", "exact_rhs") - call mf_init(exact_uu, pd, .false.) - call fabio_write(exact_uu, "tdir", "exact_uu") - - call stencil_defect_st(st_2, tms, exact_rhs, exact_uu) - print *, sz, 'norm_l2(res_2) = ', norm_l2(tms)*sqrt(product(dh)) - print *, sz, 'norm_inf(res_2) = ', norm_inf(tms) - call fabio_write(tms, "tdir", "res_2") - - call mehr_rhs(st_2, exact_rhs) - call fabio_write(exact_rhs, "tdir", "mehr_exact_rhs") - call stencil_defect_st(st_4, tms, exact_rhs, exact_uu) - print *, sz, 'norm_l2(res_4) = ', norm_l2(tms)*sqrt(product(dh)) - print *, sz, 'norm_inf(res_4) = ', norm_inf(tms) - call fabio_write(tms, "tdir", "res_4") - - !! CG solver tests - if ( .false. ) then - call mf_init(ff_2, pd, .true.) - call fabio_write(ff_2, "tdir", "ff_2") - call setval(uu, ZERO, all = .true. ) - verbose = 1 - call CG_Solve_st(st_2, uu, ff_2, eps, max_iter, verbose) - call fabio_write(uu, "tdir", "uu_2") - print *, sz, 'norm_inf(uu_2) = ', norm_inf(uu) - print *, sz, 'norm_l2(uu_2) = ', norm_l2(uu) - - call mf_init(ff_4, pd, .true.) - call mehr_rhs(st_2, ff_4) - call fabio_write(ff_4, "tdir", "ff_4") - call setval(uu, ZERO, all = .true. ) - verbose = 1 - call CG_Solve_st(st_4, uu, ff_4, eps, max_iter, verbose) - call fabio_write(uu, "tdir", "uu_4") - print *, sz, 'norm_inf(uu_4) = ', norm_inf(uu) - print *, sz, 'norm_l2(uu_4) = ', norm_l2(uu) - end if - - call stencil_destroy(st_2) - call stencil_destroy(st_4) - - call destroy(uu) - call destroy(ff_2) - call destroy(ff_4) - call destroy(tm) - call destroy(exact_rhs) - call destroy(exact_uu) - call destroy(coeffs) - call destroy(la) - call destroy(ba) - -contains - - subroutine finish - call print(multifab_mem_stats(), " multifab at end") - call print(imultifab_mem_stats(), "imultifab at end") - call print(lmultifab_mem_stats(), "lmultifab at end") - call print(fab_mem_stats(), " fab at end") - call print(ifab_mem_stats(), " ifab at end") - call print(lfab_mem_stats(), " lfab at end") - call print(boxarray_mem_stats(), " boxarray at end") - call print(boxassoc_mem_stats(), " boxassoc at end") - call print(layout_mem_stats(), " layout at end") - stop - end subroutine finish - - subroutine mf_init(mf, pd, deriv) - type(multifab), intent(inout) :: mf - integer i, ng - type(box) bx - type(box), intent(in) :: pd - real(kind=dp_t), pointer :: mp(:,:,:,:) - logical :: deriv - - ng = mf%ng - call setval(mf, 0.0_dp_t, all = .true.) - do i = 1, mf%nboxes; if ( remote(mf,i) ) cycle - mp => dataptr(mf, i, get_ibox(mf, i)) - bx = get_ibox(mf, i) - select case ( mf%dim ) - case (2) - call init_2d(mp(:,:,1,1), bx, pd, deriv) - case (3) - call init_3d(mp(:,:,:,1), bx, pd, deriv) - end select - end do - end subroutine mf_init - - subroutine init_2d(po, bx, pd, deriv) - type(box), intent(in) :: bx, pd - real(dp_t), intent(inout) :: po(bx%lo(1):,bx%lo(2):) - integer :: i, j - logical :: deriv - real(dp_t) :: xcen(2) - xcen = (upb(pd) + 1)*dh/2 - do j = bx%lo(2), bx%hi(2) - do i = bx%lo(1), bx%hi(1) - po(i,j) = gau_2d(i,j, xcen, alpha, deriv) - end do - end do - end subroutine init_2d - subroutine init_3d(po, bx, pd, deriv) - type(box), intent(in) :: bx, pd - real(dp_t), intent(inout) :: po(bx%lo(1):,bx%lo(2):,bx%lo(3):) - integer i, j, k - logical :: deriv - real(dp_t) :: xcen(3) - xcen = (upb(pd) + 1)*dh/2 - do k = bx%lo(3), bx%hi(3) - do j = bx%lo(2), bx%hi(2) - do i = bx%lo(1), bx%hi(1) - po(i,j,k) = gau_3d(i,j,k,xcen,alpha, deriv) - end do - end do - end do - end subroutine init_3d - function gau_2d(i, j, xcen, alpha,deriv) result(r) - real(dp_t) :: r, x - integer, intent(in) :: i, j - logical :: deriv - real(dp_t) :: xcen(2) - real(dp_t) :: alpha - x = ( & - +(((i+HALF)*dh(1) - xcen(1))**2) & - +(((j+HALF)*dh(2) - xcen(2))**2) & - )/(alpha**2) - if ( deriv ) then - r = exp(-x*HALF)*(x - ( 1 + dm - 1)) - else - r = alpha**2*exp(-x*HALF) - endif - end function gau_2d - function gau_3d(i, j, k, xcen, alpha,deriv) result(r) - real(dp_t) :: r, x - integer, intent(in) :: i, j, k - logical :: deriv - real(dp_t) :: xcen(3) - real(dp_t) :: alpha - x = ( & - +(((i+HALF)*dh(1) - xcen(1))**2) & - +(((j+HALF)*dh(2) - xcen(2))**2) & - +(((k+HALF)*dh(3) - xcen(3))**2) & - )/(alpha**2) - if ( deriv) then - r = exp(-x*HALF)*(x - ( 1 + dm - 1)) - else - r = alpha**2 * exp(-x*HALF) - end if - end function gau_3d - - - subroutine mehr_rhs(st_2, aa) - type(stencil), intent(in) :: st_2 - type(multifab), intent(inout) :: aa - call copy(tm, aa) - call stencil_apply_st(st_2, aa, tm) - call saxpy(tm, -st_2%dh(1)**2/12.0_dp_t, aa) - call copy(aa, tm) - end subroutine mehr_rhs - -end subroutine t_stencil - -subroutine t_stencil_map - use cc_stencil_module - implicit none - integer i, j, k - print *, 'DENSE_MAP_3D' - do k = -1, 1; do j = -1, 1; do i = -1, 1 - print *, i,j,k, ST_DENSE_MAP_3D(i,j,k) - end do; end do; end do - print *, 'DENSE_MAP_2D' - do j = -1, 1; do i = -1, 1 - print *, i,j, ST_DENSE_MAP_2D(i,j) - end do; end do - print *, 'DENSE_MAP_1D' - do i = -1, 1 - print *, i, ST_DENSE_MAP_1D(i) - end do -end subroutine t_stencil_map diff --git a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/wrapper.f90 b/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/wrapper.f90 deleted file mode 100644 index 0a6e5e7d8..000000000 --- a/Tests/LinearSolvers/F_MG_Old_Nodal_Stencil/wrapper.f90 +++ /dev/null @@ -1,762 +0,0 @@ -subroutine wrapper() - - use BoxLib - use f2kcli - use bl_IO_module - use ml_layout_module - use mg_module - use box_util_module - use mt19937_module - use bl_timer_module - - use cc_rhs_module - use nodal_rhs_module - - implicit none - - interface - subroutine t_cc_ml_multigrid(mla, mgt, rh, coeffs_type, domain_bc, & - do_diagnostics, eps, stencil_order, fabio) - use mg_module - use ml_boxarray_module - use ml_layout_module - type(ml_layout ), intent(inout) :: mla - type(mg_tower) , intent(inout) :: mgt(:) - type(multifab) , intent(inout) :: rh(:) - integer , intent(in ) :: coeffs_type - integer , intent(in ) :: domain_bc(:,:) - integer , intent(in ) :: do_diagnostics - real(dp_t) , intent(in ) :: eps - integer , intent(in ) :: stencil_order - logical , intent(in ) :: fabio - end subroutine t_cc_ml_multigrid - - subroutine t_nodal_ml_multigrid(mla, mgt, rh, coeffs_type, domain_bc, & - do_diagnostics, eps, fabio, stencil_type) - use mg_module - use ml_boxarray_module - use ml_layout_module - type(ml_layout ), intent(inout) :: mla - type(mg_tower) , intent(inout) :: mgt(:) - type(multifab) , intent(inout) :: rh(:) - integer , intent(in ) :: coeffs_type - integer , intent(in ) :: domain_bc(:,:) - integer , intent(in ) :: do_diagnostics - real(dp_t) , intent(in ) :: eps - logical , intent(in ) :: fabio - integer , intent(in ) :: stencil_type - end subroutine t_nodal_ml_multigrid - end interface - - logical :: need_inputs - logical :: tl - integer :: narg, farg - real(dp_t) :: h_finest, wce, wcb - - type(mg_tower ) :: mgt_default - type(ml_boxarray) :: mba - type(ml_layout ) :: mla - - type(mg_tower), allocatable :: mgt(:) - type(boxarray) :: ba - integer, allocatable :: ref_ratio(:) - integer, allocatable :: domain_bc(:,:) - real(dp_t), allocatable :: dh(:,:) - - character(len=128) :: fname - character(len=128) :: probin_env - - integer :: stencil_order - integer :: do_diagnostics - integer :: un, ierr - logical :: lexist - - logical, allocatable :: nodal(:) - logical, allocatable :: pmask(:) - logical :: nodal_in, dense_in, lininterp - - integer :: i,n,nlevs,ns,dm - - type(box) :: pd - - ! MG solver defaults - integer :: bottom_solver, bottom_max_iter - integer :: bottom_solver_in, bottom_max_iter_in - real(dp_t) :: bottom_solver_eps - real(dp_t) :: eps - integer :: max_iter - integer :: min_width - integer :: max_nlevel, max_nlevel_in - integer :: max_lev_of_mba - integer :: verbose, cg_verbose, ptype - integer :: nu1, nu2, nub, nuf, solver, smoother - integer :: ng, nc - character(len=128) :: test_set - integer :: test, test_lev, cycle_type, rhs_type, coeffs_type - logical :: test_set_mglib - logical :: test_set_hgproj - logical :: test_random_boxes - - integer :: random_min_size, random_max_size - integer :: random_blocking_factor, random_num_boxes, random_iseed - integer :: random_rr - - integer :: pd_xyz(MAX_SPACEDIM) - logical :: pd_pmask(MAX_SPACEDIM) - integer :: ba_maxsize - - integer :: bcx_lo,bcx_hi,bcy_lo,bcy_hi,bcz_lo,bcz_hi - - integer :: stencil_type - - integer :: bc_all - - logical :: fabio - - type(multifab), allocatable :: rh(:) - - namelist /probin/ cycle_type - namelist /probin/ rhs_type - namelist /probin/ coeffs_type - namelist /probin/ test - namelist /probin/ nodal_in - namelist /probin/ dense_in - namelist /probin/ ba_maxsize - namelist /probin/ pd_xyz - namelist /probin/ pd_pmask - namelist /probin/ h_finest - namelist /probin/ bcx_lo, bcx_hi - namelist /probin/ bcy_lo, bcy_hi - namelist /probin/ bcz_lo, bcz_hi - namelist /probin/ bc_all - namelist /probin/ dm - namelist /probin/ test_set - namelist /probin/ test_set_mglib - namelist /probin/ test_set_hgproj - namelist /probin/ test_lev - namelist /probin/ fabio - - namelist /probin/ test_random_boxes - namelist /probin/ random_blocking_factor, random_min_size - namelist /probin/ random_max_size, random_num_boxes, random_iseed - namelist /probin/ random_rr - - namelist /probin/ eps, max_iter - namelist /probin/ nu1, nu2, nub, nuf - namelist /probin/ bottom_solver, bottom_solver_eps, bottom_max_iter - namelist /probin/ solver, smoother - namelist /probin/ min_width, max_nlevel - namelist /probin/ stencil_order - namelist /probin/ max_lev_of_mba - - namelist /probin/ verbose, cg_verbose, ptype - namelist /probin/ do_diagnostics - - !! Defaults: - - need_inputs = .TRUE. - fabio = .FALSE. - - max_lev_of_mba = Huge(max_lev_of_mba) - - test = 0 - cycle_type = 3 ! Default to V-cycle - rhs_type = 4 ! Default to sum of sin's - coeffs_type = 0 ! Default to constant coefficients = 1 - nodal_in = .false. - dense_in = .false. - lininterp = .true. - - ba_maxsize = 32 - pd_xyz = 32 - pd_pmask = .FALSE. - h_finest = 1.0_dp_t - - bc_all = BC_UNDEF -! bcx_lo = BC_NEU -! bcy_lo = BC_NEU -! bcz_lo = BC_NEU -! bcx_hi = BC_NEU -! bcy_hi = BC_NEU -! bcz_hi = BC_NEU - - bcx_lo = BC_DIR - bcy_lo = BC_DIR - bcz_lo = BC_DIR - bcx_hi = BC_DIR - bcy_hi = BC_DIR - bcz_hi = BC_DIR - -! bcx_lo = BC_NEU -! bcx_hi = BC_NEU -! bcy_lo = BC_DIR -! bcy_hi = BC_DIR - - dm = 2 - - test_set_mglib = .FALSE. - test_set_hgproj = .FALSE. - test_lev = 0 - test_set = '' - - ng = mgt_default%ng - nc = mgt_default%nc - smoother = mgt_default%smoother - nu1 = mgt_default%nu1 - nu2 = mgt_default%nu2 - nub = mgt_default%nub - nuf = mgt_default%nuf - bottom_solver = mgt_default%bottom_solver - bottom_max_iter = mgt_default%bottom_max_iter - bottom_solver_eps = mgt_default%bottom_solver_eps - max_iter = mgt_default%max_iter - max_nlevel = mgt_default%max_nlevel - min_width = mgt_default%min_width - eps = mgt_default%eps - verbose = mgt_default%verbose - ptype = mgt_default%ptype - cg_verbose = mgt_default%cg_verbose - - do_diagnostics = 0 - - stencil_order = 3 - - test_random_boxes = .False. - random_blocking_factor = 8 - random_min_size = 8 - random_max_size = 32 - random_num_boxes = 1 - random_iseed = 1 - random_rr = 2 - - narg = command_argument_count() - - call get_environment_variable('PROBIN', probin_env, status = ierr) - if ( need_inputs .AND. ierr == 0 ) then - un = unit_new() - open(unit=un, file = probin_env, status = 'old', action = 'read') - read(unit=un, nml = probin) - close(unit=un) - need_inputs = .FALSE. - end if - - farg = 1 - if ( need_inputs .AND. narg >= 1 ) then - call get_command_argument(farg, value = fname) - inquire(file = fname, exist = lexist ) - if ( lexist ) then - farg = farg + 1 - un = unit_new() - open(unit=un, file = fname, status = 'old', action = 'read') - read(unit=un, nml = probin) - close(unit=un) - need_inputs = .FALSE. - end if - end if - - inquire(file = 'inputs', exist = lexist) - if ( need_inputs .AND. lexist ) then - un = unit_new() - open(unit=un, file = 'inputs', status = 'old', action = 'read') - read(unit=un, nml = probin) - close(unit=un) - need_inputs = .FALSE. - end if - - if ( .true. ) then - do while ( farg <= narg ) - call get_command_argument(farg, value = fname) - - select case (fname) - - case ('--test') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) test - - case ('--cycle_type') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) cycle_type - - case ('--rhs_type') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) rhs_type - - case ('--coeffs_type') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) coeffs_type - - case ('--ptype') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) ptype - - case ('--verbose') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) verbose - - case ('--cg_verbose') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) cg_verbose - - case ('--dim') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) dm - - case ('--solver') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) solver - case ('--smoother') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) smoother - case ('--nu1') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) nu1 - case ('--nu2') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) nu2 - case ('--nub') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) nub - case ('--nuf') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) nuf - - case ('--min_width') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) min_width - case ('--max_nlevel') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) max_nlevel - case ('--max_iter') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) max_iter - case ('--eps') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) eps - - case ('--bottom_solver') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bottom_solver - case ('--bottom_solver_eps') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bottom_solver_eps - case ('--bottom_max_iter') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bottom_max_iter - - case ('--maxsize') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) ba_maxsize - case ('--pd_x') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_xyz(1) - case ('--pd_y') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_xyz(2) - case ('--pd_z') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_xyz(3) - case ('--pd_xyz') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) i - pd_xyz = i - - case ('--pd_pmask_x') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_pmask(1) - case ('--pd_pmask_y') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_pmask(2) - case ('--pd_pmask_z') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) pd_pmask(3) - case ('--pd_pmask') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) tl - pd_pmask = tl - - case ('--nodal') - nodal_in = .true. - case ('--cc') - nodal_in = .false. - case ('--lininterp') - lininterp = .true. - - case ('--pc') - ! - ! An easy way to turn off lininterp. - ! - lininterp = .false. - - case ('--h_finest') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) h_finest - - case ('--dense') - dense_in = .true. - - case ('--bcx_lo') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bcx_lo - case ('--bcy_lo') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bcy_lo - case ('--bcz_lo') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bcz_lo - case ('--bcx_hi') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bcx_hi - case ('--bcy_hi') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bcy_hi - case ('--bcz_hi') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) bcz_hi - - case ('--dirichlet') - bc_all = BC_DIR - case ('--neumann') - bc_all = BC_NEU - case ('--periodic') - bc_all = BC_PER - pd_pmask = .TRUE. - - case ('--fabio') - fabio = .true. - - case ('--test_set') - farg = farg + 1 - call get_command_argument(farg, value = test_set) - case ('--test_lev') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) test_lev - case ('--test_set_mglib') - test_set_mglib = .True. - case ('--test_set_hgproj') - test_set_hgproj = .True. - - case ('--stencil_order') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) stencil_order - - case ('--do_diagnostics') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) do_diagnostics - - case ('--max_lev_of_mba') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname, *) max_lev_of_mba - - case ('--test_random_boxes') - test_random_boxes = .True. - case ('--random_blocking_factor') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_blocking_factor - case ('--random_min_size') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_min_size - case ('--random_max_size') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_max_size - case ('--random_num_boxes') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_num_boxes - case ('--random_iseed') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_iseed - case ('--random_rr') - farg = farg + 1 - call get_command_argument(farg, value = fname) - read(fname,*) random_rr - - case ('--') - farg = farg + 1 - exit - - case default - if ( .not. parallel_q() ) then - write(*,*) 'UNKNOWN option = ', fname - call bl_error("MAIN") - end if - end select - - farg = farg + 1 - end do - end if - - if ( test_set /= '' ) then - - if ( test_set_hgproj ) then - call read_a_hgproj_grid(mba, test_set, max_lev_of_mba) - else if ( test_set_mglib ) then - call read_a_mglib_grid(mba, test_set) - else - if ( parallel_ioprocessor() ) & - print *,'READING ',test_set - call ml_boxarray_read_boxes(mba, test_set) - end if - - else - - pd = make_box((/(0,i=1,dm)/), pd_xyz(1:dm)-1) - if ( test_random_boxes ) then - call init_genrand(random_iseed) - if ( max_lev_of_mba == 2 ) then - call build(mba, 2, dm) - mba%rr(1,:) = random_rr - mba%pd(1) = pd - call boxarray_build_bx(mba%bas(1), pd) - call boxarray_maxsize(mba%bas(1), ba_maxsize) - pd = refine(pd, random_rr) - mba%pd(2) = pd - call build_random_boxarray(mba%bas(2), pd, & - random_num_boxes, random_min_size, & - random_max_size, random_blocking_factor) - else - call build_random_boxarray(ba, pd, & - random_num_boxes, random_min_size, & - random_max_size, random_blocking_factor) - call ml_boxarray_build_ba(mba, ba, pd) - call destroy(ba) - end if - else - call build(ba, pd) - call boxarray_maxsize(ba, ba_maxsize) - call build(mba, ba, pd) - call destroy(ba) - end if - - do i = 1, mba%nlevel - call boxarray_simplify(mba%bas(i)) - call boxarray_maxsize(mba%bas(i), ba_maxsize) - end do - end if - - ! For sanity make sure the mba is clean' - if ( .not. ml_boxarray_clean(mba) ) call bl_error("MBOXARRAY is not 'clean'") - - if ( .not. ml_boxarray_properly_nested(mba) ) call bl_error("MBOXARRAY is not 'properly nested'") - - dm = mba%dim - - if ( dm <= 0 ) then - call bl_error("DM <= 0", dm) - end if - - allocate(nodal(dm)) - allocate(pmask(dm)) - - nlevs = min(max_lev_of_mba, mba%nlevel) - - if ( nodal_in ) then - nodal = .true. - else - nodal = .false. - end if - - if ( nodal_in ) then - if ( dense_in ) then - stencil_type = ND_DENSE_STENCIL - else - stencil_type = ND_CROSS_STENCIL - end if - else - stencil_type = CC_CROSS_STENCIL - end if - - pmask = pd_pmask(1:dm) - - ! Put the bc values from the inputs file into domain_bc - allocate(domain_bc(dm,2)) - - if ( bc_all /= BC_UNDEF ) then - domain_bc = bc_all - else - domain_bc(1,1) = bcx_lo - domain_bc(1,2) = bcx_hi - if (dm > 1) then - domain_bc(2,1) = bcy_lo - domain_bc(2,2) = bcy_hi - end if - if (dm > 2) then - domain_bc(3,1) = bcz_lo - domain_bc(3,2) = bcz_hi - end if - end if - where(pmask) - domain_bc(:,1) = BC_PER - domain_bc(:,2) = BC_PER - end where - - allocate(mgt(nlevs)) - allocate(ref_ratio(dm)) - - allocate(dh(nlevs,dm)) - - ! Define the grid spacing on the finest level to be 1 - dh(nlevs,:) = h_finest - - if ( nodal_in ) then - if (dense_in) then - if (dm .eq. 3) then - if ( (dh(nlevs,1).eq.dh(nlevs,2)) .and. (dh(nlevs,1) .eq. dh(nlevs,3)) ) then - ns = 21 - else - ns = 27 - end if - else - ns = 9 - end if - else - ns = 1 + 2*dm - end if - else - ns = 1 + dm*3 - end if - - call ml_layout_build(mla, mba, pmask = pmask) - - do n = nlevs, 1, -1 - - if (n == 1) then - - max_nlevel_in = max_nlevel - bottom_solver_in = bottom_solver - bottom_max_iter_in = bottom_max_iter - - else - - ref_ratio = mba%rr(n-1,:) - if ( parallel_IOProcessor() ) then - print *, "REF_RATIO = ", ref_ratio - end if - - if ( all(ref_ratio == 2) ) then - max_nlevel_in = 1 - else if ( all(ref_ratio == 4) ) then - max_nlevel_in = 2 - else - call bl_error("WRAPPER: confused about ref_ratio") - end if - bottom_solver_in = 0 - bottom_max_iter_in = nu1 - - end if - - if ( nodal_in ) min_width = 2 - - ! Define the grid spacing on all lower levels in terms of the finest level. - if (n < nlevs) then - dh(n,:) = dh(n+1,:) * mba%rr(n,:) - end if - - call mg_tower_build(mgt(n), mla%la(n), mba%pd(n), domain_bc, stencil_type,& - dh = dh(n,:), & - ns = ns, & - smoother = smoother, & - nu1 = nu1, & - nu2 = nu2, & - nub = nub, & - nuf = nuf, & - cycle_type = cycle_type, & - bottom_solver = bottom_solver_in, & - bottom_max_iter = bottom_max_iter_in, & - bottom_solver_eps = bottom_solver_eps, & - max_iter = max_iter, & - max_nlevel = max_nlevel_in, & - min_width = min_width, & - eps = eps, & - verbose = verbose, & - cg_verbose = cg_verbose, & - ptype = ptype, & - use_lininterp = lininterp, & - nodal = nodal) - - end do - - ! Allocate space for the RHS for the solve. - allocate(rh(nlevs)) - - call wall_second(wcb) - if ( nodal_in ) then - do n = nlevs, 1, -1 - call multifab_build( rh(n), mla%la(n), 1, 1, nodal) - end do - call nodal_rhs(mla, rh) - call t_nodal_ml_multigrid(mla, mgt, rh, coeffs_type, domain_bc, do_diagnostics, eps, & - fabio, stencil_type) - else - do n = nlevs, 1, -1 - call multifab_build( rh(n), mla%la(n), 1, 0, nodal) - end do - call cc_rhs(mla, pd, rh, rhs_type) - call t_cc_ml_multigrid(mla, mgt, rh, coeffs_type, domain_bc, do_diagnostics, eps, stencil_order, fabio) - end if - - call wall_second(wce) - - wce = wce - wcb - - if ( parallel_ioprocessor() ) then - print*, 'Wall clock for solve: ', wce - end if - - do n = nlevs, 1, -1 - call multifab_destroy(rh(n)) - end do - deallocate(rh) - - do n = 1, nlevs - call mg_tower_destroy(mgt(n)) - end do - - call destroy(mba) - call destroy(mla) - -end subroutine wrapper diff --git a/Tests/MKDir/GNUmakefile b/Tests/MKDir/GNUmakefile index 259b0ae45..a93670ca8 100644 --- a/Tests/MKDir/GNUmakefile +++ b/Tests/MKDir/GNUmakefile @@ -15,7 +15,7 @@ EBASE = mkdirtest CEXE_sources += MKDir.cpp -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tests/MKDir/MKDir.cpp b/Tests/MKDir/MKDir.cpp index a4f631e07..0a0c1f8f7 100644 --- a/Tests/MKDir/MKDir.cpp +++ b/Tests/MKDir/MKDir.cpp @@ -3,7 +3,7 @@ // -------------------------------------------------------------------------- // this file tests making directories. // -------------------------------------------------------------------------- -#include +#include #include #include @@ -13,8 +13,8 @@ #include #include -#include -#include +#include +#include // -------------------------------------------------------------------------- int main(int argc, char *argv[]) { diff --git a/Tests/StencilOrder/README b/Tests/StencilOrder/README deleted file mode 100644 index 153c08a2a..000000000 --- a/Tests/StencilOrder/README +++ /dev/null @@ -1,26 +0,0 @@ -This short program demonstrates the difference that ordering of indices can make in a stencil -computation. - -If you set "oldway" = true then this uses the traditional stencil ordering, with the stencil index last. - -If you set "oldway" = false then this uses the new stencil ordering, with the stencil index first. - -Build the code, for example, by typing - -fort -O3 -ip program.f90 -o nway (when oldway = .false.) - -and - -fort -O3 -ip program.f90 -o nway (when oldway = .true.) - - -Then run the code with timings by typing - -time ./nway - -and - -time ./oway - - -This simple test demonstrates roughly a factor of 5 speedup with the new stencil ordering. diff --git a/Tests/StencilOrder/program.f90 b/Tests/StencilOrder/program.f90 deleted file mode 100644 index 8a3875087..000000000 --- a/Tests/StencilOrder/program.f90 +++ /dev/null @@ -1,150 +0,0 @@ - module X - - implicit none - - contains - - subroutine nsold(omega, ss, uu, ff, lo, ng) - - integer, intent(in) :: ng, lo(:) - double precision, intent(in) :: omega - double precision, intent(in ) :: ff(lo(1)-ng:,lo(2)-ng:,lo(3)-ng:) - double precision, intent(inout) :: uu(lo(1)-ng:,lo(2)-ng:,lo(3)-ng:) - double precision, intent(in) :: ss(lo(1):, lo(2):, lo(3):, 0:) - integer :: i, j, k, ioff, hi(size(lo)) - double precision :: dd - logical :: jface, kface, doit - - hi = ubound(ff) - - if ((size(ss,dim=4) .eq. 21) .or. (size(ss,dim=4) .eq. 27)) then - - do k = lo(3),hi(3) - kface = .false. ; if ( (k.eq.lo(3)) .or. (k.eq.hi(3)) ) kface = .true. - - do j = lo(2),hi(2) - jface = .false. ; if ( (j.eq.lo(2)) .or. (j.eq.hi(2)) ) jface = .true. - - do i = lo(1),hi(1) - - doit = .true. - - if ( jface .or. kface .or. (i.eq.lo(1)) .or. (i.eq.hi(1)) ) then - doit = .false. - end if - - if (doit) then - dd = ss(i,j,k,0)*uu(i,j,k) & - + ss(i,j,k, 1) * uu(i-1,j-1,k-1) + ss(i,j,k, 2) * uu(i ,j-1,k-1) & - + ss(i,j,k, 3) * uu(i+1,j-1,k-1) + ss(i,j,k, 4) * uu(i-1,j ,k-1) & - + ss(i,j,k, 5) * uu(i+1,j ,k-1) + ss(i,j,k, 6) * uu(i-1,j+1,k-1) & - + ss(i,j,k, 7) * uu(i ,j+1,k-1) + ss(i,j,k, 8) * uu(i+1,j+1,k-1) & - + ss(i,j,k, 9) * uu(i-1,j-1,k ) + ss(i,j,k,10) * uu(i+1,j-1,k ) & - + ss(i,j,k,11) * uu(i-1,j+1,k ) + ss(i,j,k,12) * uu(i+1,j+1,k ) & - + ss(i,j,k,13) * uu(i-1,j-1,k+1) + ss(i,j,k,14) * uu(i ,j-1,k+1) & - + ss(i,j,k,15) * uu(i+1,j-1,k+1) + ss(i,j,k,16) * uu(i-1,j ,k+1) & - + ss(i,j,k,17) * uu(i+1,j ,k+1) + ss(i,j,k,18) * uu(i-1,j+1,k+1) & - + ss(i,j,k,19) * uu(i ,j+1,k+1) + ss(i,j,k,20) * uu(i+1,j+1,k+1) - - uu(i,j,k) = uu(i,j,k) + omega/ss(i,j,k,0)*(ff(i,j,k) - dd) - end if - end do - end do - end do - end if - - end subroutine nsold - - subroutine nsnew(omega, ss, uu, ff, lo, ng) - - integer, intent(in) :: ng, lo(:) - double precision, intent(in) :: omega - double precision, intent(in ) :: ff(lo(1)-ng:,lo(2)-ng:,lo(3)-ng:) - double precision, intent(inout) :: uu(lo(1)-ng:,lo(2)-ng:,lo(3)-ng:) - double precision, intent(in) :: ss(0:, lo(1):, lo(2):, lo(3):) - integer :: i, j, k, ioff, hi(size(lo)) - double precision :: dd - logical :: jface, kface, doit - - hi = ubound(ff) - - if ((size(ss,dim=1) .eq. 21) .or. (size(ss,dim=1) .eq. 27)) then - - do k = lo(3),hi(3) - kface = .false. ; if ( (k.eq.lo(3)) .or. (k.eq.hi(3)) ) kface = .true. - - do j = lo(2),hi(2) - jface = .false. ; if ( (j.eq.lo(2)) .or. (j.eq.hi(2)) ) jface = .true. - - do i = lo(1),hi(1) - - doit = .true. - - if ( jface .or. kface .or. (i.eq.lo(1)) .or. (i.eq.hi(1)) ) then - doit = .false. - end if - - if (doit) then - dd = ss(0,i,j,k)*uu(i,j,k) & - + ss(1,i,j,k ) * uu(i-1,j-1,k-1) + ss(2,i,j,k ) * uu(i ,j-1,k-1) & - + ss(3,i,j,k ) * uu(i+1,j-1,k-1) + ss(4,i,j,k ) * uu(i-1,j ,k-1) & - + ss(5,i,j,k ) * uu(i+1,j ,k-1) + ss(6,i,j,k ) * uu(i-1,j+1,k-1) & - + ss(7,i,j,k ) * uu(i ,j+1,k-1) + ss(8,i,j,k ) * uu(i+1,j+1,k-1) & - + ss(9,i,j,k ) * uu(i-1,j-1,k ) + ss(10,i,j,k) * uu(i+1,j-1,k ) & - + ss(11,i,j,k) * uu(i-1,j+1,k ) + ss(12,i,j,k) * uu(i+1,j+1,k ) & - + ss(13,i,j,k) * uu(i-1,j-1,k+1) + ss(14,i,j,k) * uu(i ,j-1,k+1) & - + ss(15,i,j,k) * uu(i+1,j-1,k+1) + ss(16,i,j,k) * uu(i-1,j ,k+1) & - + ss(17,i,j,k) * uu(i+1,j ,k+1) + ss(18,i,j,k) * uu(i-1,j+1,k+1) & - + ss(19,i,j,k) * uu(i ,j+1,k+1) + ss(20,i,j,k) * uu(i+1,j+1,k+1) - - uu(i,j,k) = uu(i,j,k) + omega/ss(0,i,j,k)*(ff(i,j,k) - dd) - end if - end do - end do - end do - end if - - end subroutine nsnew - - end module X - - program main - - use X - - implicit none - - integer, parameter :: N = 64, NG = 1, lo(3) = (/1,1,1/) - - double precision, parameter :: omega = 1.3d0 - - double precision :: ssold(N,N,N,0:20) - double precision :: ssnew(0:20,N,N,N) - double precision :: ff(1-NG:N+NG,1-NG:N,1-NG:N+NG) - double precision :: uu(1-NG:N+NG,1-NG:N+NG,1-NG:N+NG) - -! logical, parameter :: oldway = .false. - logical, parameter :: oldway = .true. - - integer i - - do i = 0,20 - ssold(:,:,:,i) = 1.0d0 + i - ssnew(i,:,:,:) = 1.0d0 + i - end do - - uu = 0.0d0 - - ff = 1.0d0 - - if ( oldway ) then - do i = 1,250 - call nsold(omega,ssold,uu,ff,lo,NG) - end do - else - do i = 1,250 - call nsnew(omega,ssnew,uu,ff,lo,NG) - end do - end if - - end program main diff --git a/Tools/CMake/FindCCSE.cmake b/Tools/CMake/FindCCSE.cmake index c90cdb066..c5f6ea363 100644 --- a/Tools/CMake/FindCCSE.cmake +++ b/Tools/CMake/FindCCSE.cmake @@ -168,7 +168,7 @@ else(CCSE_LIBRARIES AND CCSE_INCLUDE_DIRS AND CCSE_PERL_DIR) endif() # Now, make sure the rest are in the same place - set(CCSE_LIBRARIES cboxlib;fboxlib;cfboxlib;box_camrdata;gslib) + set(CCSE_LIBRARIES cboxlib;fboxlib;cfboxlib;box_camrdata) foreach (L ${CCSE_LIBRARIES}) diff --git a/Tools/C_util/AmrDeriveTecplot/AmrDeriveTecplot.cpp b/Tools/C_util/AmrDeriveTecplot/AmrDeriveTecplot.cpp index aaf1b5dd1..5da59a321 100644 --- a/Tools/C_util/AmrDeriveTecplot/AmrDeriveTecplot.cpp +++ b/Tools/C_util/AmrDeriveTecplot/AmrDeriveTecplot.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include @@ -21,12 +21,12 @@ using std::endl; #include "TECIO.h" #endif -#include "ParmParse.H" -#include "ParallelDescriptor.H" -#include "DataServices.H" -#include "Utility.H" -#include "FArrayBox.H" -#include "Geometry.H" +#include "AMReX_ParmParse.H" +#include "AMReX_ParallelDescriptor.H" +#include "AMReX_DataServices.H" +#include "AMReX_Utility.H" +#include "AMReX_FArrayBox.H" +#include "AMReX_Geometry.H" struct Node { diff --git a/Tools/C_util/AmrDeriveTecplot/GNUmakefile b/Tools/C_util/AmrDeriveTecplot/GNUmakefile index 37094f250..de17261ee 100644 --- a/Tools/C_util/AmrDeriveTecplot/GNUmakefile +++ b/Tools/C_util/AmrDeriveTecplot/GNUmakefile @@ -12,7 +12,7 @@ COMP = g++ FCOMP = gfortran BINARY_OUTPUT = FALSE -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs DEFINES += -DBL_NOLINEVALUES @@ -32,14 +32,14 @@ endif DEFINES += -DBL_PARALLEL_IO -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package INCLUDE_LOCATIONS += . -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata PATHDIRS = . -PATHDIRS += $(BOXLIB_HOME)/Src/C_BaseLib +PATHDIRS += $(BOXLIB_HOME)/Src/Base PATHDIRS += $(BOXLIB_HOME)/Src/Extern/amrdata @@ -60,7 +60,7 @@ vpath %.f90 $(PATHDIRS) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tools/C_util/Convergence/AVGDOWN_2D.F b/Tools/C_util/Convergence/AVGDOWN_2D.F index 27190efc4..094afb0a4 100644 --- a/Tools/C_util/Convergence/AVGDOWN_2D.F +++ b/Tools/C_util/Convergence/AVGDOWN_2D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" #include "AVGDOWN_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Tools/C_util/Convergence/AVGDOWN_3D.F b/Tools/C_util/Convergence/AVGDOWN_3D.F index 98bc41070..267249bae 100644 --- a/Tools/C_util/Convergence/AVGDOWN_3D.F +++ b/Tools/C_util/Convergence/AVGDOWN_3D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" #include "AVGDOWN_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 diff --git a/Tools/C_util/Convergence/AVGDOWN_F.H b/Tools/C_util/Convergence/AVGDOWN_F.H index 228607337..a09337b5a 100644 --- a/Tools/C_util/Convergence/AVGDOWN_F.H +++ b/Tools/C_util/Convergence/AVGDOWN_F.H @@ -16,7 +16,7 @@ # define FORT_CV_AVGDOWN_STAG cvavgdwnstag_ # endif -#include +#include extern "C" { diff --git a/Tools/C_util/Convergence/Add.cpp b/Tools/C_util/Convergence/Add.cpp index a1c2a643b..32b09a2bc 100644 --- a/Tools/C_util/Convergence/Add.cpp +++ b/Tools/C_util/Convergence/Add.cpp @@ -9,12 +9,12 @@ using std::ios; #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Convergence/ComputeAmrDataNorms.H b/Tools/C_util/Convergence/ComputeAmrDataNorms.H index d755a6a13..3a630ea56 100644 --- a/Tools/C_util/Convergence/ComputeAmrDataNorms.H +++ b/Tools/C_util/Convergence/ComputeAmrDataNorms.H @@ -1,4 +1,4 @@ -#include +#include void ComputeAmrDataNorms (AmrData& amrData, diff --git a/Tools/C_util/Convergence/ComputeAmrDataNorms.cpp b/Tools/C_util/Convergence/ComputeAmrDataNorms.cpp index 7de5e8ab0..3a45d676a 100644 --- a/Tools/C_util/Convergence/ComputeAmrDataNorms.cpp +++ b/Tools/C_util/Convergence/ComputeAmrDataNorms.cpp @@ -4,13 +4,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include void ComputeAmrDataNorms (AmrData& amrData, diff --git a/Tools/C_util/Convergence/DiffFab.cpp b/Tools/C_util/Convergence/DiffFab.cpp index 86dddee6a..e0fba0627 100644 --- a/Tools/C_util/Convergence/DiffFab.cpp +++ b/Tools/C_util/Convergence/DiffFab.cpp @@ -9,12 +9,12 @@ using std::ios; #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Convergence/DiffSameDomainRefined.cpp b/Tools/C_util/Convergence/DiffSameDomainRefined.cpp index 64a712afe..d23095157 100644 --- a/Tools/C_util/Convergence/DiffSameDomainRefined.cpp +++ b/Tools/C_util/Convergence/DiffSameDomainRefined.cpp @@ -9,14 +9,14 @@ using std::ios; #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifndef NDEBUG diff --git a/Tools/C_util/Convergence/DiffSameDomainRefinedFD.cpp b/Tools/C_util/Convergence/DiffSameDomainRefinedFD.cpp index f1c7ef760..3a4aa2237 100644 --- a/Tools/C_util/Convergence/DiffSameDomainRefinedFD.cpp +++ b/Tools/C_util/Convergence/DiffSameDomainRefinedFD.cpp @@ -9,14 +9,14 @@ using std::ios; #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifndef NDEBUG diff --git a/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp b/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp index f90c76d8d..f8be96482 100644 --- a/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp +++ b/Tools/C_util/Convergence/DiffSameDomainRefinedStag.cpp @@ -9,14 +9,14 @@ using std::ios; #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifndef NDEBUG diff --git a/Tools/C_util/Convergence/DiffSameGrid.cpp b/Tools/C_util/Convergence/DiffSameGrid.cpp index 4efb6c190..23a9e6425 100644 --- a/Tools/C_util/Convergence/DiffSameGrid.cpp +++ b/Tools/C_util/Convergence/DiffSameGrid.cpp @@ -5,14 +5,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Convergence/DiffSameGrid2.cpp b/Tools/C_util/Convergence/DiffSameGrid2.cpp index a9990b4b0..dba6a784b 100644 --- a/Tools/C_util/Convergence/DiffSameGrid2.cpp +++ b/Tools/C_util/Convergence/DiffSameGrid2.cpp @@ -6,14 +6,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Convergence/DiffSameGridRefined.cpp b/Tools/C_util/Convergence/DiffSameGridRefined.cpp index dad4728e7..766a82c18 100644 --- a/Tools/C_util/Convergence/DiffSameGridRefined.cpp +++ b/Tools/C_util/Convergence/DiffSameGridRefined.cpp @@ -9,14 +9,14 @@ using std::ios; #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifndef NDEBUG diff --git a/Tools/C_util/Convergence/DiffUniform.cpp b/Tools/C_util/Convergence/DiffUniform.cpp index bc91f1bc3..5ccc48ce6 100644 --- a/Tools/C_util/Convergence/DiffUniform.cpp +++ b/Tools/C_util/Convergence/DiffUniform.cpp @@ -9,14 +9,14 @@ using std::ios; #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Convergence/GNUmakefile b/Tools/C_util/Convergence/GNUmakefile index 6909e1e48..ca707619e 100644 --- a/Tools/C_util/Convergence/GNUmakefile +++ b/Tools/C_util/Convergence/GNUmakefile @@ -29,29 +29,29 @@ EBASE = DiffSameDomainRefinedStag CEXE_sources += $(EBASE).cpp -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs DEFINES += -DBL_NOLINEVALUES -DBL_PARALLEL_IO include Make.package include ../Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package -#include $(BOXLIB_HOME)/Src/C_AMRLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package +#include $(BOXLIB_HOME)/Src/Amr/Make.package include $(BOXLIB_HOME)/Src/Extern/amrdata/Make.package INCLUDE_LOCATIONS += . INCLUDE_LOCATIONS += .. vpathdir += .. -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +vpathdir += $(BOXLIB_HOME)/Src/Base -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -vpathdir += $(BOXLIB_HOME)/Src/C_BoundaryLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary +vpathdir += $(BOXLIB_HOME)/Src/Boundary -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib -vpathdir += $(BOXLIB_HOME)/Src/C_AMRLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr +vpathdir += $(BOXLIB_HOME)/Src/Amr INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata vpathdir += $(BOXLIB_HOME)/Src/Extern/amrdata @@ -69,9 +69,9 @@ vpath %.f90 : . $(vpathdir) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules -#include $(TOP)/Tools/C_mk/Make.defs ./Make.package +#include $(TOP)/Tools/GNUMake/Make.defs ./Make.package #ifeq ($(USE_ARRAYVIEW),TRUE) # DEFINES += -DBL_USE_ARRAYVIEW diff --git a/Tools/C_util/Convergence/PltFileNorm.cpp b/Tools/C_util/Convergence/PltFileNorm.cpp index 012270eaf..1d7db6ec9 100644 --- a/Tools/C_util/Convergence/PltFileNorm.cpp +++ b/Tools/C_util/Convergence/PltFileNorm.cpp @@ -6,10 +6,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Convergence/PltFileNormB.cpp b/Tools/C_util/Convergence/PltFileNormB.cpp index f94526321..761e6d799 100644 --- a/Tools/C_util/Convergence/PltFileNormB.cpp +++ b/Tools/C_util/Convergence/PltFileNormB.cpp @@ -9,14 +9,14 @@ using std::ios; #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Convergence/PltFileScalConvRate.cpp b/Tools/C_util/Convergence/PltFileScalConvRate.cpp index 3c141e887..be44b26dc 100644 --- a/Tools/C_util/Convergence/PltFileScalConvRate.cpp +++ b/Tools/C_util/Convergence/PltFileScalConvRate.cpp @@ -6,10 +6,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Statistics/AVGDOWN_2D.F b/Tools/C_util/Statistics/AVGDOWN_2D.F index 66608785e..08cdd1f35 100644 --- a/Tools/C_util/Statistics/AVGDOWN_2D.F +++ b/Tools/C_util/Statistics/AVGDOWN_2D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" #include "AVGDOWN_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Tools/C_util/Statistics/AVGDOWN_3D.F b/Tools/C_util/Statistics/AVGDOWN_3D.F index b7c79daae..00ba6f54a 100644 --- a/Tools/C_util/Statistics/AVGDOWN_3D.F +++ b/Tools/C_util/Statistics/AVGDOWN_3D.F @@ -3,10 +3,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" #include "AVGDOWN_F.H" -#include "ArrayLim.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 diff --git a/Tools/C_util/Statistics/AVGDOWN_F.H b/Tools/C_util/Statistics/AVGDOWN_F.H index 65f8bf1bd..86d0cb4aa 100644 --- a/Tools/C_util/Statistics/AVGDOWN_F.H +++ b/Tools/C_util/Statistics/AVGDOWN_F.H @@ -13,7 +13,7 @@ # define FORT_CV_AVGDOWN cvavgdwn_ # endif -#include +#include extern "C" { diff --git a/Tools/C_util/Statistics/ComputeAmrDataStat.H b/Tools/C_util/Statistics/ComputeAmrDataStat.H index f06857730..c98fd34c2 100644 --- a/Tools/C_util/Statistics/ComputeAmrDataStat.H +++ b/Tools/C_util/Statistics/ComputeAmrDataStat.H @@ -1,4 +1,4 @@ -#include +#include void ComputeAmrDataMeanVar (AmrData& amrData, diff --git a/Tools/C_util/Statistics/ComputeAmrDataStat.cpp b/Tools/C_util/Statistics/ComputeAmrDataStat.cpp index 754b30f6f..236f0093e 100644 --- a/Tools/C_util/Statistics/ComputeAmrDataStat.cpp +++ b/Tools/C_util/Statistics/ComputeAmrDataStat.cpp @@ -4,13 +4,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // Determine the volume-averaged mean for an AMR data. void diff --git a/Tools/C_util/Statistics/GNUmakefile b/Tools/C_util/Statistics/GNUmakefile index f6d396d55..cebe61887 100644 --- a/Tools/C_util/Statistics/GNUmakefile +++ b/Tools/C_util/Statistics/GNUmakefile @@ -22,28 +22,28 @@ EBASE = PltFileFluxAve #EBASE = PltFileList CEXE_sources += $(EBASE).cpp -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs DEFINES += -DBL_NOLINEVALUES -DBL_PARALLEL_IO include Make.package include ../Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/Extern/amrdata/Make.package INCLUDE_LOCATIONS += . INCLUDE_LOCATIONS += .. vpathdir += .. -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +vpathdir += $(BOXLIB_HOME)/Src/Base -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -vpathdir += $(BOXLIB_HOME)/Src/C_BoundaryLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary +vpathdir += $(BOXLIB_HOME)/Src/Boundary -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib -vpathdir += $(BOXLIB_HOME)/Src/C_AMRLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr +vpathdir += $(BOXLIB_HOME)/Src/Amr INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata vpathdir += $(BOXLIB_HOME)/Src/Extern/amrdata @@ -61,4 +61,4 @@ vpath %.f90 : . $(vpathdir) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tools/C_util/Statistics/PltFileFluxAve.H b/Tools/C_util/Statistics/PltFileFluxAve.H index b0007ac50..8e47d1f11 100644 --- a/Tools/C_util/Statistics/PltFileFluxAve.H +++ b/Tools/C_util/Statistics/PltFileFluxAve.H @@ -1,4 +1,4 @@ -#include +#include void compute_flux_all(int nstart, diff --git a/Tools/C_util/Statistics/PltFileFluxAve.cpp b/Tools/C_util/Statistics/PltFileFluxAve.cpp index 9728c9aa6..050413e28 100644 --- a/Tools/C_util/Statistics/PltFileFluxAve.cpp +++ b/Tools/C_util/Statistics/PltFileFluxAve.cpp @@ -7,9 +7,9 @@ #include #include -#include -#include -#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Statistics/PltFileList.cpp b/Tools/C_util/Statistics/PltFileList.cpp index b0d967631..e14b11c1e 100644 --- a/Tools/C_util/Statistics/PltFileList.cpp +++ b/Tools/C_util/Statistics/PltFileList.cpp @@ -7,10 +7,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Statistics/PltFileStat.cpp b/Tools/C_util/Statistics/PltFileStat.cpp index a3d1698eb..288d91df9 100644 --- a/Tools/C_util/Statistics/PltFileStat.cpp +++ b/Tools/C_util/Statistics/PltFileStat.cpp @@ -6,10 +6,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/Statistics/PltFileXAve.H b/Tools/C_util/Statistics/PltFileXAve.H index cb893b7ef..4eef2c6a9 100644 --- a/Tools/C_util/Statistics/PltFileXAve.H +++ b/Tools/C_util/Statistics/PltFileXAve.H @@ -1,4 +1,4 @@ -#include +#include void compute_flux_all(int nstart, diff --git a/Tools/C_util/Statistics/PltFileXAve.cpp b/Tools/C_util/Statistics/PltFileXAve.cpp index e58317087..61c00e781 100644 --- a/Tools/C_util/Statistics/PltFileXAve.cpp +++ b/Tools/C_util/Statistics/PltFileXAve.cpp @@ -8,9 +8,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #ifndef NDEBUG #include diff --git a/Tools/C_util/TV_TempWrite.H b/Tools/C_util/TV_TempWrite.H index 5383692ed..95ecd36e3 100644 --- a/Tools/C_util/TV_TempWrite.H +++ b/Tools/C_util/TV_TempWrite.H @@ -3,8 +3,8 @@ #include -#include -#include +#include +#include extern "C" { diff --git a/Tools/C_util/ViewMF/MFNorm.cpp b/Tools/C_util/ViewMF/MFNorm.cpp index 884d44e18..a12c33b3d 100644 --- a/Tools/C_util/ViewMF/MFNorm.cpp +++ b/Tools/C_util/ViewMF/MFNorm.cpp @@ -3,7 +3,7 @@ #include #endif -#include +#include #include #include diff --git a/Tools/C_util/ViewMF/checkMFghostcells.cpp b/Tools/C_util/ViewMF/checkMFghostcells.cpp index 391a60112..53dacc883 100644 --- a/Tools/C_util/ViewMF/checkMFghostcells.cpp +++ b/Tools/C_util/ViewMF/checkMFghostcells.cpp @@ -5,12 +5,12 @@ #include -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include diff --git a/Tools/C_util/ViewMF/main.cpp b/Tools/C_util/ViewMF/main.cpp index 0a9089d15..80b5c4fe7 100644 --- a/Tools/C_util/ViewMF/main.cpp +++ b/Tools/C_util/ViewMF/main.cpp @@ -3,11 +3,11 @@ #include #endif -#include +#include #include -#include -#include -#include +#include +#include +#include #include const int NPROCS = 1; diff --git a/Tools/C_util/ViewMF/mfMinMax.cpp b/Tools/C_util/ViewMF/mfMinMax.cpp index cd027a3df..da1af045e 100644 --- a/Tools/C_util/ViewMF/mfMinMax.cpp +++ b/Tools/C_util/ViewMF/mfMinMax.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/Tools/C_util/ViewMF/viewMF.cpp b/Tools/C_util/ViewMF/viewMF.cpp index ec67bfcbf..275ab490b 100644 --- a/Tools/C_util/ViewMF/viewMF.cpp +++ b/Tools/C_util/ViewMF/viewMF.cpp @@ -3,12 +3,12 @@ #include #endif -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/Tools/C_util/ViewMF/viewMFcol.cpp b/Tools/C_util/ViewMF/viewMFcol.cpp index 1485809ed..281106109 100644 --- a/Tools/C_util/ViewMF/viewMFcol.cpp +++ b/Tools/C_util/ViewMF/viewMFcol.cpp @@ -3,10 +3,10 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/Tools/C_util/ViewMF/viewMFdiff.cpp b/Tools/C_util/ViewMF/viewMFdiff.cpp index 76fc48050..e9de7b304 100644 --- a/Tools/C_util/ViewMF/viewMFdiff.cpp +++ b/Tools/C_util/ViewMF/viewMFdiff.cpp @@ -1,9 +1,9 @@ -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/Tools/C_util/ViewMF/viewMFdiffHardWire.cpp b/Tools/C_util/ViewMF/viewMFdiffHardWire.cpp index 8334521cd..e3013e7e5 100644 --- a/Tools/C_util/ViewMF/viewMFdiffHardWire.cpp +++ b/Tools/C_util/ViewMF/viewMFdiffHardWire.cpp @@ -3,11 +3,11 @@ #include #endif -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/Tools/C_util/WritePlotFile.H b/Tools/C_util/WritePlotFile.H index c8a03e051..861d0d318 100644 --- a/Tools/C_util/WritePlotFile.H +++ b/Tools/C_util/WritePlotFile.H @@ -3,9 +3,9 @@ #include -#include -#include -#include +#include +#include +#include // Write a MultiFab to a plotfile named "name" using the HyperCLawV1.1 parallel // plotfile data format diff --git a/Tools/C_util/WritePlotFile.cpp b/Tools/C_util/WritePlotFile.cpp index 4e7e9989c..d99b9e6b9 100644 --- a/Tools/C_util/WritePlotFile.cpp +++ b/Tools/C_util/WritePlotFile.cpp @@ -3,7 +3,7 @@ // level 1 data. All this could be cleaner, but this is throw-away code // anyway, so why bother? -#include +#include #include #include @@ -11,11 +11,11 @@ #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #ifdef BL_USE_SETBUF diff --git a/Tools/C_util/dbgTools/GNUmakefile b/Tools/C_util/dbgTools/GNUmakefile index a5e481d6c..147a17b6e 100644 --- a/Tools/C_util/dbgTools/GNUmakefile +++ b/Tools/C_util/dbgTools/GNUmakefile @@ -15,17 +15,17 @@ EBASE = crsGrids CEXE_sources += $(EBASE).cpp DEFINES += -DBL_PARALLEL_IO -include $(TOP)/Tools/C_mk/Make.defs ./Make.package +include $(TOP)/Tools/GNUMake/Make.defs ./Make.package -include $(TOP)/Src/C_BaseLib/Make.package +include $(TOP)/Src/Base/Make.package INCLUDE_LOCATIONS += . -INCLUDE_LOCATIONS += $(TOP)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(TOP)/Src/Base -vpath %.H . $(TOP)/Source/C_BaseLib -vpath %.cpp . $(TOP)/Source/C_BaseLib -vpath %.F . $(TOP)/Source/C_BaseLib -vpath %.f . $(TOP)/Source/C_BaseLib +vpath %.H . $(TOP)/Source/Base +vpath %.cpp . $(TOP)/Source/Base +vpath %.F . $(TOP)/Source/Base +vpath %.f . $(TOP)/Source/Base all: $(executable) diff --git a/Tools/C_util/dbgTools/crsGrids.cpp b/Tools/C_util/dbgTools/crsGrids.cpp index 931362c5b..aabf4b28b 100644 --- a/Tools/C_util/dbgTools/crsGrids.cpp +++ b/Tools/C_util/dbgTools/crsGrids.cpp @@ -1,17 +1,17 @@ -#include +#include #include #include #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // // This MUST be defined if don't have pubsetbuf() in I/O Streams Library. // diff --git a/Tools/C_util/dbgTools/intersectGrids.cpp b/Tools/C_util/dbgTools/intersectGrids.cpp index 8ef1924cb..d51c00c66 100644 --- a/Tools/C_util/dbgTools/intersectGrids.cpp +++ b/Tools/C_util/dbgTools/intersectGrids.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include @@ -9,12 +9,12 @@ using std::set_new_handler; #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // // This MUST be defined if don't have pubsetbuf() in I/O Streams Library. diff --git a/Tools/C_mk/Make.defs b/Tools/GNUMake/Make.defs similarity index 80% rename from Tools/C_mk/Make.defs rename to Tools/GNUMake/Make.defs index b50eb05d7..cf0f942cf 100644 --- a/Tools/C_mk/Make.defs +++ b/Tools/GNUMake/Make.defs @@ -4,7 +4,7 @@ ifneq ($(firstword $(sort 2.7 $(my_python_version))), 2.7) $(error Python >= 2.7 required! Your version is $(my_python_version)) endif -include $(BOXLIB_HOME)/Tools/C_mk/Make.machines +include $(BOXLIB_HOME)/Tools/GNUMake/Make.machines ifndef PRECISION PRECISION = DOUBLE @@ -93,17 +93,17 @@ lowercase_comp := $(shell echo $(COMP) | tr A-Z a-z) ifeq ($(lowercase_comp),$(filter $(lowercase_comp),gcc gnu g++)) lowercase_comp = gnu - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/comps/gnu.mak...) - include $(BOXLIB_HOME)/Tools/C_mk/comps/gnu.mak + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/comps/gnu.mak...) + include $(BOXLIB_HOME)/Tools/GNUMake/comps/gnu.mak else ifeq ($(lowercase_comp),intel) - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/comps/intel.mak...) - include $(BOXLIB_HOME)/Tools/C_mk/comps/intel.mak + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/comps/intel.mak...) + include $(BOXLIB_HOME)/Tools/GNUMake/comps/intel.mak else ifeq ($(lowercase_comp),cray) - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/comps/cray.mak...) - include $(BOXLIB_HOME)/Tools/C_mk/comps/cray.mak + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/comps/cray.mak...) + include $(BOXLIB_HOME)/Tools/GNUMake/comps/cray.mak else ifeq ($(lowercase_comp),pgi) - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/comps/pgi.mak...) - include $(BOXLIB_HOME)/Tools/C_mk/comps/pgi.mak + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/comps/pgi.mak...) + include $(BOXLIB_HOME)/Tools/GNUMake/comps/pgi.mak else $(error Unknown compiler $(COMP). Supported compilers are gnu, intel, cray, and pgi) endif @@ -292,30 +292,30 @@ endif F90CACHE = ifeq ($(USE_VTUNE),TRUE) - $(into Loading $(BOXLIB_HOME)/Tools/C_mk/tools/Make.vtune - include $(BOXLIB_HOME)/Tools/C_mk/tools/Make.vtune + $(into Loading $(BOXLIB_HOME)/Tools/GNUMake/tools/Make.vtune + include $(BOXLIB_HOME)/Tools/GNUMake/tools/Make.vtune endif # Use Sam Williams's HPGMG ifeq ($(USE_HPGMG), TRUE) - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/packages/Make.hpgmg...) - include $(BOXLIB_HOME)/Tools/C_mk/packages/Make.hpgmg + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/packages/Make.hpgmg...) + include $(BOXLIB_HOME)/Tools/GNUMake/packages/Make.hpgmg endif -ifneq ("$(wildcard $(BOXLIB_HOME)/Tools/C_mk/sites/Make.$(host_name))","") - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/sites/Make.$(host_name)...) - include $(BOXLIB_HOME)/Tools/C_mk/sites/Make.$(host_name) +ifneq ("$(wildcard $(BOXLIB_HOME)/Tools/GNUMake/sites/Make.$(host_name))","") + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/sites/Make.$(host_name)...) + include $(BOXLIB_HOME)/Tools/GNUMake/sites/Make.$(host_name) else - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/sites/Make.$(which_site)...) - include $(BOXLIB_HOME)/Tools/C_mk/sites/Make.$(which_site) + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/sites/Make.$(which_site)...) + include $(BOXLIB_HOME)/Tools/GNUMake/sites/Make.$(which_site) endif ifeq ($(USE_UPCXX),TRUE) - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/Make.upcxx...) - include $(BOXLIB_HOME)/Tools/C_mk/Make.upcxx + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/Make.upcxx...) + include $(BOXLIB_HOME)/Tools/GNUMake/Make.upcxx endif -ifneq ("$(wildcard $(BOXLIB_HOME)/Tools/C_mk/Make.local)","") - $(info Loading $(BOXLIB_HOME)/Tools/C_mk/Make.local...) - include $(BOXLIB_HOME)/Tools/C_mk/Make.local +ifneq ("$(wildcard $(BOXLIB_HOME)/Tools/GNUMake/Make.local)","") + $(info Loading $(BOXLIB_HOME)/Tools/GNUMake/Make.local...) + include $(BOXLIB_HOME)/Tools/GNUMake/Make.local endif diff --git a/Tools/C_mk/Make.local.template b/Tools/GNUMake/Make.local.template similarity index 100% rename from Tools/C_mk/Make.local.template rename to Tools/GNUMake/Make.local.template diff --git a/Tools/C_mk/Make.machines b/Tools/GNUMake/Make.machines similarity index 100% rename from Tools/C_mk/Make.machines rename to Tools/GNUMake/Make.machines diff --git a/Tools/C_mk/Make.rules b/Tools/GNUMake/Make.rules similarity index 98% rename from Tools/C_mk/Make.rules rename to Tools/GNUMake/Make.rules index f09687c0c..0b66f394a 100644 --- a/Tools/C_mk/Make.rules +++ b/Tools/GNUMake/Make.rules @@ -201,4 +201,4 @@ help: @echo " libraries = $(libraries)" @echo " executable = $(executable)" @echo "" - @echo "Read Tools/C_mk/README.md for details on tweaking the make system." + @echo "Read Tools/GNUMake/README.md for details on tweaking the make system." diff --git a/Tools/C_mk/Make.upcxx b/Tools/GNUMake/Make.upcxx similarity index 100% rename from Tools/C_mk/Make.upcxx rename to Tools/GNUMake/Make.upcxx diff --git a/Tools/C_mk/README.md b/Tools/GNUMake/README.md similarity index 96% rename from Tools/C_mk/README.md rename to Tools/GNUMake/README.md index e56f3af9a..098ae4fca 100644 --- a/Tools/C_mk/README.md +++ b/Tools/GNUMake/README.md @@ -6,7 +6,7 @@ Typically an application will have its own `GNUmakefile`. (See complicated example.) `Make.defs` is included near the beginning, and `Make.rules` is included in the end. Depending the need, `GNUmakefile` includes a number of -`$(BOXLIB_HOME)/Src/xxx/Make.package`, where `xxx` is `C_BaseLib` etc. +`$(BOXLIB_HOME)/Src/xxx/Make.package`, where `xxx` is `Base` etc. These `Make.package` files add sources to the make system. An application also has its own `Make.package`. The make variables for the sources are: @@ -71,9 +71,9 @@ The `Make.defs` includes the following files in the listed order: as HPGMG, if it is used. * `sites/Make.xxx`: Here which file to include is resolved as follows. - If a file `$(BOXLIB_HOME)/Tools/C_mk/sites/Make.$(host_name)` + If a file `$(BOXLIB_HOME)/Tools/GNUMake/sites/Make.$(host_name)` exists, it is included. Otherwise, - `$(BOXLIB_HOME)/Tools/C_mk/sites/Make.$(which_site)` is included. + `$(BOXLIB_HOME)/Tools/GNUMake/sites/Make.$(which_site)` is included. Note that both `host_name` and `which_site` are defined in `Make.machines`. This file is used for site specific setup. Typically this is used for MPI related setup. The file diff --git a/Tools/C_mk/comps/cray.mak b/Tools/GNUMake/comps/cray.mak similarity index 100% rename from Tools/C_mk/comps/cray.mak rename to Tools/GNUMake/comps/cray.mak diff --git a/Tools/C_mk/comps/gnu.mak b/Tools/GNUMake/comps/gnu.mak similarity index 100% rename from Tools/C_mk/comps/gnu.mak rename to Tools/GNUMake/comps/gnu.mak diff --git a/Tools/C_mk/comps/intel.mak b/Tools/GNUMake/comps/intel.mak similarity index 100% rename from Tools/C_mk/comps/intel.mak rename to Tools/GNUMake/comps/intel.mak diff --git a/Tools/C_mk/comps/pgi.mak b/Tools/GNUMake/comps/pgi.mak similarity index 100% rename from Tools/C_mk/comps/pgi.mak rename to Tools/GNUMake/comps/pgi.mak diff --git a/Tools/C_mk/packages/Make.hpgmg b/Tools/GNUMake/packages/Make.hpgmg similarity index 100% rename from Tools/C_mk/packages/Make.hpgmg rename to Tools/GNUMake/packages/Make.hpgmg diff --git a/Tools/C_mk/sites/Make.ccse b/Tools/GNUMake/sites/Make.ccse similarity index 100% rename from Tools/C_mk/sites/Make.ccse rename to Tools/GNUMake/sites/Make.ccse diff --git a/Tools/C_mk/sites/Make.nersc b/Tools/GNUMake/sites/Make.nersc similarity index 100% rename from Tools/C_mk/sites/Make.nersc rename to Tools/GNUMake/sites/Make.nersc diff --git a/Tools/C_mk/sites/Make.olcf b/Tools/GNUMake/sites/Make.olcf similarity index 100% rename from Tools/C_mk/sites/Make.olcf rename to Tools/GNUMake/sites/Make.olcf diff --git a/Tools/C_mk/sites/Make.unknown b/Tools/GNUMake/sites/Make.unknown similarity index 100% rename from Tools/C_mk/sites/Make.unknown rename to Tools/GNUMake/sites/Make.unknown diff --git a/Tools/C_mk/tools/Make.vtune b/Tools/GNUMake/tools/Make.vtune similarity index 100% rename from Tools/C_mk/tools/Make.vtune rename to Tools/GNUMake/tools/Make.vtune diff --git a/Tools/Migration/gnumake.sh b/Tools/Migration/gnumake.sh new file mode 100755 index 000000000..507a6d0e2 --- /dev/null +++ b/Tools/Migration/gnumake.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +OLD_SRC_PATH="Tools\/C_mk" +NEW_SRC_PATH="Tools\/GNUMake" +echo ${OLD_SRC_PATH}" --> "${NEW_SRC_PATH} +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -exec grep -Iq . {} \; -exec sed -i 's/'"${OLD_SRC_PATH}"'/'"${NEW_SRC_PATH}"'/g' {} + + +echo "Remove 'FCOMP = ' line from GNUmakefile" +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -name "GNUmakefile" -exec sed -i '/FCOMP\s*=/d' {} + diff --git a/Tools/Migration/prefixinclude.sh b/Tools/Migration/prefixinclude.sh new file mode 100755 index 000000000..596ae935d --- /dev/null +++ b/Tools/Migration/prefixinclude.sh @@ -0,0 +1,143 @@ +#!/usr/bin/env bash + +BOXLIB_HEADERS="\ +ABec2_F\.H \ +ABec2\.H \ +ABec4_F\.H \ +ABec4\.H \ +ABec_F\.H \ +ABecLaplacian\.H \ +AmrCore\.H \ +AmrData\.H \ +Amr\.H \ +AmrLevel\.H \ +AmrParGDB\.H \ +AmrParticles\.H \ +AmrvisConstants\.H \ +Arena\.H \ +Array\.H \ +ArrayLim\.H \ +AuxBoundaryData\.H \ +BArena\.H \ +BaseFab_f\.H \ +BaseFab\.H \ +BCRec\.H \ +BC_TYPES\.H \ +BLassert\.H \ +BLBackTrace\.H \ +BLFort\.H \ +BLPgas\.H \ +BLProfiler\.H \ +BndryData\.H \ +BndryRegister\.H \ +BoundCond\.H \ +BoxArray\.H \ +BoxDomain\.H \ +Box\.H \ +BoxLib\.H \ +BoxList\.H \ +CArena\.H \ +ccse-mpi\.H \ +CGSolver\.H \ +Cluster\.H \ +CONSTANTS\.H \ +COORDSYS_F\.H \ +CoordSys\.H \ +DataServices\.H \ +Derive\.H \ +DistributionMapping\.H \ +DivVis_F\.H \ +DivVis\.H \ +ErrorList\.H \ +Extrapolater\.H \ +FabArray\.H \ +FabConv\.H \ +FabSet\.H \ +FArrayBox\.H \ +FillPatchUtil\.H \ +FLUSH_F\.H \ +FLUXREG_F\.H \ +FluxRegister\.H \ +FMultiGrid\.H \ +FPC\.H \ +Geometry\.H \ +IArrayBox\.H \ +iMultiFab\.H \ +IndexType\.H \ +INTERPBNDRYDATA_F\.H \ +InterpBndryData\.H \ +INTERP_F\.H \ +Interpolater\.H \ +IntVect\.H \ +Laplacian\.H \ +Lazy\.H \ +LevelBld\.H \ +LinOp\.H \ +LO_BCTYPES\.H \ +LO_F\.H \ +Looping\.H \ +LP_F\.H \ +MacBndry\.H \ +MAKESLICE_F\.H \ +Mask\.H \ +MCCGSolver\.H \ +MCINTERPBNDRYDATA_F\.H \ +MCInterpBndryData\.H \ +MCLinOp\.H \ +MCLO_F\.H \ +MCMultiGrid\.H \ +MemPool\.H \ +MemProfiler\.H \ +MG_F\.H \ +MGT_Solver\.H \ +MultiFab\.H \ +MultiFabUtil_F\.H \ +MultiFabUtil\.H \ +MultiGrid\.H \ +MultiMask\.H \ +NFiles\.H \ +Orientation\.H \ +ParallelDescriptor\.H \ +ParGDB\.H \ +ParmParse\.H \ +ParticleInit\.H \ +Particles_F\.H \ +Particles\.H \ +Periodicity\.H \ +PhysBCFunct\.H \ +PList\.H \ +PlotFileUtil\.H \ +Pointers\.H \ +PROB_AMR_F\.H \ +RealBox\.H \ +REAL\.H \ +SLABSTAT_F\.H \ +SlabStat\.H \ +SPACE_F\.H \ +SPACE\.H \ +StateData\.H \ +StateDescriptor\.H \ +StationData\.H \ +stencil_types\.H \ +TagBox\.H \ +TinyProfiler\.H \ +TracerParticles\.H \ +Tuple\.H \ +UseCount\.H \ +Utility\.H \ +VisMF\.H \ +winstd\.H" + +NUM_HEADERS=126 +I_HEADER=0 + +# include 'bc_types.fi' in fortran +old="bc_types\.fi" +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f \( -name "*.f" -o -name "*.f90" -o -name "*.F" -o -name "*.F90" \) -exec grep -Iq . {} \; -exec sed -i 's/\(include\s*\(\x27\|\"\)\s*\)'"${old}"'\(\s*\(\x27\|\"\)\)/\1AMReX_'"${old}"'\3/g' {} + + +for header in ${BOXLIB_HEADERS}; do + find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -exec grep -Iq . {} \; -exec sed -i 's/\(#include\s*\(<\|\"\)\s*\)'"${header}"'\(\s*\(>\|\"\)\)/\1AMReX_'"${header}"'\3/g' {} + + I_HEADER=$((I_HEADER+1)) + percent=$(awk "BEGIN { pc=100*${I_HEADER}/${NUM_HEADERS}; i=int(pc); print (pc-i<0.5)?i:i+1 }") + echo -ne "Progress: ${percent}%"\\r +done diff --git a/Tools/Migration/srcpath.sh b/Tools/Migration/srcpath.sh new file mode 100755 index 000000000..87721ddb9 --- /dev/null +++ b/Tools/Migration/srcpath.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +OLD_SRC_PATH="C_AMRLib" +NEW_SRC_PATH="Amr" +echo ${OLD_SRC_PATH}" --> "${NEW_SRC_PATH} +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -exec grep -Iq . {} \; -exec sed -i 's/'"${OLD_SRC_PATH}"'/'"${NEW_SRC_PATH}"'/g' {} + + +OLD_SRC_PATH="C_AmrCoreLib" +NEW_SRC_PATH="AmrCore" +echo ${OLD_SRC_PATH}" --> "${NEW_SRC_PATH} +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -exec grep -Iq . {} \; -exec sed -i 's/'"${OLD_SRC_PATH}"'/'"${NEW_SRC_PATH}"'/g' {} + + +OLD_SRC_PATH="C_BaseLib" +NEW_SRC_PATH="Base" +echo ${OLD_SRC_PATH}" --> "${NEW_SRC_PATH} +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -exec grep -Iq . {} \; -exec sed -i 's/'"${OLD_SRC_PATH}"'/'"${NEW_SRC_PATH}"'/g' {} + + +OLD_SRC_PATH="C_BoundaryLib" +NEW_SRC_PATH="Boundary" +echo ${OLD_SRC_PATH}" --> "${NEW_SRC_PATH} +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -exec grep -Iq . {} \; -exec sed -i 's/'"${OLD_SRC_PATH}"'/'"${NEW_SRC_PATH}"'/g' {} + + +OLD_SRC_PATH="C_ParticleLib" +NEW_SRC_PATH="Particle" +echo ${OLD_SRC_PATH}" --> "${NEW_SRC_PATH} +find . -type d \( -name .git -o -path './Tools/Migration' \) -prune -o -type f -exec grep -Iq . {} \; -exec sed -i 's/'"${OLD_SRC_PATH}"'/'"${NEW_SRC_PATH}"'/g' {} + + diff --git a/Tutorials/AMR_Adv_C/Exec/Make.Adv b/Tutorials/AMR_Adv_C/Exec/Make.Adv index 53732456b..cdd334f70 100644 --- a/Tutorials/AMR_Adv_C/Exec/Make.Adv +++ b/Tutorials/AMR_Adv_C/Exec/Make.Adv @@ -5,7 +5,7 @@ TOP := $(ADR_DIR) EBASE := main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs Bdirs := Source Source/Src_nd Source/Src_$(DIM)d @@ -18,7 +18,7 @@ INCLUDE_LOCATIONS += $(Blocs) VPATH_LOCATIONS += $(Blocs) -Pdirs := C_BaseLib C_AmrCoreLib C_AMRLib C_BoundaryLib +Pdirs := Base AmrCore Amr Boundary Ppack += $(foreach dir, $(Pdirs), $(BOXLIB_HOME)/Src/$(dir)/Make.package) include $(Ppack) @@ -27,5 +27,5 @@ include $(Ppack) all: $(executable) @echo SUCCESS -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/AMR_Adv_C/Source/Adv.H b/Tutorials/AMR_Adv_C/Source/Adv.H index 069cd0871..d7f54c1e0 100644 --- a/Tutorials/AMR_Adv_C/Source/Adv.H +++ b/Tutorials/AMR_Adv_C/Source/Adv.H @@ -1,8 +1,8 @@ #ifndef _Adv_H_ #define _Adv_H_ -#include -#include +#include +#include #include diff --git a/Tutorials/AMR_Adv_C/Source/Adv.cpp b/Tutorials/AMR_Adv_C/Source/Adv.cpp index 54af552f3..990e1270e 100644 --- a/Tutorials/AMR_Adv_C/Source/Adv.cpp +++ b/Tutorials/AMR_Adv_C/Source/Adv.cpp @@ -1,9 +1,9 @@ #include #include -#include -#include -#include +#include +#include +#include int Adv::verbose = 0; Real Adv::cfl = 0.9; diff --git a/Tutorials/AMR_Adv_C/Source/AdvBld.cpp b/Tutorials/AMR_Adv_C/Source/AdvBld.cpp index e83aecca9..78ba7bf4d 100644 --- a/Tutorials/AMR_Adv_C/Source/AdvBld.cpp +++ b/Tutorials/AMR_Adv_C/Source/AdvBld.cpp @@ -1,5 +1,5 @@ -#include +#include #include class AdvBld diff --git a/Tutorials/AMR_Adv_C/Source/Adv_F.H b/Tutorials/AMR_Adv_C/Source/Adv_F.H index 62b40c20a..a643f1211 100644 --- a/Tutorials/AMR_Adv_C/Source/Adv_F.H +++ b/Tutorials/AMR_Adv_C/Source/Adv_F.H @@ -1,6 +1,6 @@ #ifndef _Adv_F_H_ #define _Adv_F_H_ -#include +#include extern "C" { diff --git a/Tutorials/AMR_Adv_C/Source/Adv_io.cpp b/Tutorials/AMR_Adv_C/Source/Adv_io.cpp index 044a12c35..d75e53af3 100644 --- a/Tutorials/AMR_Adv_C/Source/Adv_io.cpp +++ b/Tutorials/AMR_Adv_C/Source/Adv_io.cpp @@ -1,5 +1,5 @@ #include -#include +#include void Adv::restart (Amr& papa, diff --git a/Tutorials/AMR_Adv_C/Source/Adv_setup.cpp b/Tutorials/AMR_Adv_C/Source/Adv_setup.cpp index 0fc76ad5c..8c3990798 100644 --- a/Tutorials/AMR_Adv_C/Source/Adv_setup.cpp +++ b/Tutorials/AMR_Adv_C/Source/Adv_setup.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include void Adv::variableCleanUp () diff --git a/Tutorials/AMR_Adv_C/Source/main.cpp b/Tutorials/AMR_Adv_C/Source/main.cpp index d3c3826ce..9c892d63c 100644 --- a/Tutorials/AMR_Adv_C/Source/main.cpp +++ b/Tutorials/AMR_Adv_C/Source/main.cpp @@ -3,10 +3,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include int main (int argc, diff --git a/Tutorials/AMR_Adv_CF/Exec/Make.Adv b/Tutorials/AMR_Adv_CF/Exec/Make.Adv index 202b3b2cd..ef35c467d 100644 --- a/Tutorials/AMR_Adv_CF/Exec/Make.Adv +++ b/Tutorials/AMR_Adv_CF/Exec/Make.Adv @@ -3,13 +3,13 @@ TOP := $(BOXLIB_HOME)/Tutorials/AMR_Adv_CF EBASE := main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs all: $(executable) @echo SUCCESS Bdirs := Source -Pdirs := C_BaseLib F_Interfaces/BaseLib +Pdirs := Base F_Interfaces/BaseLib Bpack += $(foreach dir, $(Pdirs), $(BOXLIB_HOME)/Src/$(dir)/Make.package) Blocs += $(foreach dir, $(Pdirs), $(BOXLIB_HOME)/Src/$(dir)) @@ -33,5 +33,5 @@ vpath %.f . $(VPATH_LOCATIONS) vpath %.fi . $(VPATH_LOCATIONS) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/AMR_Adv_C_v2/Exec/Make.Adv b/Tutorials/AMR_Adv_C_v2/Exec/Make.Adv index 714848bbd..b5642e938 100644 --- a/Tutorials/AMR_Adv_C_v2/Exec/Make.Adv +++ b/Tutorials/AMR_Adv_C_v2/Exec/Make.Adv @@ -3,7 +3,7 @@ ADR_DIR ?= $(BOXLIB_HOME)/Tutorials/AMR_Adv_C_v2 TOP := $(ADR_DIR) -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs Bdirs := Source Source/Src_nd Source/Src_$(DIM)d Bpack += $(foreach dir, $(Bdirs), $(TOP)/$(dir)/Make.package) @@ -15,11 +15,11 @@ INCLUDE_LOCATIONS += $(Blocs) VPATH_LOCATIONS += $(Blocs) -Pdirs := C_BaseLib C_BoundaryLib C_AmrCoreLib +Pdirs := Base Boundary AmrCore Ppack += $(foreach dir, $(Pdirs), $(BOXLIB_HOME)/Src/$(dir)/Make.package) include $(Ppack) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.H b/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.H index 1ba31eb4d..739438b4b 100644 --- a/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.H +++ b/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.H @@ -9,8 +9,8 @@ #include #endif -#include -#include +#include +#include class AmrAdv : public AmrCore @@ -50,7 +50,7 @@ private: void Advance (int lev, Real time, Real dt, int iteration, int ncycle); void FillPatch (int lev, Real time, MultiFab& mf, int icomp, int ncomp); - void GetData (int lev, Real time, PArray& data, std::vector& datatime); + void GetData (int lev, Real time, Array& data, Array& datatime); std::string PlotFileName (int lev) const; Array PlotFileMF () const; diff --git a/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.cpp b/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.cpp index a6c0c7d5c..b0b07211c 100644 --- a/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.cpp +++ b/Tutorials/AMR_Adv_C_v2/Source/AmrAdv.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -82,15 +82,14 @@ AmrAdv::MakeNewLevel (int lev, Real time, SetBoxArray(lev, new_grids); SetDistributionMap(lev, new_dmap); - phi_new[lev] = std::unique_ptr(new MultiFab(grids[lev], ncomp, nghost, dmap[lev])); - phi_old[lev] = std::unique_ptr(new MultiFab(grids[lev], ncomp, nghost, dmap[lev])); + phi_new[lev].reset(new MultiFab(grids[lev], ncomp, nghost, dmap[lev])); + phi_old[lev].reset(new MultiFab(grids[lev], ncomp, nghost, dmap[lev])); t_new[lev] = time; t_old[lev] = time - 1.e200; if (lev > 0 && do_reflux) { - flux_reg[lev] = std::unique_ptr - (new FluxRegister(grids[lev], refRatio(lev-1), lev, ncomp, dmap[lev])); + flux_reg[lev].reset(new FluxRegister(grids[lev], refRatio(lev-1), lev, ncomp, dmap[lev])); } } @@ -101,8 +100,13 @@ AmrAdv::RemakeLevel (int lev, Real time, const int ncomp = phi_new[lev]->nComp(); const int nghost = phi_new[lev]->nGrow(); +#if __cplusplus >= 201402L + auto new_state = std::make_unique(new_grids, ncomp, nghost, new_dmap); + auto old_state = std::make_unique(new_grids, ncomp, nghost, new_dmap); +#else auto new_state = std::unique_ptr(new MultiFab(new_grids, ncomp, nghost, new_dmap)); auto old_state = std::unique_ptr(new MultiFab(new_grids, ncomp, nghost, new_dmap)); +#endif FillPatch(lev, time, *new_state, 0, ncomp); @@ -116,8 +120,7 @@ AmrAdv::RemakeLevel (int lev, Real time, t_old[lev] = time - 1.e200; if (lev > 0 && do_reflux) { - flux_reg[lev] = std::unique_ptr - (new FluxRegister(grids[lev], refRatio(lev-1), lev, ncomp, dmap[lev])); + flux_reg[lev].reset(new FluxRegister(grids[lev], refRatio(lev-1), lev, ncomp, dmap[lev])); } } @@ -203,8 +206,8 @@ AmrAdv::FillPatch (int lev, Real time, MultiFab& mf, int icomp, int ncomp) { if (lev == 0) { - PArray smf; - std::vector stime; + Array smf; + Array stime; GetData(0, time, smf, stime); AmrAdvPhysBC physbc; @@ -213,8 +216,8 @@ AmrAdv::FillPatch (int lev, Real time, MultiFab& mf, int icomp, int ncomp) } else { - PArray cmf, fmf; - std::vector ctime, ftime; + Array cmf, fmf; + Array ctime, ftime; GetData(lev-1, time, cmf, ctime); GetData(lev , time, fmf, ftime); @@ -233,7 +236,7 @@ AmrAdv::FillPatch (int lev, Real time, MultiFab& mf, int icomp, int ncomp) } void -AmrAdv::GetData (int lev, Real time, PArray& data, std::vector& datatime) +AmrAdv::GetData (int lev, Real time, Array& data, Array& datatime) { data.clear(); datatime.clear(); diff --git a/Tutorials/AMR_Adv_C_v2/Source/AmrAdvBC.H b/Tutorials/AMR_Adv_C_v2/Source/AmrAdvBC.H index ffd2d253f..fb887580d 100644 --- a/Tutorials/AMR_Adv_C_v2/Source/AmrAdvBC.H +++ b/Tutorials/AMR_Adv_C_v2/Source/AmrAdvBC.H @@ -1,7 +1,7 @@ #ifndef AmrAdvBC_H_ #define AmrAdvBC_H_ -#include +#include // In this tutorial, we assume the boundaries are all periodic. // Thus there are no physical boundaries. And FillBoundary does nothing. diff --git a/Tutorials/AMR_Adv_C_v2/Source/AmrAdvError.cpp b/Tutorials/AMR_Adv_C_v2/Source/AmrAdvError.cpp index 14890c6f6..56727fb9d 100644 --- a/Tutorials/AMR_Adv_C_v2/Source/AmrAdvError.cpp +++ b/Tutorials/AMR_Adv_C_v2/Source/AmrAdvError.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include diff --git a/Tutorials/AMR_Adv_C_v2/Source/AmrAdvIO.cpp b/Tutorials/AMR_Adv_C_v2/Source/AmrAdvIO.cpp index 7f779944e..8d121384c 100644 --- a/Tutorials/AMR_Adv_C_v2/Source/AmrAdvIO.cpp +++ b/Tutorials/AMR_Adv_C_v2/Source/AmrAdvIO.cpp @@ -1,5 +1,5 @@ -#include +#include #include diff --git a/Tutorials/AMR_Adv_C_v2/Source/AmrAdv_F.H b/Tutorials/AMR_Adv_C_v2/Source/AmrAdv_F.H index a869ee730..d113df435 100644 --- a/Tutorials/AMR_Adv_C_v2/Source/AmrAdv_F.H +++ b/Tutorials/AMR_Adv_C_v2/Source/AmrAdv_F.H @@ -1,6 +1,6 @@ #ifndef _Adv_F_H_ #define _Adv_F_H_ -#include +#include extern "C" { diff --git a/Tutorials/AMR_Adv_C_v2/Source/main.cpp b/Tutorials/AMR_Adv_C_v2/Source/main.cpp index 3109c5fde..6697a26bb 100644 --- a/Tutorials/AMR_Adv_C_v2/Source/main.cpp +++ b/Tutorials/AMR_Adv_C_v2/Source/main.cpp @@ -1,9 +1,9 @@ #include -#include -#include -#include +#include +#include +#include #include diff --git a/Tutorials/AMR_Trilinos_C/GNUmakefile b/Tutorials/AMR_Trilinos_C/GNUmakefile deleted file mode 100644 index 52c68d41a..000000000 --- a/Tutorials/AMR_Trilinos_C/GNUmakefile +++ /dev/null @@ -1,66 +0,0 @@ -# BOXLIB_HOME defines the directory in which we will find the BoxLib code -# If you have BOXLIB_HOME set as an environment variable then that definition -# will override this one. -BOXLIB_HOME ?= /path/to/boxlib - -# These are additional external (to BoxLib) libraries that you will need. -TRILINOS_DIR ?= /path/to/trilinos-11.0.3-Source -PARMETIS_LIB_DIR ?= /path/to/ParMetis-3.2.0 -METIS_LIB_DIR ?= /path/to/ParmMetis-3.2.0 -BLAS_LIB_DIR ?= /path/to/BLAS -LAPACK_LIB_DIR ?= /path/to/lapack-3.4.2/lib - -PRECISION = DOUBLE - -DEBUG = FALSE -DEBUG = TRUE - -DIM = 2 -DIM = 3 - -COMP =gcc - -# USE_MPI must be TRUE to run in parallel -USE_MPI=TRUE -USE_OMP=FALSE - -CPPFLAGS += -DMPICH_SKIP_MPICXX - -EBASE = driver - -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs - -CEXE_sources += $(EBASE).cpp - -include Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package - -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib - -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_AMRLib - -# trilinos library -INCLUDE_LOCATIONS += $(TRILINOS_DIR)/include -vpathdir += $(TRILINOS_DIR)/include -LIBRARY_LOCATIONS += $(TRILINOS_DIR)/lib -LIBRARY_LOCATIONS += $(PARMETIS_LIB_DIR) -LIBRARY_LOCATIONS += $(METIS_LIB_DIR) -LIBRARY_LOCATIONS += $(BLAS_LIB_DIR) -LIBRARY_LOCATIONS += $(LAPACK_LIB_DIR) - -LIBRARIES += -lbelosepetra -lbelos -lml -lgaleri -lamesos -lifpack -lepetraext -lepetra -lteuchos -ltriutils -laztecoo -lisorropia -lzoltan -lparmetis -lmetis -lblas -llapacke -llapack -lgfortran - -vpath %.c : . $(vpathdir) -vpath %.h : . $(vpathdir) -vpath %.cpp : . $(vpathdir) -vpath %.H : . $(vpathdir) -vpath %.F : . $(vpathdir) -vpath %.f : . $(vpathdir) -vpath %.f90 : . $(vpathdir) - -all: $(executable) - @echo SUCCESS - -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules diff --git a/Tutorials/AMR_Trilinos_C/Make.package b/Tutorials/AMR_Trilinos_C/Make.package deleted file mode 100644 index ce8e7b182..000000000 --- a/Tutorials/AMR_Trilinos_C/Make.package +++ /dev/null @@ -1,8 +0,0 @@ -CEXE_sources += driver.cpp -CEXE_sources += Solver.cpp -CEXE_sources += SolverBoundary.cpp -CEXE_sources += writePlotFile.cpp - -CEXE_headers += Solver.H -CEXE_headers += writePlotFile.H - diff --git a/Tutorials/AMR_Trilinos_C/README b/Tutorials/AMR_Trilinos_C/README deleted file mode 100644 index bad3cd524..000000000 --- a/Tutorials/AMR_Trilinos_C/README +++ /dev/null @@ -1,51 +0,0 @@ -This tutorial demonstrates how to call a Trilinos solver (in this case, Epetra) from a BoxLib -C++ code. In driver.cpp, we set up a sample RHS for the equation - - Laplacian(phi) = RHS. - -In SolverBoundary.cpp we construct the matrix entries of the finite -difference discretization of the Laplacian operator; the solution is computed in Solver.cpp - -The geometry of this problem is defined by SolverBoundary.cpp, which defines the -valid domain as all cells that do not touch the domain boundary. The solution, phi, is set -to zero on all cells touching the domain boundary. - -The code can be built in 2D or 3D by setting "DIM" in the GNUmakefile. - -The inputs are as follows: - -nx = total number of cells in the problem domain in the x-direction -ny = total number of cells in the problem domain in the y-direction -nz = total number of cells in the problem domain in the z-direction (if 3D) - -max_grid_size = maximum size of each subdomain in the problem domain - -tol = tolerance of the iterative solver -maxiters = maximum number of iterations by the iterative solver -numBlocks = maximum number of blocks in Krylov space -recycleBlocks = number of vectors in recycle space -maxOldLHS = number of stored LHS for extrapolating the next starting vector -verbose = controls the verbosity of the output - -To build this code requires a number of other libraries, which you must build (or which must -exist on the machine where you are building), and you will need to set the path to each of -these libraries in the GNUmakefile. Note that the "?=" means that if you set these as an -environment variable, the environment variable will override what is set in the GNUmakefile. - -The libaries you need (and paths you will need to set) are: - -TRILINOS_DIR ?= /path/to/trilinos-11.0.3-Source -PARMETIS_LIB_DIR ?= /path/to/ParMetis-3.2.0 -METIS_LIB_DIR ?= /path/to/ParmMetis-3.2.0 -BLAS_LIB_DIR ?= /path/to/BLAS -LAPACK_LIB_DIR ?= /path/to/lapack-3.4.2/lib - -To build the code, edit the appropriate lines in the GNUmakefile and type "make". - -To run the code, simply type the exectuable name followed by the name of the inputs file. -A sample inputs file (called "inputs") is provided here. - -Two plotfiles are written: RHS and SOLN. You can visualize these using Visit or Amrvis. - -This tutorial was based on the interface to Trilinos implemented by Dr. Tulin Kaman -of the Paul Scherrer Institut (tulin.kaman@psi.ch) and ETH Zurich (tulin.kaman@inf.ethz.ch) diff --git a/Tutorials/AMR_Trilinos_C/Solver.H b/Tutorials/AMR_Trilinos_C/Solver.H deleted file mode 100644 index 63ecf2e9f..000000000 --- a/Tutorials/AMR_Trilinos_C/Solver.H +++ /dev/null @@ -1,384 +0,0 @@ -#ifndef _SOLVER_H -#define _SOLVER_H - -#include "ml_include.h" -#include -#include -#include -#include -#include "Epetra_MpiComm.h" - -#include "Epetra_Map.h" -#include "Epetra_Vector.h" -#include "Epetra_VbrMatrix.h" -#include "Epetra_CrsMatrix.h" -#include "Epetra_LinearProblem.h" -#include "Epetra_Operator.h" -#include "EpetraExt_RowMatrixOut.h" -#include - -#include "BelosConfigDefs.hpp" -#include "BelosLinearProblem.hpp" -#include "BelosEpetraAdapter.hpp" -#include "BelosBlockCGSolMgr.hpp" -#include "BelosRCGSolMgr.hpp" -#include "BelosStatusTestGenResNorm.hpp" - -#include "Teuchos_CommandLineProcessor.hpp" -#include - -#include "ml_MultiLevelPreconditioner.h" -#include "ml_MultiLevelOperator.h" -#include "ml_epetra_utils.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -//using namespace Teuchos; -using Teuchos::RCP; -using Teuchos::rcp; -using namespace ML_Epetra; -using namespace Isorropia; - -class Solver { - -public: - /** Constructor for the SAAMGPCG solver. - * \param hr the mesh-spacings in each direction. - * \param Comm the communicator object used in the solver routines. - * \param verbose flag if output should be verbose. - * \sa ~Solver(), SetupMLList() and SetupProblem() - */ - Solver(const Box& domain_in, const std::vector& hr_in, - Epetra_MpiComm& Comm, bool verbose, - double tol, int maxIterations, int numBlocks, int recycleBlocks, - int maxOldLHS, MultiFab& rhs, MultiFab& soln) : - - Comm_m(Comm) - { - Diag = 0; - - domain = domain_in; - dom_lo = domain.loVect(); - dom_hi = domain.hiVect(); - - nx = domain.hiVect()[0] - domain.loVect()[0] + 1; - ny = domain.hiVect()[1] - domain.loVect()[1] + 1; -#if (BL_SPACEDIM == 3) - nz = domain.hiVect()[2] - domain.loVect()[2] + 1; -#endif - - hr = hr_in; - verbose_m = verbose; - - isReusingHierarchy_m = false; - isReusingPreconditioner_m = false; - //XXX: currently set reusing to hierarchy - isReusingHierarchy_m = true; - - numBlocks_m = numBlocks; - recycleBlocks_m = recycleBlocks; - nLHS_m = maxOldLHS; - - // setup boundary treatment - InitializeDomainGeometry(); - - // setup ml preconditioner parameters - SetupMLList(); - - SetupProblem(domain, rhs, soln); - - // setup extrapolation - if(nLHS_m > 0) - P = rcp(new Epetra_MultiVector(*Map, nLHS_m, false)); - - MLPrec = Teuchos::null; - - // setup Belos parameters - belosList.set( "Maximum Iterations", maxIterations ); // Maximum number of iterations allowed - belosList.set( "Convergence Tolerance", tol ); // Relative convergence tolerance requested - if(numBlocks_m != 0 && recycleBlocks_m != 0){ // only set if solver==RCGSolMgr - belosList.set("Num Blocks", numBlocks_m); // Maximum number of blocks in Krylov space - belosList.set("Num Recycled Blocks", recycleBlocks_m); // Number of vectors in recycle space - } - if(verbose_m) { - belosList.set("Verbosity", Belos::Errors + Belos::Warnings + Belos::TimingDetails + Belos::FinalSummary + Belos::StatusTestDetails); - belosList.set("Output Frequency", 1); - } else - belosList.set("Verbosity", Belos::Errors + Belos::Warnings); - - // setup Belos solver - if(numBlocks_m == 0 || recycleBlocks_m == 0) - solver = rcp( new Belos::BlockCGSolMgr() ); - else - solver = rcp( new Belos::RCGSolMgr() ); - convStatusTest = rcp( new Belos::StatusTestGenResNorm (tol) ); - convStatusTest->defineScaleForm(Belos::NormOfRHS, Belos::TwoNorm); -#ifdef UserConv - solver->setUserConvStatusTest(convStatusTest); -#endif - } - /** Destructor for the SAAMGPCG solver. - */ - ~Solver() { - delete Diag; - delete Map; - } - - /** Actual computation of self field. - * \param repetitions the number of calls to the solver. - * \param tol the convergence criterion for the PCG solver. - * \param maxIterations the maximal number of iterations performed by the PCG solver. - */ - void Compute(); - - /** Performs setup of data distribution and problem (system matrix, RHS, LHS). - */ - void SetupProblem(const Box& domain, MultiFab& rhs, MultiFab& soln); - - /** Copy LHS->Values() into soln - */ - void CopySolution(Box& domain, MultiFab& soln); - - int getNumIters(); - -private: - - /// Map corresponding to data distribution - Epetra_Map* Map; - - /// preconditioner object - RCP MLPrec;//now RCP TODO - - /// parameter list used for the preconditioner (filled in SetupMLList) - Teuchos::ParameterList MLList_m; - - /// system matrix - RCP A; - - /// diagonal matrix of A - Epetra_CrsMatrix* Diag; - - /// right hand side of our problem - RCP RHS; - - /// left hand side - RCP LHS; - RCP lhssol; - - /// last N LHS's for extrapolating the new LHS as starting vector - //uint nLHS_m; - int nLHS_m; - RCP P; - std::deque< Epetra_Vector > OldLHS; - - /// Solver (Belos BlockCG or RCG) - /// if numBlocks_m OR recycleBlocks_m == 0 BlockCG is used, else RCG - /// maximum number of blocks in Krylov space - int numBlocks_m; - /// number of vectors in recycle space - int recycleBlocks_m; - - typedef double ST; - typedef Epetra_Operator OP; - typedef Epetra_MultiVector MV; - typedef Belos::OperatorTraits OPT;// TODO - typedef Belos::MultiVecTraits MVT;// TODO - - Teuchos::ParameterList belosList; - Belos::LinearProblem problem; - RCP< Belos::EpetraPrecOp > prec;//TODO just wrapper for MLPrec->LinearProblem - RCP< Belos::StatusTestGenResNorm< ST, MV, OP > > convStatusTest; - RCP< Belos::SolverManager > solver; - - /// Domain - Box domain; - const int* dom_lo; - const int* dom_hi; - - int nx, ny, nz; - - /// mapping (i,j) or (i,j,k) -> idx - std::map IdxMap; - /// mapping idx -> (i,j) or (i,j,k) - std::map CoordMap; - - /// mesh spacings - std::vector hr; - - /// communicator - Epetra_MpiComm Comm_m; - - /// verbosity of the code - bool verbose_m; - - /// flag specifying if hierarchy is reused - bool isReusingHierarchy_m; - - /// flag specifying if whole preconditioner is reued - bool isReusingPreconditioner_m; - - /// rectangular data distribution - int my_slide_size[3], my_start_offset[3], my_end_offset[3]; - - /** Performs a redistribution of the data with RCB to avoid idle processors. - */ - void redistributeWithRCB(); - - /** Computing the stencil in A and rescaling RHS with help of the geometry object. - */ - inline void ComputeStencil(); - - void printLoadBalanceStats(); - - void extrapolateLHS(); - - void InitializeDomainGeometry(); - -#if (BL_SPACEDIM == 2) - - inline bool isInside(int i, int j) { - return (i > dom_lo[0] && i < dom_hi[0] && j > dom_lo[1] && j < dom_hi[1]); - } - - inline int toCoordIdx(int i, int j) { return j*nx + i; } - - void ConstantInterpolation(int i, int j, - double& W, double& E, double& S, double& N, - double& C); - - void getBoundaryStencil(int x, int y, - double& W, double& E, double& S, double& N, - double& C); - - void getBoundaryStencil(int idx, - double& W, double& E, double& S, double& N, - double& C); - - void getNeighbours(int x, int y, - double& W, double& E, double& S, double& N); - - void getNeighbours(int idx, - double& W, double& E, double& S, double& N); - - void getCoord(int idx, int& i, int& j) - { - int ij = CoordMap[idx]; - j = ij / nx; - i = ij % nx; // (This is the same as idx - j*nx) - } - - inline int getIdx(int i, int j) { - if(isInside(i,j)) - return IdxMap[toCoordIdx(i,j)]; - else - return -1; - } - -#elif (BL_SPACEDIM == 3) - - inline bool isInside(int i, int j, int k) { - return (i > dom_lo[0] && i < dom_hi[0] && j > dom_lo[1] && j < dom_hi[1] && - k > dom_lo[2] && k < dom_hi[2]); - } - - inline int toCoordIdx(int i, int j, int k) { return k*nx*ny + j*nx + i; } - - void ConstantInterpolation(int i, int j, int k, - double& W, double& E, double& S, double& N, - double& F, double& B, double& C); - - void getBoundaryStencil(int x, int y, int z, - double& W, double& E, double& S, double& N, - double& F, double& B, double& C); - - void getBoundaryStencil(int idx, - double& W, double& E, double& S, double& N, - double& F, double& B, double& C); - - void getNeighbours(int x, int y, int z, - double& W, double& E, double& S, double& N, double& F, double& B); - - void getNeighbours(int idx, - double& W, double& E, double& S, double& N, double& F, double& B); - - void getCoord(int idx, int& i, int& j, int& k) - { - int ijk = CoordMap[idx]; - k = ijk / (nx*ny); - j = (ijk - k*nx*ny) / ny; - i = (ijk - k*ny*nz) - j*nx; - } - - inline int getIdx(int i, int j, int k) { - if(isInside(i,j,k)) - return IdxMap[toCoordIdx(i,j,k)]; - else - return -1; - } -#endif - -protected: - - /** Setup the parameters for the SAAMG preconditioner. - */ - inline void SetupMLList() { - ML_Epetra::SetDefaults("SA", MLList_m); - MLList_m.set("max levels", 8); - MLList_m.set("increasing or decreasing", "increasing"); - - // we use a V-cycle - MLList_m.set("prec type", "MGV"); - - // uncoupled aggregation is used (every processor aggregates - // only local data) - MLList_m.set("aggregation: type", "Uncoupled"); - - // smoother related parameters - MLList_m.set("smoother: type","Chebyshev"); - MLList_m.set("smoother: sweeps", 3); - MLList_m.set("smoother: pre or post", "both"); - - // on the coarsest level we solve with Tim Davis' implementation of - // Gilbert-Peierl's left-looking sparse partial pivoting algorithm, - // with Eisenstat & Liu's symmetric pruning. Gilbert's version appears - // as \c [L,U,P]=lu(A) in MATLAB. It doesn't exploit dense matrix - // kernels, but it is the only sparse LU factorization algorithm known to be - // asymptotically optimal, in the sense that it takes time proportional to the - // number of floating-point operations. - MLList_m.set("coarse: type", "Amesos-KLU"); - - //XXX: or use Chebyshev coarse level solver - // SEE PAPER FOR EVALUATION KLU vs. Chebyshev - //MLList.set("coarse: sweeps", 10); - //MLList.set("coarse: type", "Chebyshev"); - - // turn on all output - if(verbose_m) - MLList_m.set("ML output", 101); - else - MLList_m.set("ML output", 10); - - // heuristic for max coarse size depending on number of processors - int coarsest_size = std::max(Comm_m.NumProc() * 10, 1024); - MLList_m.set("coarse: max size", coarsest_size); - } - - -public: - - void setHr(const std::vector& hr) { this->hr = hr; } -}; - -#endif diff --git a/Tutorials/AMR_Trilinos_C/Solver.cpp b/Tutorials/AMR_Trilinos_C/Solver.cpp deleted file mode 100644 index fcd7c526f..000000000 --- a/Tutorials/AMR_Trilinos_C/Solver.cpp +++ /dev/null @@ -1,309 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "Solver.H" - -void Solver::SetupProblem(const Box& domain, MultiFab& rhs, MultiFab& soln) -{ - - // Now we create the map - // Note: 1) it is important to set numMyGridPoints = 0 outside the MFIter loop - // 2) "bx" here is the cell-centered non-overlapping box - int numMyGridPoints = 0; - std::vector MyGlobalElements; - - for (MFIter mfi(rhs); mfi.isValid(); ++mfi) - { - const Box& bx = mfi.validbox(); - const int* bx_lo = bx.loVect(); - const int* bx_hi = bx.hiVect(); - - for(int i = bx_lo[0]; i<= bx_hi[0]; i++) - for(int j = bx_lo[1]; j<= bx_hi[1]; j++) - { -#if (BL_SPACEDIM == 3) - for(int k = bx_lo[2]; k<= bx_hi[2]; k++) -#endif - if (isInside(D_DECL(i,j,k))) - { - MyGlobalElements.push_back(getIdx(D_DECL(i,j,k))); - numMyGridPoints++; - } - } - } - - // Define the Map - Map = new Epetra_Map(-1, numMyGridPoints, &MyGlobalElements[0], 0, Comm_m); - - // Allocate the RHS and LHS with the new Epetra Map - RHS = rcp(new Epetra_Vector(*Map)); - LHS = rcp(new Epetra_Vector(*Map)); - - // Note: it is important to set idx = 0 outside the MFIter loop - int idx = 0; - - // Copy the values from rhs into RHS->Values() - // Copy the values from soln into LHS->Values() - // Note: "bx" here is the cell-centered non-overlapping box - for (MFIter mfi(rhs); mfi.isValid(); ++mfi) - { - const Box& bx = mfi.validbox(); - const int* bx_lo = bx.loVect(); - const int* bx_hi = bx.hiVect(); - - FArrayBox& fab_rhs = rhs[mfi]; - FArrayBox& fab_lhs = soln[mfi]; - - for(int i = bx_lo[0]; i <= bx_hi[0]; i++) - for(int j = bx_lo[1]; j <= bx_hi[1]; j++) - { -#if (BL_SPACEDIM == 3) - for(int k = bx_lo[2]; k<= bx_hi[2]; k++) -#endif - if (isInside(D_DECL(i,j,k))) - { - IntVect cells(D_DECL(i,j,k)); - RHS->Values()[idx ] = fab_rhs(cells,0); - LHS->Values()[idx++] = fab_lhs(cells,0); - } - } - } - - if(verbose_m) - this->printLoadBalanceStats(); - - A = rcp(new Epetra_CrsMatrix(Copy, *Map, 7)); - ComputeStencil(); -} - -void Solver::extrapolateLHS() -{ -// Aitken-Neville -// Pi0 (x) := yi , i = 0 : n -// Pik (x) := (x − xi ) Pi+1,k−1(x) − (x − xi+k ) Pi,k−1(x) /(xi+k − xi ) -// k = 1, . . . , n, i = 0, . . . , n − k. - - std::deque< Epetra_Vector >::iterator it = OldLHS.begin(); - - if(nLHS_m == 0) - LHS->PutScalar(1.0); - else if(OldLHS.size() == 1) - *LHS = *it; - else if(OldLHS.size() == 2){ - LHS->Update (2.0, *it++, -1.0, *it, 0.0); - } - else if(OldLHS.size() > 0){ - int n = OldLHS.size(); - for(int i=0; iUpdate(-(i+1)/(float)k, *(*P)(i+1), (i+k+1)/(float)k);//TODO test - } - } - *LHS = *(*P)(0); - } - else - std::cout << "Invalid number of old LHS: " + OldLHS.size() << std::endl; -} - -void Solver::CopySolution(Box& domain, MultiFab& soln) -{ - int idx = 0; - - for (MFIter mfi(soln); mfi.isValid(); ++mfi) - { - const Box& bx = mfi.validbox(); - const int* bx_lo = bx.loVect(); - const int* bx_hi = bx.hiVect(); - - FArrayBox& fab_lhs = soln[mfi]; - - for(int i = bx_lo[0]; i <= bx_hi[0]; i++) - for(int j = bx_lo[1]; j <= bx_hi[1]; j++) -#if (BL_SPACEDIM == 3) - for(int k = bx_lo[2]; k<= bx_hi[2]; k++) -#endif - if (isInside(D_DECL(i,j,k))) - { - IntVect cells(D_DECL(i,j,k)); - fab_lhs(cells,0) = LHS->Values()[idx++]; - } - } -} - -int Solver::getNumIters() -{ - return solver->getNumIters(); -} - -void Solver::Compute() -{ - //LHS->Random(); - //LHS->PutScalar(1.0); - extrapolateLHS(); - - // create the preconditioner object and compute hierarchy - // true -> create the multilevel hirarchy - // ML allows the user to cheaply recompute the preconditioner. You can - // simply uncomment the following line: - // - // MLPrec->ReComputePreconditioner(); - // - // It is supposed that the linear system matrix has different values, but - // **exactly** the same structure and layout. The code re-built the - // hierarchy and re-setup the smoothers and the coarse solver using - // already available information on the hierarchy. A particular - // care is required to use ReComputePreconditioner() with nonzero - // threshold. - - if(MLPrec == Teuchos::null) // first repetition we need to create a new preconditioner - MLPrec = rcp(new ML_Epetra::MultiLevelPreconditioner(*A, MLList_m)); - else if(isReusingHierarchy_m) - MLPrec->ReComputePreconditioner(); - else if(isReusingPreconditioner_m) { - // do nothing since we are reusing old preconditioner - } else { // create a new preconditioner in every repetition - delete MLPrec.get();//MLPrec now RCP => delete??? TODO - MLPrec = rcp(new ML_Epetra::MultiLevelPreconditioner(*A, MLList_m)); - } - - // Setup problem - problem.setOperator(A); - problem.setLHS(LHS); - problem.setRHS(RHS); - prec = rcp(new Belos::EpetraPrecOp(MLPrec)); - problem.setLeftPrec(prec); - solver->setParameters(rcp(&belosList, false)); - solver->setProblem(rcp(&problem,false)); - if(!problem.isProblemSet()){ - if (problem.setProblem() == false) { - std::cout << std::endl << "ERROR: Belos::LinearProblem failed to set up correctly!" << std::endl; - } - } - - - // Solve problem - // Timer - MPI_Barrier(MPI_COMM_WORLD); - Real dRunTime1 = ParallelDescriptor::second(); - - solver->solve(); - - // Timer - MPI_Barrier(MPI_COMM_WORLD); - const int IOProc = ParallelDescriptor::IOProcessorNumber(); - Real dRunTime2 = ParallelDescriptor::second() - dRunTime1; - - ParallelDescriptor::ReduceRealMax(dRunTime2,IOProc); - - if (ParallelDescriptor::IOProcessor()) - { - std::cout << "Run time = " << dRunTime2 << std::endl; - } - - // Store new LHS in OldLHS - OldLHS.push_front(*(LHS.get())); - if(OldLHS.size() > nLHS_m) OldLHS.pop_back(); - std::cout<<"#OldLHS: "<NumMyElements(); - int* MyGlobalElements = Map->MyGlobalElements(); - - std::vector Values(6); - std::vector Indices(6); - - printf("NumMyElements = %d\n",NumMyElements); - for (int i = 0; i < NumMyElements; i++) - { - int NumEntries = 0; - -#if (BL_SPACEDIM == 2) - double WV, EV, SV, NV, CV; - // use boundary object to get stencil values - getBoundaryStencil(MyGlobalElements[i], WV, EV, SV, NV, CV); - - double W, E, S, N; - getNeighbours(MyGlobalElements[i], W, E, S, N); -#elif (BL_SPACEDIM == 3) - double WV, EV, SV, NV, FV, BV, CV; - // use boundary object to get stencil values - getBoundaryStencil(MyGlobalElements[i], WV, EV, SV, NV, FV, BV, CV); - - double W, E, S, N, F, B; - getNeighbours(MyGlobalElements[i], W, E, S, N, F, B); -#endif - - if(E != -1) { - Indices[NumEntries] = E; - Values[NumEntries++] = EV; - } - if(W != -1) { - Indices[NumEntries] = W; - Values[NumEntries++] = WV; - } - if(S != -1) { - Indices[NumEntries] = S; - Values[NumEntries++] = SV; - } - if(N != -1) { - Indices[NumEntries] = N; - Values[NumEntries++] = NV; - } -#if (BL_SPACEDIM == 3) - if(F != -1) { - Indices[NumEntries] = F; - Values[NumEntries++] = FV; - } - if(B != -1) { - Indices[NumEntries] = B; - Values[NumEntries++] = BV; - } -#endif - - // put the off-diagonal entries - A->InsertGlobalValues(MyGlobalElements[i], NumEntries, &Values[0], &Indices[0]); - - // put in the diagonal entry - A->InsertGlobalValues(MyGlobalElements[i], 1, &CV, MyGlobalElements + i); - } - - A->FillComplete(); - A->OptimizeStorage(); -} - -void Solver::printLoadBalanceStats() { - - //compute some load balance statistics - size_t myNumPart = Map->NumMyElements(); - size_t NumPart = Map->NumGlobalElements() * 1.0/Comm_m.NumProc(); - double imbalance = 1.0; - if(myNumPart >= NumPart) - imbalance += (myNumPart-NumPart)/NumPart; - else - imbalance += (NumPart-myNumPart)/NumPart; - - double max=0.0, min=0.0, avg=0.0; - int minn=0, maxn=0; - MPI_Reduce(&imbalance, &min, 1, MPI_DOUBLE, MPI_MIN, 0, MPI_COMM_WORLD); - MPI_Reduce(&imbalance, &max, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD); - MPI_Reduce(&imbalance, &avg, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); - MPI_Reduce(&myNumPart, &minn, 1, MPI_INT, MPI_MIN, 0, MPI_COMM_WORLD); - MPI_Reduce(&myNumPart, &maxn, 1, MPI_INT, MPI_MAX, 0, MPI_COMM_WORLD); - - avg /= Comm_m.NumProc(); - if(Comm_m.MyPID() == 0) cout << "LBAL min = " << min << ", max = " << max << ", avg = " << avg << endl; - if(Comm_m.MyPID() == 0) cout << "min nr gridpoints = " << minn << ", max nr gridpoints = " << maxn << endl; - -} diff --git a/Tutorials/AMR_Trilinos_C/SolverBoundary.cpp b/Tutorials/AMR_Trilinos_C/SolverBoundary.cpp deleted file mode 100644 index ce38537da..000000000 --- a/Tutorials/AMR_Trilinos_C/SolverBoundary.cpp +++ /dev/null @@ -1,185 +0,0 @@ -#include -#include -#include -#include -#include "Solver.H" - -using namespace std; - -void Solver::InitializeDomainGeometry() -{ - - IdxMap.clear(); - CoordMap.clear(); - - // Build a index and coordinate map - int idx = 0; - for(int i=0; i < nx; i++) - for(int j=0; j < ny; j++) - { -#if (BL_SPACEDIM == 3) - for(int k=0; k < nz; k++) -#endif - if(isInside(D_DECL(i,j,k))) - { - IdxMap[toCoordIdx(D_DECL(i,j,k))] = idx++; - } - } - - idx = 0; - for(int i=0; i < nx; i++) - for(int j=0; j < ny; j++) - { -#if (BL_SPACEDIM == 3) - for (int k=0; k < nz; k++) -#endif - if(isInside(D_DECL(i,j,k))) - CoordMap[idx++] = toCoordIdx(D_DECL(i,j,k)); - } -} - -#if (BL_SPACEDIM == 2) -void Solver::getBoundaryStencil(int i, int j, - double& W, double& E, double& S, double& N, - double& C) -{ - ConstantInterpolation(i,j,W,E,S,N,C); - - // stencil center value has to be positive! - assert(C > 0); -} - -void Solver::getBoundaryStencil(int idx, double& W, double& E, double& S, double& N, - double& C) -{ - int i = -100000 ,j = -100000; - getCoord(idx,i,j); - getBoundaryStencil(i,j,W,E,S,N,C); -} - -void Solver::getNeighbours(int idx, double& W, double& E, double& S, double& N) -{ - int i = 0, j = 0; - getCoord(idx,i,j); - getNeighbours(i,j,W,E,S,N); -} - -#elif (BL_SPACEDIM == 3) -void Solver::getBoundaryStencil(int i, int j, int k, - double& W, double& E, double& S, double& N, - double& F, double& B, double& C) -{ - ConstantInterpolation(i,j,k,W,E,S,N,F,B,C); - - // stencil center value has to be positive! - assert(C > 0); -} - -void Solver::getBoundaryStencil(int idx, double& W, double& E, double& S, double& N, - double& F, double& B, double& C) -{ - int i = 0, j = 0, k = 0; - getCoord(idx,i,j,k); - getBoundaryStencil(i,j,k,W,E,S,N,F,B,C); -} - -void Solver::getNeighbours(int idx, double& W, double& E, double& S, double& N, - double& F, double& B) -{ - int i = 0, j = 0, k = 0; - getCoord(idx,i,j,k); - getNeighbours(i,j,k,W,E,S,N,F,B); -} -#endif - -void Solver::getNeighbours(int i, int j, -#if (BL_SPACEDIM == 3) - int k, -#endif - double& W, double& E, double& S, double& N -#if (BL_SPACEDIM == 3) - ,double& F, double& B -#endif - ) -{ - if(i > 0) - W = getIdx(D_DECL(i-1,j,k)); - else - W = -1; - if(i < nx-1) - E = getIdx(D_DECL(i+1,j,k)); - else - E = -1; - - if(j < ny-1) - N = getIdx(D_DECL(i,j+1,k)); - else - N = -1; - if(j > 0) - S = getIdx(D_DECL(i,j-1,k)); - else - S = -1; - -#if (BL_SPACEDIM == 3) - if(k > 0) - F = getIdx(i,j,k-1); - else - F = -1; - if(k < nz-1) - B = getIdx(i,j,k+1); - else - B = -1; -#endif -} - -void Solver::ConstantInterpolation(int x, int y, -#if (BL_SPACEDIM == 3) - int z, -#endif - double& W, double& E, double& S, double& N, -#if (BL_SPACEDIM == 3) - double& F, double& B, -#endif - double& C) -{ - W = -1./(hr[0]*hr[0]); - E = -1./(hr[0]*hr[0]); - N = -1./(hr[1]*hr[1]); - S = -1./(hr[1]*hr[1]); - - // we are a right boundary point - if(!isInside(D_DECL(x+1,y,z))) { - E = 0.0; - } - - // we are a left boundary point - if(!isInside(D_DECL(x-1,y,z))) { - W = 0.0; - } - - // we are a upper boundary point - if(!isInside(D_DECL(x,y+1,z))) { - N = 0.0; - } - - // we are a lower boundary point - if(!isInside(D_DECL(x,y-1,z))) { - S = 0.0; - } - C = 2./(hr[0]*hr[0]) + 2./(hr[1]*hr[1]); - -#if (BL_SPACEDIM == 3) - F = -1./(hr[2]*hr[2]); - B = -1./(hr[2]*hr[2]); - // we are a front boundary point - if(!isInside(x,y,z+1)) { - F = 0.0; - } - - // we are a back boundary point - if(!isInside(x,y,z-1)) { - B = 0.0; - } - C = C + 2./(hr[2]*hr[2]); -#endif -} diff --git a/Tutorials/AMR_Trilinos_C/driver.cpp b/Tutorials/AMR_Trilinos_C/driver.cpp deleted file mode 100644 index b669167b1..000000000 --- a/Tutorials/AMR_Trilinos_C/driver.cpp +++ /dev/null @@ -1,219 +0,0 @@ -//stand alone solver for opal space charges calculation - -#include "ml_include.h" - -//the following code cannot be compiled without these ML Trilinos packages -#if defined(HAVE_ML_EPETRA) && defined(HAVE_ML_TEUCHOS) && defined(HAVE_ML_AZTECOO) - -#include "Solver.H" - -#include -#include -#include -#include -#include "Epetra_MpiComm.h" -#include -#include - -#include -#include -#include - -using namespace Teuchos; - -void DumpMF (std::string filename, MultiFab& soln, Box& domain, std::vector hr); -void compute_rhs ( MultiFab& rhs, Box& domain, std::vector hr); - -double x_center, y_center, z_center; - -int main(int argc, char *argv[]) { - - BoxLib::Initialize(argc,argv); - Epetra_MpiComm Comm(MPI_COMM_WORLD); - - // These don't need default values because they must be read from the inputs file. - int nx, ny; - double hx, hy; -#if (BL_SPACEDIM == 3) - int nz; - double hz; -#endif - bool verbose; - - // Default values - int maxiters = 1000; - int numBlocks = 1; - int recycleBlocks = 0; - int maxOldLHS = 1; - double tol = 1e-8; - - ParmParse pp; - - pp.get("nx", nx); - pp.get("ny", ny); -#if (BL_SPACEDIM == 3) - pp.get("nz", nz); -#endif - - pp.get("tol", tol); - pp.get("maxiters", maxiters); - pp.get("numBlocks", numBlocks); - pp.get("recycleBlocks", recycleBlocks); - pp.get("maxOldLHS", maxOldLHS); - - pp.get("verbose", verbose); - - // Define the problem size to be a [0,1] x [0,1] x [0,1] box. - hx = 1.0 / double(nx); - hy = 1.0 / double(ny); - - x_center = 0.5; - y_center = 0.5; - -#if (BL_SPACEDIM == 3) - hz = 1.0 / double(nz); - z_center = 0.5; -#endif - -#if (BL_SPACEDIM == 2) - std::vector nr(2); - std::vector hr(2); - nr[0] = nx; nr[1] = ny; - hr[0] = hx; hr[1] = hy; -#elif (BL_SPACEDIM == 3) - std::vector nr(3); - std::vector hr(3); - nr[0] = nx; nr[1] = ny; nr[2] = nz; - hr[0] = hx; hr[1] = hy; hr[2] = hz; -#endif - - int max_grid_size; - pp.get("max_grid_size",max_grid_size); - - // Define a single box covering the domain - IntVect dom_lo(D_DECL(0,0,0)); - IntVect dom_hi(D_DECL(nr[0]-1,nr[1]-1,nr[2]-1)); - Box domain(dom_lo,dom_hi); - - // Initialize the boxarray "bs" from the single box "bx" - BoxArray bs(domain); - - // Break up boxarray "bs" into chunks no larger than "max_grid_size" along a direction - bs.maxSize(max_grid_size); - - int ncomps = 1; - int nghost = 0; - MultiFab rhs(bs,ncomps,nghost); - MultiFab soln(bs,ncomps,nghost); - - // Set the initial guess to 1 - soln.setVal(0.); - - compute_rhs(rhs,domain,hr); - - // This sets the boundary conditions to be periodic or not - int is_per[BL_SPACEDIM]; - for (int n = 0; n < BL_SPACEDIM; n++) is_per[n] = 0; - - if (ParallelDescriptor::IOProcessor()) { - std::cout << "BL_SPACEDIM : " << BL_SPACEDIM << std::endl; -#if (BL_SPACEDIM == 2) - std::cout << "nr = " << nr[0] << " " << nr[1] << std::endl; - std::cout << "hr = " << hr[0] << " " << hr[1] << std::endl; -#elif (BL_SPACEDIM == 3) - std::cout << "nr = " << nr[0] << " " << nr[1] << " " << nr[2] << std::endl; - std::cout << "hr = " << hr[0] << " " << hr[1] << " " << hr[2] << std::endl; -#endif - std::cout << "verbose: " << verbose << std::endl; - std::cout << "Max_grid_size : " << max_grid_size << std::endl; - std::cout << "Number of grids : " << bs.size() << std::endl; - } - - Solver* s = new Solver(domain, hr, Comm, verbose, - tol, maxiters, numBlocks, recycleBlocks, maxOldLHS, - rhs, soln); - - s->Compute(); - s->CopySolution(domain,soln); - DumpMF("SOLN",soln,domain,hr); - DumpMF("RHS", rhs ,domain,hr); - - delete s; - - BoxLib::Finalize(); - exit(EXIT_SUCCESS); -} - -void compute_rhs(MultiFab& rhs, Box& domain, std::vector hr) -{ - // Define the RHS - double rsq; - - const int* dom_lo = domain.loVect(); - const int* dom_hi = domain.hiVect(); - - // Initialize the RHS to zero everywhere. - rhs.setVal(0.0); - - Real radius_sq = 0.25*0.25; - - // Note that the values are NODE-based - for (MFIter mfi(rhs); mfi.isValid(); ++mfi) - { - const Box& bx = mfi.validbox(); - const int* bx_lo = bx.loVect(); - const int* bx_hi = bx.hiVect(); - FArrayBox& fab = rhs[mfi.index()]; - for(int i = bx_lo[0]; i<= bx_hi[0]; i++) - for(int j = bx_lo[1]; j<= bx_hi[1]; j++) - if (i > dom_lo[0] && i < dom_hi[0] && j > dom_lo[1] && j < dom_hi[1]) - { -#if (BL_SPACEDIM == 3) - for(int k = bx_lo[2]; k<= bx_hi[2]; k++) - if (k > dom_lo[2] && k < dom_hi[2]) -#endif - { - double xx = (i+0.5)*hr[0] - x_center; - double yy = (j+0.5)*hr[1] - y_center; - rsq = xx*xx+yy*yy; -#if (BL_SPACEDIM == 3) - double zz = (k+0.5)*hr[2] - z_center; - rsq = rsq + zz*zz; -#endif - IntVect cells(D_DECL(i,j,k)); - if(rsq < radius_sq) - fab(cells,0) = 1.0; - - } - } - } -} - -void -DumpMF(std::string filename, MultiFab& mf, Box& domain, std::vector hr) -{ - int output_type = 2; - - if (output_type == 1) - { - VisMF::Write(mf,filename); - } - else if (output_type == 2) - { - // This is all in order to define a Geometry object which is needed for writing the plotfiles - int coord = 0; - int is_per[BL_SPACEDIM]; - for (int i = 0; i < BL_SPACEDIM; i++) is_per[i] = 0; - RealBox real_box; - for (int n = 0; n < BL_SPACEDIM; n++) { - real_box.setLo(n, 0.0); - real_box.setHi(n, 1.0); - } - - Geometry geom(domain,&real_box,coord,is_per); - - writePlotFile(filename, mf, geom); - } -} - -#endif /* #if defined(HAVE_ML_EPETRA) && defined(HAVE_ML_TEUCHOS) && defined(HAVE_ML_AZTECOO) */ diff --git a/Tutorials/AMR_Trilinos_C/inputs b/Tutorials/AMR_Trilinos_C/inputs deleted file mode 100644 index e143b88ac..000000000 --- a/Tutorials/AMR_Trilinos_C/inputs +++ /dev/null @@ -1,19 +0,0 @@ - -# Domain size -nx = 32 # number of grid points along the x axis -ny = 32 # number of grid points along the y axis -nz = 32 # number of grid points along the z axis - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -max_grid_size = 32 - -# Solver specifications -tol = 1e-8 # tolerance -maxiters = 1000 # maxiters -numBlocks = 1 # Maximum number of blocks in Krylov space -recycleBlocks = 0 # Number of vectors in recycle space -maxOldLHS = 1 # Number of stored LHS for extrapolating the next starting vector - -# Verbosity -verbose = false # set to true to get more verbosity diff --git a/Tutorials/AMR_Trilinos_C/writePlotFile.H b/Tutorials/AMR_Trilinos_C/writePlotFile.H deleted file mode 100644 index 2387bb50e..000000000 --- a/Tutorials/AMR_Trilinos_C/writePlotFile.H +++ /dev/null @@ -1,13 +0,0 @@ - -#include -#include - -#include -#include -#include -#include - -void -writePlotFile (const std::string& dir, - const MultiFab& mf, - const Geometry& geom); diff --git a/Tutorials/AMR_Trilinos_C/writePlotFile.cpp b/Tutorials/AMR_Trilinos_C/writePlotFile.cpp deleted file mode 100644 index ecbbbed94..000000000 --- a/Tutorials/AMR_Trilinos_C/writePlotFile.cpp +++ /dev/null @@ -1,124 +0,0 @@ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -void -writePlotFile (const std::string& dir, - const MultiFab& mf, - const Geometry& geom) -{ - // - // Only let 64 CPUs be writing at any one time. - // - VisMF::SetNOutFiles(64); - // - // Only the I/O processor makes the directory if it doesn't already exist. - // - if (ParallelDescriptor::IOProcessor()) - if (!BoxLib::UtilCreateDirectory(dir, 0755)) - BoxLib::CreateDirectoryFailed(dir); - // - // Force other processors to wait till directory is built. - // - ParallelDescriptor::Barrier(); - - std::string HeaderFileName = dir + "/Header"; - - VisMF::IO_Buffer io_buffer(VisMF::IO_Buffer_Size); - - std::ofstream HeaderFile; - - HeaderFile.rdbuf()->pubsetbuf(io_buffer.dataPtr(), io_buffer.size()); - - if (ParallelDescriptor::IOProcessor()) - { - // - // Only the IOProcessor() writes to the header file. - // - HeaderFile.open(HeaderFileName.c_str(), std::ios::out|std::ios::trunc|std::ios::binary); - if (!HeaderFile.good()) - BoxLib::FileOpenFailed(HeaderFileName); - HeaderFile << "NavierStokes-V1.1\n"; - - HeaderFile << mf.nComp() << '\n'; - - for (int ivar = 1; ivar <= mf.nComp(); ivar++) { - HeaderFile << "Variable " << ivar << "\n"; - } - - HeaderFile << BL_SPACEDIM << '\n'; - HeaderFile << 0 << '\n'; - HeaderFile << 0 << '\n'; - for (int i = 0; i < BL_SPACEDIM; i++) - HeaderFile << geom.ProbLo(i) << ' '; - HeaderFile << '\n'; - for (int i = 0; i < BL_SPACEDIM; i++) - HeaderFile << geom.ProbHi(i) << ' '; - HeaderFile << '\n'; - HeaderFile << '\n'; - HeaderFile << geom.Domain() << ' '; - HeaderFile << '\n'; - HeaderFile << 0 << ' '; - HeaderFile << '\n'; - for (int k = 0; k < BL_SPACEDIM; k++) - HeaderFile << geom.CellSize()[k] << ' '; - HeaderFile << '\n'; - HeaderFile << geom.Coord() << '\n'; - HeaderFile << "0\n"; - } - // Build the directory to hold the MultiFab at this level. - // The name is relative to the directory containing the Header file. - // - static const std::string BaseName = "/Cell"; - - std::string Level = BoxLib::Concatenate("Level_", 0, 1); - // - // Now for the full pathname of that directory. - // - std::string FullPath = dir; - if (!FullPath.empty() && FullPath[FullPath.length()-1] != '/') - FullPath += '/'; - FullPath += Level; - // - // Only the I/O processor makes the directory if it doesn't already exist. - // - if (ParallelDescriptor::IOProcessor()) - if (!BoxLib::UtilCreateDirectory(FullPath, 0755)) - BoxLib::CreateDirectoryFailed(FullPath); - // - // Force other processors to wait till directory is built. - // - ParallelDescriptor::Barrier(); - - if (ParallelDescriptor::IOProcessor()) - { - HeaderFile << 0 << ' ' << mf.boxArray().size() << ' ' << 0 << '\n'; - HeaderFile << 0 << '\n'; - - for (int i = 0; i < mf.boxArray().size(); ++i) - { - RealBox loc = RealBox(mf.boxArray()[i],geom.CellSize(),geom.ProbLo()); - for (int n = 0; n < BL_SPACEDIM; n++) - HeaderFile << loc.lo(n) << ' ' << loc.hi(n) << '\n'; - } - - std::string PathNameInHeader = Level; - PathNameInHeader += BaseName; - HeaderFile << PathNameInHeader << '\n'; - } - // - // Use the Full pathname when naming the MultiFab. - // - std::string TheFullPath = FullPath; - TheFullPath += BaseName; - - VisMF::Write(mf,TheFullPath); -} diff --git a/Tutorials/Chemotaxis_F/GNUmakefile b/Tutorials/Chemotaxis_F/GNUmakefile deleted file mode 100644 index 109aa1620..000000000 --- a/Tutorials/Chemotaxis_F/GNUmakefile +++ /dev/null @@ -1,27 +0,0 @@ -# BOXLIB_HOME defines the directory in which we will find all the BoxLib code -# If you set BOXLIB_HOME as an environment variable, this line will be ignored -BOXLIB_HOME ?= $(HOME)/Development/BoxLib/ - -NDEBUG := -MPI := -OMP := -PROF := -COMP := gfortran -MKVERBOSE := - -include $(BOXLIB_HOME)/Tools/F_mk/GMakedefs.mak - -include ./GPackage.mak -VPATH_LOCATIONS += . - -include $(BOXLIB_HOME)/Src/F_BaseLib/GPackage.mak -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib - -#include $(BOXLIB_HOME)/Src/Python/GPackage.mak -#all: $(PYBOXLIBS) - -main.$(suf).exe: $(objects) - $(LINK.f90) -o main.$(suf).exe $(objects) $(libraries) - -include $(BOXLIB_HOME)/Tools/F_mk/GMakerules.mak -#include $(BOXLIB_HOME)/Src/Python/GMakerules.mak diff --git a/Tutorials/Chemotaxis_F/GPackage.mak b/Tutorials/Chemotaxis_F/GPackage.mak deleted file mode 100644 index 3c3849a04..000000000 --- a/Tutorials/Chemotaxis_F/GPackage.mak +++ /dev/null @@ -1,8 +0,0 @@ -f90sources += dtypes.f90 -f90sources += main.f90 -f90sources += chemotaxis.f90 -f90sources += kernels.f90 -f90sources += write_plotfile.f90 -f90sources += advance.f90 -f90sources += sdcquad.f90 -f90sources += mt19937ar.f90 diff --git a/Tutorials/Chemotaxis_F/README b/Tutorials/Chemotaxis_F/README deleted file mode 100644 index 234f02d21..000000000 --- a/Tutorials/Chemotaxis_F/README +++ /dev/null @@ -1,52 +0,0 @@ -Chemotaxis -========== - -The description of the chemotaxis model presented here follows Hillen -and Painter's "A user's guide to PDE models for chemotaxis", -J. Math. Biol., vol. 58, no. 1, pp. 183-217, 2009. - -The general form of the chemotaxis model that we will consider here -is - - u_t = ∇·( D(u) ∇u - A(u) B(v) ∇v ) + f(u), - v_t = ∇·( ∇v ) + u g(u) - v - -where u is the cell (organism) density and v is the concentration of -the chemical signal. The minimal model is given by - - D(u) = 1, A(u) = u, B(v) = Χ, f(u) = 0, and g(u) = 1 - -so that the resulting system is - - u_t = ∇·( ∇u - Χ u ∇v ), - v_t = ∇·( ∇v ) + u - v. - -More complicated models are constructed by adding: - -1. Signal dependent sensitivity (receptor binding) - - B(v) = Χ / (1 + α v)**2 - -2. Density dependent sensitivity (volume-filling) - - A(u) = u (1 - u/γ) - -3. Non-linear diffusion - - D(u) = D u^n - -4. Non-linear signal kinetics (saturating chemical production) - - g(u) = 1 / (1 + φ u) - -5. Cell growth (logistic growth) - - f(u) = r u (1 - u) - - -Both the cell density u and chemical concentration v can be zero, and -therefore any high-order finite-volume discretization used must -preserve positivity. As such, we will use a first-order scheme to -avoid introducing new extrema and/or negative values into the -solution. - diff --git a/Tutorials/Chemotaxis_F/advance.f90 b/Tutorials/Chemotaxis_F/advance.f90 deleted file mode 100644 index ed07b53c2..000000000 --- a/Tutorials/Chemotaxis_F/advance.f90 +++ /dev/null @@ -1,226 +0,0 @@ -module advance_module - - use multifab_module - use chemotaxis_kernels - use dtypes_module - use sdcquad_module - use write_plotfile_module - - implicit none - -contains - - subroutine advance_fe(q, dt, ctx) - - type(multifab), intent(inout) :: q - real(dp_t), intent(in) :: dt - type(cht_ctx_t), intent(inout) :: ctx - - integer :: nc - type(multifab) :: f - type(layout) :: la - - nc = ncomp(q) - la = get_layout(q) - - ! sync q and fill ghost cells - call fill_boundary(q) - - ! build flux multifab - call build(f, la, nc, 0) - - ! compute forward euler update - call dqdt(q, ctx, f) - call saxpy(q, dt, f) - - ! cleanup - call destroy(f) - - end subroutine advance_fe - - - subroutine advance_sdc(q, dt, ctx, sdc) - - type(multifab), intent(inout) :: q - real(dp_t), intent(inout) :: dt - type(cht_ctx_t), intent(inout) :: ctx - type(sdcquad), intent(in) :: sdc - - integer :: k, m, nc, ng - double precision :: res, res_local - type(layout) :: la - type(multifab) :: qSDC(sdc%nnodes), fSDC(sdc%nnodes) - - nc = ncomp(q) - ng = nghost(q) - la = get_layout(q) - - ! set provisional solution - do m = 1, sdc%nnodes - call build(qSDC(m), la, nc, ng) - call build(fSDC(m), la, nc, 0) - end do - - call copy(qSDC(1), q) - call dqdt(qSDC(1), ctx, fSDC(1)) - - do m = 2, sdc%nnodes - call copy(qSDC(m), qSDC(1)) - call copy(fSDC(m), fSDC(1)) - end do - - res = 0.0d0 - - ! perform sdc iterations - do k = 1, sdc%iters - call sdc_sweep(qSDC, fSDC, dt, ctx, sdc) - - if (sdc%tol_residual > 0.d0) then - res_local = sdc_residual(qSDC, fSDC, dt, sdc) - call parallel_reduce(res, res_local, MPI_MAX) - - if (res < sdc%tol_residual) then - exit - end if - end if - end do - - print *, "SDC: iters:", k, "residual:", res - - call copy(q, qSDC(sdc%nnodes)) - - do m = 1, sdc%nnodes - call destroy(qSDC(m)) - call destroy(fSDC(m)) - end do - - end subroutine advance_sdc - - ! - ! Perform one SDC sweep. - ! - subroutine sdc_sweep (qSDC,fSDC,dt,ctx,sdc) - type(sdcquad), intent(in ) :: sdc - type(multifab), intent(inout) :: qSDC(sdc%nnodes), fSDC(sdc%nnodes) - double precision, intent(in ) :: dt - type(cht_ctx_t), intent(in ) :: ctx - - integer :: m, n, nc - type(multifab) :: S(sdc%nnodes-1) - type(layout) :: la - - double precision :: dtsdc(sdc%nnodes-1) - - la = get_layout(qSDC(1)) - nc = ncomp(qSDC(1)) - - ! - ! Compute integrals (compact forward Euler) - ! - do m = 1, sdc%nnodes-1 - call build(S(m), la, nc, 0) - call setval(S(m), 0.0d0) - do n = 1, sdc%nnodes - call saxpy(S(m), sdc%smats(m,n,1), fSDC(n)) - end do - end do - - ! - ! Perform sub-step correction - ! - dtsdc = dt * (sdc%nodes(2:sdc%nnodes) - sdc%nodes(1:sdc%nnodes-1)) - do m = 1, sdc%nnodes-1 - - ! U(m+1) = U(m) + dt dUdt(m) + dt S(m) - - call copy(qSDC(m+1), qSDC(m)) - call saxpy(qSDC(m+1), dtsdc(m), fSDC(m)) - call saxpy(qSDC(m+1), dt, S(m)) - - call dqdt(qSDC(m+1), ctx, fSDC(m+1)) - - end do - - - do m = 1, sdc%nnodes-1 - call destroy(S(m)) - end do - - end subroutine sdc_sweep - - - ! - ! Compute SDC residual. - ! - function sdc_residual (qSDC,fSDC,dt,sdc) result(res) - real(dp_t) :: res - type(sdcquad), intent(in ) :: sdc - type(multifab), intent(inout) :: qSDC(sdc%nnodes), fSDC(sdc%nnodes) - real(dp_t), intent(in ) :: dt - - integer :: m, n, nc - type(multifab) :: R - type(layout) :: la - - la = get_layout(qSDC(1)) - nc = ncomp(qSDC(1)) - - ! - ! Compute integral - ! - call build(R, la, nc, 0) - call copy(R, qSDC(1)) - - do m = 1, sdc%nnodes-1 - do n = 1, sdc%nnodes - call saxpy(R, dt*sdc%smat(m,n), fSDC(n)) - end do - end do - - call saxpy(R, -1.0d0, qSDC(sdc%nnodes)) - - res = norm_inf(R) - - call destroy(R) - - end function sdc_residual - - - - subroutine dqdt(q,ctx,f) - type(multifab), intent(inout) :: q, f - type(cht_ctx_t), intent(in) :: ctx - - integer :: n, ng, lo(2), hi(2) - - double precision, pointer, dimension(:,:,:,:) :: qp, fp - - ng = nghost(q) - - ! sync q and fill ghost cells - call fill_boundary(q) - - do n=1, nfabs(q) - - qp => dataptr(q,n) - fp => dataptr(f,n) - - lo = lwb(get_box(q,n)) - hi = upb(get_box(q,n)) - - fp = 0.0d0 - - ! XXX: pass invdx here instead of dx - - call cell_motility (fp(:,:,1,iu), qp(:,:,1,iu), lo, hi, ng, ctx%dx, ctx%diff) - call chemotactic_sensitivity (fp(:,:,1,iu), qp(:,:,1,iu), qp(:,:,1,iv), lo, hi, ng, ctx%dx, ctx%chi, ctx%alpha, ctx%gamma) - call signal_diffusion (fp(:,:,1,iv), qp(:,:,1,iv), lo, hi, ng, ctx%dx) - call signal_production (fp(:,:,1,iv), qp(:,:,1,iu), qp(:,:,1,iv), lo, hi, ng, ctx%dx, ctx%phi) - call signal_degradation (fp(:,:,1,iv), qp(:,:,1,iu), qp(:,:,1,iv), lo, hi, ng, ctx%dx) - - end do - - end subroutine dqdt - -end module advance_module - diff --git a/Tutorials/Chemotaxis_F/chemotaxis.f90 b/Tutorials/Chemotaxis_F/chemotaxis.f90 deleted file mode 100644 index 2d5ad6fa7..000000000 --- a/Tutorials/Chemotaxis_F/chemotaxis.f90 +++ /dev/null @@ -1,131 +0,0 @@ -module chemotaxis_module - - use boxlib - use multifab_module - use mt19937_module - - use dtypes_module - use advance_module - use sdcquad_module - use write_plotfile_module - - implicit none - -contains - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - subroutine chemotaxis(ctx, opts, sdc) - type(cht_ctx_t), intent(inout) :: ctx - type(cht_opts_t), intent(inout) :: opts - type(sdcquad), intent(in) :: sdc - - integer :: lo(dim), hi(dim), n - logical :: is_periodic(dim) - real(dp_t) :: dt, time - - type(box) :: bx - type(boxarray) :: ba - type(layout) :: la - type(multifab) :: q - - ! physical problem is a box on (-1,-1) to (1,1), periodic on all sides - ctx%prob_lo = -10.0d0 - ctx%prob_hi = 10.0d0 - is_periodic = .true. - - ! create a box from (0,0) to (n_cell-1,n_cell-1) - lo = 0 - hi = ctx%n_cell-1 - bx = make_box(lo,hi) - - ctx%dx = (ctx%prob_hi(1) - ctx%prob_lo(1)) / ctx%n_cell - ctx%invdx = 1.0d0 / ctx%dx - - ! build layout - call build(ba,bx) - call build(la,ba,bx,pmask=is_periodic) - - ! build q (solution) multifab - call build(q,la,ctx%nc,ctx%ng) - - ! set initial condition and write plot 0 - call initial(q,ctx) - call write_plotfile(la,q,0,ctx%dx,0.0d0,ctx%prob_lo,ctx%prob_hi) - - ! run - dt = ctx%dt - time = 0.0d0 - do n = 1, opts%nsteps - select case(opts%method) - case("fe") - call advance_fe(q,dt,ctx) - case("sdc") - call advance_sdc(q,dt,ctx,sdc) - end select - - time = time + dt - if (mod(n, opts%plot_int) .eq. 0 .or. n .eq. opts%nsteps) then - print *, "OUTPUT: step:", n, "time:", time - call write_plotfile(la,q,n,ctx%dx,time,ctx%prob_lo,ctx%prob_hi) - end if - end do - - ! destroy/deallocate - call destroy(ba) - call destroy(la) - call destroy(q) - - end subroutine chemotaxis - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - subroutine initial(q,ctx) - type(multifab), intent(inout) :: q - type(cht_ctx_t), intent(in) :: ctx - - integer :: n, p, i, j, lo(2), hi(2) - - double precision :: x, y, px, py, d, a - double precision, pointer, dimension(:,:,:,:) :: qp - - ! double precision, parameter :: pi = 3.141592653589793d0 - ! double precision, parameter :: pad = 4.0d0 - double precision, parameter :: pad = 2.0d0 - - call init_genrand(368) - - do n=1, nfabs(q) - - qp => dataptr(q,n) - - lo = lwb(get_box(q,n)) - hi = upb(get_box(q,n)) - - qp(:,:,1,iu) = 1.0d0 - qp(:,:,1,iv) = 0.5d0 - - do p = 1, 800 - call mt_random_number(px) - call mt_random_number(py) - call mt_random_number(a) - a = -1.0d0 + 2.0d0 * a - - px = ctx%prob_lo(1) + pad + px * (ctx%prob_hi(1) - ctx%prob_lo(1) - 2*pad) - py = ctx%prob_lo(2) + pad + py * (ctx%prob_hi(2) - ctx%prob_lo(2) - 2*pad) - - do j = lo(2), hi(2) - y = ctx%prob_lo(2) + j * ctx%dx - do i = lo(1), hi(2) - x = ctx%prob_lo(1) + i * ctx%dx - - d = (x - px)**2 + (y - py)**2 - qp(i,j,1,iv) = qp(i,j,1,iv) + 0.01d0 * a * dexp(-4.0d0*d) - end do - end do - end do - - end do - end subroutine initial - -end module chemotaxis_module diff --git a/Tutorials/Chemotaxis_F/dtypes.f90 b/Tutorials/Chemotaxis_F/dtypes.f90 deleted file mode 100644 index 037667eb8..000000000 --- a/Tutorials/Chemotaxis_F/dtypes.f90 +++ /dev/null @@ -1,81 +0,0 @@ -module dtypes_module - - use iso_c_binding - use multifab_module - - implicit none - - integer, parameter :: dim = 2 - - integer, parameter :: iu = 1 ! index of population density u - integer, parameter :: iv = 2 ! index of chemical signal v - - ! chemotaxis context - type, bind(c) :: cht_ctx_t - - integer(c_int) :: & - nc = 2, & ! number of components - ng = 2, & ! number of ghost cells - n_cell = 128 ! number of grid cells - - real(c_double) :: dt, dx, invdx - - real(c_double) :: prob_lo(dim), prob_hi(dim) - - real(c_double) :: & - diff = 0.1d0, & ! diffusion constant - chi = 5.0d0, & ! sensitivity constant - alpha = 0.5d0, & ! receptor binding constant - gamma = 10.0d0, & ! volume filling constant - phi = 1.0d0 ! saturating chemical production constant - - end type cht_ctx_t - - ! options - type :: cht_opts_t - - character(len=8) :: method = "sdc" ! integration method: "rk" or "sdc" - - integer :: & - nsteps = 1000, & ! number of steps - plot_int = 100 ! plot interval - - end type cht_opts_t - -contains - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - subroutine read_namelists(unitno, ctx, opts) - integer, intent(in) :: unitno - type(cht_ctx_t), intent(inout) :: ctx - type(cht_opts_t), intent(inout) :: opts - - character(len=8) :: method - integer :: n_cell, nsteps, plot_int - real(8) :: dt - - namelist /options/ method, nsteps, plot_int - namelist /parameters/ n_cell, dt - - ! read options - method = opts%method - nsteps = opts%nsteps - plot_int = opts%plot_int - read(unit=unitno, nml=options) - opts%method = method - opts%nsteps = nsteps - opts%plot_int = plot_int - - ! read parameters - n_cell = ctx%n_cell - dt = ctx%dt - read(unit=unitno, nml=parameters) - ctx%dt = dt - ctx%n_cell = n_cell - - end subroutine read_namelists - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -end module dtypes_module diff --git a/Tutorials/Chemotaxis_F/inputs.mwe b/Tutorials/Chemotaxis_F/inputs.mwe deleted file mode 100644 index a0f0e6b4c..000000000 --- a/Tutorials/Chemotaxis_F/inputs.mwe +++ /dev/null @@ -1,22 +0,0 @@ -&options - - method = "sdc" - plot_int = 10 - nsteps = 300 - -/ - -¶meters - - dt = 0.0125d0 - -/ - -&sdc - - nnodes = 5 - qtype = "Gauss-Lobatto" - iters = 20 - tol_residual = 1.0d-10 - -/ diff --git a/Tutorials/Chemotaxis_F/kernels.f90 b/Tutorials/Chemotaxis_F/kernels.f90 deleted file mode 100644 index 1f7e3b4cc..000000000 --- a/Tutorials/Chemotaxis_F/kernels.f90 +++ /dev/null @@ -1,175 +0,0 @@ -module chemotaxis_kernels - ! - ! These kernels use point based reconstructions from polynomials and - ! Gauss quadrature to perform flux and volume integrals. - ! - implicit none -contains - - - ! - ! Cell motility - ! - subroutine cell_motility(f, u, lo, hi, ng, dx, diff) & - bind(c, name='cell_motility') - use iso_c_binding - integer(c_int), intent(in) :: lo(2), hi(2) - integer(c_int), intent(in), value :: ng - real(c_double), intent(in), value :: dx, diff - real(c_double), intent(in) :: u(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(inout) :: f(lo(1):hi(1),lo(2):hi(2)) - - integer :: i, j - - real(c_double) :: u_edge, u_x_edge, u_y_edge - - ! this kernel was generated - - do j = lo(2), hi(2) - do i = lo(1), hi(1) -u_x_edge = (-u(i+0,j+0) + u(i+1,j+0))/dx -u_edge = u(i+0,j+0)/2 + u(i+1,j+0)/2 -f(i, j) = f(i, j) + (diff*u_edge*u_x_edge)/dx -u_x_edge = (u(i+0,j+0) - u(i-1,j+0))/dx -u_edge = u(i+0,j+0)/2 + u(i-1,j+0)/2 -f(i, j) = f(i, j) - (diff*u_edge*u_x_edge)/dx -u_y_edge = (-u(i+0,j+0) + u(i+0,j+1))/dx -u_edge = u(i+0,j+0)/2 + u(i+0,j+1)/2 -f(i, j) = f(i, j) + (diff*u_edge*u_y_edge)/dx -u_y_edge = (u(i+0,j+0) - u(i+0,j-1))/dx -u_edge = u(i+0,j+0)/2 + u(i+0,j-1)/2 -f(i, j) = f(i, j) - (diff*u_edge*u_y_edge)/dx - end do - end do - - end subroutine cell_motility - - - ! - ! Chemotactic sensitivity - ! - subroutine chemotactic_sensitivity(f, u, v, lo, hi, ng, dx, chi, alpha, gamma) & - bind(c, name='chemotactic_sensitivity') - use iso_c_binding - integer(c_int), intent(in) :: lo(2), hi(2) - integer(c_int), intent(in), value :: ng - real(c_double), intent(in), value :: dx, chi, alpha, gamma - real(c_double), intent(in) :: u(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(in) :: v(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(inout) :: f(lo(1):hi(1),lo(2):hi(2)) - - integer :: i, j - - real(c_double) :: u_edge, v_edge, v_x_edge, v_y_edge - - ! this kernel was generated - - do j = lo(2), hi(2) - do i = lo(1), hi(1) -v_edge = v(i+0,j+0)/2 + v(i+1,j+0)/2 -u_edge = u(i+0,j+0)/2 + u(i+1,j+0)/2 -v_x_edge = (-v(i+0,j+0) + v(i+1,j+0))/dx -f(i, j) = f(i, j) + (-chi*u_edge*v_x_edge*(1 - u_edge/gamma)/(alpha*v_edge + 1)**2)/dx -v_edge = v(i+0,j+0)/2 + v(i-1,j+0)/2 -u_edge = u(i+0,j+0)/2 + u(i-1,j+0)/2 -v_x_edge = (v(i+0,j+0) - v(i-1,j+0))/dx -f(i, j) = f(i, j) - (-chi*u_edge*v_x_edge*(1 - u_edge/gamma)/(alpha*v_edge + 1)**2)/dx -v_edge = v(i+0,j+0)/2 + v(i+0,j+1)/2 -u_edge = u(i+0,j+0)/2 + u(i+0,j+1)/2 -v_y_edge = (-v(i+0,j+0) + v(i+0,j+1))/dx -f(i, j) = f(i, j) + (-chi*u_edge*v_y_edge*(1 - u_edge/gamma)/(alpha*v_edge + 1)**2)/dx -v_edge = v(i+0,j+0)/2 + v(i+0,j-1)/2 -u_edge = u(i+0,j+0)/2 + u(i+0,j-1)/2 -v_y_edge = (v(i+0,j+0) - v(i+0,j-1))/dx -f(i, j) = f(i, j) - (-chi*u_edge*v_y_edge*(1 - u_edge/gamma)/(alpha*v_edge + 1)**2)/dx - end do - end do - - end subroutine chemotactic_sensitivity - - - ! - ! Signal diffusion - ! - subroutine signal_diffusion(f, v, lo, hi, ng, dx) & - bind(c, name='signal_diffusion') - use iso_c_binding - integer(c_int), intent(in) :: lo(2), hi(2) - integer(c_int), intent(in), value :: ng - real(c_double), intent(in), value :: dx - real(c_double), intent(in) :: v(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(inout) :: f(lo(1):hi(1),lo(2):hi(2)) - - integer :: i, j - - real(c_double) :: v_x_edge, v_y_edge - - do j = lo(2), hi(2) - do i = lo(1), hi(1) -v_x_edge = (-v(i+0,j+0) + v(i+1,j+0))/dx -f(i, j) = f(i, j) + (v_x_edge)/dx -v_x_edge = (v(i+0,j+0) - v(i-1,j+0))/dx -f(i, j) = f(i, j) - (v_x_edge)/dx -v_y_edge = (-v(i+0,j+0) + v(i+0,j+1))/dx -f(i, j) = f(i, j) + (v_y_edge)/dx -v_y_edge = (v(i+0,j+0) - v(i+0,j-1))/dx -f(i, j) = f(i, j) - (v_y_edge)/dx - end do - end do - - end subroutine signal_diffusion - - - ! - ! Signal production - ! - subroutine signal_production(f, u, v, lo, hi, ng, dx, phi) & - bind(c, name='signal_production') - use iso_c_binding - integer(c_int), intent(in) :: lo(2), hi(2) - integer(c_int), intent(in), value :: ng - real(c_double), intent(in), value :: dx, phi - real(c_double), intent(in) :: u(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(in) :: v(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(inout) :: f(lo(1):hi(1),lo(2):hi(2)) - - integer :: i, j - - ! this kernel is trivial! - - do j = lo(2), hi(2) - do i = lo(1), hi(1) - ! f(i, j) = f(i, j) + u(i, j) / (1.0d0 + phi * u(i, j)) - f(i, j) = f(i, j) + u(i, j) - end do - end do - - end subroutine signal_production - - - ! - ! Signal degredation - ! - subroutine signal_degradation(f, u, v, lo, hi, ng, dx) & - bind(c, name='signal_degradation') - use iso_c_binding - integer(c_int), intent(in) :: lo(2), hi(2) - integer(c_int), intent(in), value :: ng - real(c_double), intent(in), value :: dx - real(c_double), intent(in) :: u(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(in) :: v(lo(1)-ng:hi(1)+ng,lo(2)-ng:hi(2)+ng) - real(c_double), intent(inout) :: f(lo(1):hi(1),lo(2):hi(2)) - - integer :: i, j - - ! this kernel is trivial! - - do j = lo(2), hi(2) - do i = lo(1), hi(1) - f(i, j) = f(i, j) - v(i, j) - end do - end do - - end subroutine signal_degradation - -end module chemotaxis_kernels diff --git a/Tutorials/Chemotaxis_F/main.f90 b/Tutorials/Chemotaxis_F/main.f90 deleted file mode 100644 index 243a4cc60..000000000 --- a/Tutorials/Chemotaxis_F/main.f90 +++ /dev/null @@ -1,72 +0,0 @@ -program main - - use boxlib - use bl_io_module - use multifab_module - use chemotaxis_module - use sdcquad_module - - - implicit none - - integer :: un, narg - character(len=128) :: inputs_file_name - - type(cht_ctx_t) :: ctx - type(cht_opts_t) :: opts - type(sdcquad) :: sdc - - real(dp_t) :: start_time, run_time, max_run_time - - call boxlib_initialize() - start_time = parallel_wtime() - - ! read input files - narg = command_argument_count() - if ( narg >= 1 ) then - call get_command_argument(1, value=inputs_file_name) - un = unit_new() - open(unit=un, file=inputs_file_name, status='old', action='read') - call read_namelists(un, ctx, opts) - if (opts%method == "sdc") then - call build(sdc, un) - call mk_imex_smats(sdc) - end if - close(unit=un) - end if - - ! run chemotaxis solver - call chemotaxis(ctx, opts, sdc) - - ! deallocate temporary boxarrays and communication mappings, display memory stats - call layout_flush_copyassoc_cache() - - if ( parallel_ioprocessor() ) then - print*, " " - print*, "MEMORY STATS AT END OF PROGRAM" - print*, " " - end if - call print(multifab_mem_stats(), " multifab") - call print(fab_mem_stats(), " fab") - call print(boxarray_mem_stats(), " boxarray") - call print(layout_mem_stats(), " layout") - call print(boxassoc_mem_stats(), " boxassoc") - call print(fgassoc_mem_stats(), " fgassoc") - call print(syncassoc_mem_stats(), " syncassoc") - call print(copyassoc_mem_stats(), " copyassoc") - call print(fluxassoc_mem_stats(), " fluxassoc") - - ! collect run_time from each processor and store the maximum - run_time = parallel_wtime() - start_time - - call parallel_reduce(max_run_time, run_time, MPI_MAX, & - proc = parallel_ioprocessornode()) - - if ( parallel_ioprocessor() ) then - print*, " " - print*, "Run time (s) =", max_run_time - end if - - call boxlib_finalize() - -end program main diff --git a/Tutorials/Chemotaxis_F/sdcquad.f90 b/Tutorials/Chemotaxis_F/sdcquad.f90 deleted file mode 100644 index bb5d976c2..000000000 --- a/Tutorials/Chemotaxis_F/sdcquad.f90 +++ /dev/null @@ -1,3045 +0,0 @@ -module sdcquad_module - - use bl_types - - implicit none - - integer, parameter :: SDC_GAUSS_LOBATTO = 1 - integer, parameter :: SDC_GAUSS_RADAU = 2 - integer, parameter :: SDC_CLENSHAW_CURTIS = 3 - - type :: sdcquad - - integer :: qtype = -1 ! SDC quadrature type - integer :: nnodes = -1 ! Number of SDC nodes - integer :: iters = -1 ! Number of SDC iterations - - real(dp_t) :: tol_residual = -1.0d0 ! Residual tolerance (ignored if negative) - - real(dp_t), pointer :: nodes(:) ! SDC nodes - real(dp_t), pointer :: smat(:,:) ! SDC S matrix (node to node quadrature) - real(dp_t), pointer :: smats(:,:,:) ! User allocatable S matrices - - end type sdcquad - - interface build - module procedure sdcquad_build - module procedure sdcquad_build_namelist - end interface - - interface destroy - module procedure sdcquad_destroy - end interface - - private :: sdcquadGL, sdcquadGR, sdcquadCC - -contains - - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! - ! Build SDC object. - ! - ! If nnodes0 is supplied, the nodes are set by refining the number - ! of nodes down to 'nnodes' from 'nnodes0'. - ! - subroutine sdcquad_build(sdc, qtype, nnodes, nnodes0) - integer, intent(in ) :: qtype, nnodes - type(sdcquad), intent(out) :: sdc - integer, intent(in ), optional :: nnodes0 - - integer :: refine, lnnodes0 - - sdc%nnodes = nnodes - sdc%qtype = qtype - sdc%iters = 2*nnodes - 1 - - allocate(sdc%nodes(nnodes)) - allocate(sdc%smat(nnodes-1,nnodes)) - - if (present(nnodes0)) then - refine = (nnodes0 - 1) / (nnodes - 1) - lnnodes0 = nnodes0 - else - refine = 1 - lnnodes0 = nnodes - end if - - select case (qtype) - case (SDC_GAUSS_LOBATTO) - call sdcquadGL(lnnodes0, refine, sdc%smat, sdc%nodes) - - case (SDC_GAUSS_RADAU) - call sdcquadGR(lnnodes0, refine, sdc%smat, sdc%nodes) - - case (SDC_CLENSHAW_CURTIS) - call sdcquadCC(lnnodes0, refine, sdc%smat, sdc%nodes) - - case default - stop 'ERROR: sdcquad_build: invalid SDC quadrature type.' - end select - - end subroutine sdcquad_build - - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! - ! Build SDC object, read options from file. - ! - subroutine sdcquad_build_namelist(obj, unitno) - type(sdcquad), intent(inout) :: obj - integer, intent(in ) :: unitno - - character(len=32) :: qtype - integer :: nnodes, iters - real(dp_t) :: tol_residual - - namelist /sdc/ qtype, nnodes, iters, tol_residual - - qtype = "Gauss-Lobatto" - nnodes = 3 - tol_residual = -1.d0 - iters = 0 - - read(unit=unitno, nml=sdc) - - obj%nnodes = nnodes - obj%tol_residual = tol_residual - if (iters == 0) then - obj%iters = 2*obj%nnodes - 1 - else - obj%iters = iters - end if - - allocate(obj%nodes(nnodes)) - allocate(obj%smat(nnodes-1,nnodes)) - - select case (qtype) - case ("Gauss-Lobatto") - obj%qtype = SDC_GAUSS_LOBATTO - call sdcquadGL(nnodes, 1, obj%smat, obj%nodes) - - case ("Gauss-Radau") - obj%qtype = SDC_GAUSS_RADAU - call sdcquadGR(nnodes, 1, obj%smat, obj%nodes) - - case ("Clenshaw-Curtis") - obj%qtype = SDC_CLENSHAW_CURTIS - call sdcquadCC(nnodes, 1, obj%smat, obj%nodes) - - case default - stop 'ERROR: sdcquad_build_namelist: invalid SDC quadrature type.' - end select - - end subroutine sdcquad_build_namelist - - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! - ! Make compact IMEX SDC integration matrices. - ! - subroutine mk_imex_smats(sdc) - type(sdcquad), intent(inout) :: sdc - - integer :: m - real(dp_t) :: dsdc(sdc%nnodes-1) - - allocate(sdc%smats(sdc%nnodes-1,sdc%nnodes,2)) - - sdc%smats(:,:,1) = sdc%smat(:,:) - sdc%smats(:,:,2) = sdc%smat(:,:) - - dsdc = sdc%nodes(2:sdc%nnodes) - sdc%nodes(1:sdc%nnodes-1) - do m = 1, sdc%nnodes-1 - sdc%smats(m,m,1) = sdc%smats(m,m,1) - dsdc(m) - sdc%smats(m,m+1,2) = sdc%smats(m,m+1,2) - dsdc(m) - end do - - end subroutine mk_imex_smats - - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! - ! Destroy SDC object. - ! - subroutine sdcquad_destroy(sdc) - type(sdcquad), intent(inout) :: sdc - - if (associated(sdc%nodes)) deallocate(sdc%nodes) - if (associated(sdc%smat)) deallocate(sdc%smat) - if (associated(sdc%smats)) deallocate(sdc%smats) - - end subroutine sdcquad_destroy - - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! - ! Set Clenshaw-Curtis SDC nodes and S matrix. - ! - subroutine sdcquadCC(nnodes, refine, smat, nodes) - implicit none - integer, intent(in) :: nnodes, refine - real(8), intent(out) :: smat((nnodes-1)/refine,(nnodes-1)/refine+1) - real(8), intent(out) :: nodes((nnodes-1)/refine+1) - - select case(nnodes) - case(2) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - case(3) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - case(4) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.25d0 - nodes(3) = 0.75d0 - nodes(4) = 1.0d0 - smat(1,1) = 0.10243055555555555555555555555555556d0 - smat(1,2) = 0.16319444444444444444444444444444444d0 - smat(1,3) = -0.024305555555555555555555555555555556d0 - smat(1,4) = 0.0086805555555555555555555555555555557d0 - smat(2,1) = -0.055555555555555555555555555555555556d0 - smat(2,2) = 0.30555555555555555555555555555555556d0 - smat(2,3) = 0.30555555555555555555555555555555556d0 - smat(2,4) = -0.055555555555555555555555555555555556d0 - smat(3,1) = 0.0086805555555555555555555555555555545d0 - smat(3,2) = -0.024305555555555555555555555555555554d0 - smat(3,3) = 0.16319444444444444444444444444444444d0 - smat(3,4) = 0.10243055555555555555555555555555556d0 - end select - case(5) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.14644660940672623779957781894757548d0 - nodes(3) = 0.5d0 - nodes(4) = 0.85355339059327376220042218105242452d0 - nodes(5) = 1.0d0 - smat(1,1) = 0.059701779686442458740014072701747484d0 - smat(1,2) = 0.095031716019062009094954263719320677d0 - smat(1,3) = -0.012132034355964257320253308631454712d0 - smat(1,4) = 0.0066433683707435685448487184562145472d0 - smat(1,5) = -0.002798220313557541259985927298252516d0 - smat(2,1) = -0.043035113019775792073347406035080817d0 - smat(2,2) = 0.21507831261090820533859016014022492d0 - smat(2,3) = 0.21213203435596425732025330863145471d0 - smat(2,4) = -0.050086730334047116311726475649093474d0 - smat(2,5) = 0.019464886980224207926652593964919183d0 - smat(3,1) = 0.019464886980224207926652593964919183d0 - smat(3,2) = -0.050086730334047116311726475649093474d0 - smat(3,3) = 0.21213203435596425732025330863145471d0 - smat(3,4) = 0.21507831261090820533859016014022492d0 - smat(3,5) = -0.043035113019775792073347406035080818d0 - smat(4,1) = -0.0027982203135575412599859272982525158d0 - smat(4,2) = 0.0066433683707435685448487184562145471d0 - smat(4,3) = -0.012132034355964257320253308631454713d0 - smat(4,4) = 0.095031716019062009094954263719320676d0 - smat(4,5) = 0.059701779686442458740014072701747484d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - case(7) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.066987298107780676618138414623531908d0 - nodes(3) = 0.25d0 - nodes(4) = 0.5d0 - nodes(5) = 0.75d0 - nodes(6) = 0.93301270189221932338186158537646809d0 - nodes(7) = 1.0d0 - smat(1,1) = 0.027217641773063450651486911537124147d0 - smat(1,2) = 0.043301987114152472024853676078676587d0 - smat(1,3) = -0.0049824159104277846004735414275810216d0 - smat(1,4) = 0.0023168848381701680174186430475824364d0 - smat(1,5) = -0.0015101936882055623782513192053587995d0 - smat(1,6) = 0.0012035299857422600293949108337421896d0 - smat(1,7) = -0.00056013600471432712629086624065363049d0 - smat(2,1) = -0.023646213201634879222915482965695576d0 - smat(2,2) = 0.11130059290333706380765806959210959d0 - smat(2,3) = 0.10900027305328492745761639857043816d0 - smat(2,4) = -0.02057085309213842198567261130155069d0 - smat(2,5) = 0.011778050831062705235394176348215943d0 - smat(2,6) = -0.0089807131778349704650812596791315465d0 - smat(2,7) = 0.0041315645761428985548622948120822023d0 - smat(3,1) = 0.017460317460317460317460317460317461d0 - smat(3,2) = -0.042997994092957230059923950470226231d0 - smat(3,3) = 0.14915674603174603174603174603174603d0 - smat(3,4) = 0.14841269841269841269841269841269841d0 - smat(3,5) = -0.034871031746031746031746031746031744d0 - smat(3,6) = 0.023156724251687388790082680628956399d0 - smat(3,7) = -0.010317460317460317460317460317460319d0 - smat(4,1) = -0.010317460317460317460317460317460317d0 - smat(4,2) = 0.023156724251687388790082680628956401d0 - smat(4,3) = -0.034871031746031746031746031746031733d0 - smat(4,4) = 0.14841269841269841269841269841269841d0 - smat(4,5) = 0.14915674603174603174603174603174604d0 - smat(4,6) = -0.042997994092957230059923950470226249d0 - smat(4,7) = 0.017460317460317460317460317460317457d0 - smat(5,1) = 0.004131564576142898554862294812082202d0 - smat(5,2) = -0.0089807131778349704650812596791315272d0 - smat(5,3) = 0.011778050831062705235394176348215959d0 - smat(5,4) = -0.02057085309213842198567261130155069d0 - smat(5,5) = 0.10900027305328492745761639857043817d0 - smat(5,6) = 0.11130059290333706380765806959210962d0 - smat(5,7) = -0.023646213201634879222915482965695588d0 - smat(6,1) = -0.00056013600471432712629086624065363037d0 - smat(6,2) = 0.0012035299857422600293949108337421987d0 - smat(6,3) = -0.0015101936882055623782513192053587914d0 - smat(6,4) = 0.0023168848381701680174186430475824367d0 - smat(6,5) = -0.0049824159104277846004735414275810177d0 - smat(6,6) = 0.043301987114152472024853676078676598d0 - smat(6,7) = 0.027217641773063450651486911537124144d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.25d0 - nodes(3) = 0.75d0 - nodes(4) = 1.0d0 - smat(1,1) = 0.10243055555555555555555555555555556d0 - smat(1,2) = 0.16319444444444444444444444444444444d0 - smat(1,3) = -0.024305555555555555555555555555555556d0 - smat(1,4) = 0.0086805555555555555555555555555555557d0 - smat(2,1) = -0.055555555555555555555555555555555556d0 - smat(2,2) = 0.30555555555555555555555555555555556d0 - smat(2,3) = 0.30555555555555555555555555555555556d0 - smat(2,4) = -0.055555555555555555555555555555555556d0 - smat(3,1) = 0.0086805555555555555555555555555555545d0 - smat(3,2) = -0.024305555555555555555555555555555554d0 - smat(3,3) = 0.16319444444444444444444444444444444d0 - smat(3,4) = 0.10243055555555555555555555555555556d0 - end select - case(9) - select case(refine) - case(8) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.038060233744356621935908405301605857d0 - nodes(3) = 0.14644660940672623779957781894757548d0 - nodes(4) = 0.30865828381745511413577000798480057d0 - nodes(5) = 0.5d0 - nodes(6) = 0.69134171618254488586422999201519943d0 - nodes(7) = 0.85355339059327376220042218105242452d0 - nodes(8) = 0.96193976625564337806409159469839414d0 - nodes(9) = 1.0d0 - smat(1,1) = 0.015446942589330503000508663449987255d0 - smat(1,2) = 0.024571482764589171269473279957615346d0 - smat(1,3) = -0.0027292031693117551469555730885524011d0 - smat(1,4) = 0.0012032717847525820515086196769462349d0 - smat(1,5) = -0.0007254858795644505687305583642067501d0 - smat(1,6) = 0.0005193332763892971933218119544627156d0 - smat(1,7) = -0.00041852184693699231788565624639968958d0 - smat(1,8) = 0.00037047163577776345415915451176587754d0 - smat(1,9) = -0.00017805741066949699949133655001274502d0 - smat(2,1) = -0.014284667911499342383051696632943004d0 - smat(2,2) = 0.065936015302512478001394667403264558d0 - smat(2,3) = 0.064433133068355454270914110191314059d0 - smat(2,4) = -0.011352775377787173411387730111410457d0 - smat(2,5) = 0.0059796718502256497349685233567425182d0 - smat(2,6) = -0.0040641423785444213585649548332606578d0 - smat(2,7) = 0.0031968866471017310751071631737572791d0 - smat(2,8) = -0.002798077626495417682658972268551566d0 - smat(2,9) = 0.0013403320885006576169483033670569956d0 - smat(3,1) = 0.012137064339490624190989302960854163d0 - smat(3,2) = -0.029504918979320072720126753003180839d0 - smat(3,3) = 0.09681395624632992106397229434301373d0 - smat(3,4) = 0.095937513323380720744747485105547128d0 - smat(3,5) = -0.020065348060354333061956683400867557d0 - smat(3,6) = 0.011658919281530739014576110710998294d0 - smat(3,7) = -0.0086164639990830224068874253060961936d0 - smat(3,8) = 0.0073388879192636753198885546661019445d0 - smat(3,9) = -0.0034879356605093758090106970391458451d0 - smat(4,1) = -0.0093310850490678165544780158096444382d0 - smat(4,2) = 0.020651758228406044235552779596616959d0 - smat(4,3) = -0.029751051205224818551352531429101463d0 - smat(4,4) = 0.11352170202280769331051897659152622d0 - smat(4,5) = 0.11322386050239154659413141682103022d0 - smat(4,6) = -0.026564892572284546796719478807455749d0 - smat(4,7) = 0.016753803941309164552770158044604414d0 - smat(4,8) = -0.013456294636724564371715297182731607d0 - smat(4,9) = 0.0062939149509321834455219841903555566d0 - smat(5,1) = 0.0062939149509321834455219841903555279d0 - smat(5,2) = -0.013456294636724564371715297182731863d0 - smat(5,3) = 0.016753803941309164552770158044604307d0 - smat(5,4) = -0.02656489257228454679671947880745535d0 - smat(5,5) = 0.11322386050239154659413141682102966d0 - smat(5,6) = 0.11352170202280769331051897659152612d0 - smat(5,7) = -0.029751051205224818551352531429101765d0 - smat(5,8) = 0.02065175822840604423555277959661683d0 - smat(5,9) = -0.0093310850490678165544780158096444724d0 - smat(6,1) = -0.003487935660509375809010697039145936d0 - smat(6,2) = 0.0073388879192636753198885546661022262d0 - smat(6,3) = -0.0086164639990830224068874253060961643d0 - smat(6,4) = 0.011658919281530739014576110710999555d0 - smat(6,5) = -0.02006534806035433306195668340086967d0 - smat(6,6) = 0.095937513323380720744747485105547664d0 - smat(6,7) = 0.096813956246329921063972294343014024d0 - smat(6,8) = -0.029504918979320072720126753003179116d0 - smat(6,9) = 0.012137064339490624190989302960854117d0 - smat(7,1) = 0.001340332088500657616948303367056873d0 - smat(7,2) = -0.0027980776264954176826589722685514887d0 - smat(7,3) = 0.0031968866471017310751071631737572239d0 - smat(7,4) = -0.0040641423785444213585649548332590465d0 - smat(7,5) = 0.0059796718502256497349685233567392369d0 - smat(7,6) = -0.01135277537778717341138773011140933d0 - smat(7,7) = 0.064433133068355454270914110191313952d0 - smat(7,8) = 0.065936015302512478001394667403264912d0 - smat(7,9) = -0.01428466791149934238305169663294307d0 - smat(8,1) = -0.00017805741066949699949133655001280258d0 - smat(8,2) = 0.00037047163577776345415915451176594706d0 - smat(8,3) = -0.00041852184693699231788565624639970263d0 - smat(8,4) = 0.00051933327638929719332181195446349925d0 - smat(8,5) = -0.00072548587956445056873055836420848331d0 - smat(8,6) = 0.0012032717847525820515086196769467959d0 - smat(8,7) = -0.0027292031693117551469555730885526981d0 - smat(8,8) = 0.024571482764589171269473279957615764d0 - smat(8,9) = 0.015446942589330503000508663449987241d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.14644660940672623779957781894757548d0 - nodes(3) = 0.5d0 - nodes(4) = 0.85355339059327376220042218105242452d0 - nodes(5) = 1.0d0 - smat(1,1) = 0.059701779686442458740014072701747484d0 - smat(1,2) = 0.095031716019062009094954263719320677d0 - smat(1,3) = -0.012132034355964257320253308631454712d0 - smat(1,4) = 0.0066433683707435685448487184562145472d0 - smat(1,5) = -0.002798220313557541259985927298252516d0 - smat(2,1) = -0.043035113019775792073347406035080817d0 - smat(2,2) = 0.21507831261090820533859016014022492d0 - smat(2,3) = 0.21213203435596425732025330863145471d0 - smat(2,4) = -0.050086730334047116311726475649093474d0 - smat(2,5) = 0.019464886980224207926652593964919183d0 - smat(3,1) = 0.019464886980224207926652593964919183d0 - smat(3,2) = -0.050086730334047116311726475649093474d0 - smat(3,3) = 0.21213203435596425732025330863145471d0 - smat(3,4) = 0.21507831261090820533859016014022492d0 - smat(3,5) = -0.043035113019775792073347406035080818d0 - smat(4,1) = -0.0027982203135575412599859272982525158d0 - smat(4,2) = 0.0066433683707435685448487184562145471d0 - smat(4,3) = -0.012132034355964257320253308631454713d0 - smat(4,4) = 0.095031716019062009094954263719320676d0 - smat(4,5) = 0.059701779686442458740014072701747484d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - end select - case(13) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.017037086855465856625128400135551316d0 - nodes(3) = 0.066987298107780676618138414623531908d0 - nodes(4) = 0.14644660940672623779957781894757548d0 - nodes(5) = 0.25d0 - nodes(6) = 0.37059047744873961882555058118797584d0 - nodes(7) = 0.5d0 - nodes(8) = 0.62940952255126038117444941881202416d0 - nodes(9) = 0.75d0 - nodes(10) = 0.85355339059327376220042218105242452d0 - nodes(11) = 0.93301270189221932338186158537646809d0 - nodes(12) = 0.98296291314453414337487159986444868d0 - nodes(13) = 1.0d0 - smat(1,1) = 0.0069091554849653485976588362077622526d0 - smat(1,2) = 0.010989242416242542103495308538716176d0 - smat(1,3) = -0.0011905937159861112930031456228420269d0 - smat(1,4) = 0.00050586775331751122553695563157662185d0 - smat(1,5) = -0.000289317317564458015095710482621544d0 - smat(1,6) = 0.00019308756397099453995123507443877401d0 - smat(1,7) = -0.00014230004322922589287907593539263935d0 - smat(1,8) = 0.00011266653440511920437336940473039781d0 - smat(1,9) = -0.000094356478176003952260917120595746046d0 - smat(1,10) = 0.000082801230488540605442435753892059643d0 - smat(1,11) = -0.000075688805540651660506792727392403341d0 - smat(1,12) = 0.000071811192051347009201509649963005952d0 - smat(1,13) = -0.000035288959479095846785608236682259685d0 - smat(2,1) = -0.0066749341629101714066863242685191341d0 - smat(2,2) = 0.030396588223050213267560446874821141d0 - smat(2,3) = 0.029659853920918820447715258904875633d0 - smat(2,4) = -0.0049877287771198289944320968735405789d0 - smat(2,5) = 0.0024868264863807902223483610623915058d0 - smat(2,6) = -0.001572263653641560264980786872320418d0 - smat(2,7) = 0.0011276500473284478735131137613858219d0 - smat(2,8) = -0.0008791307108311391032262203309278112d0 - smat(2,9) = 0.00072936564699233615951356770036551502d0 - smat(2,10) = -0.00063629124769892768322177498416313622d0 - smat(2,11) = 0.0005795453466008628468070119538619972d0 - smat(2,12) = -0.00054878014828929640965866261618611594d0 - smat(2,13) = 0.00026951028153427303775812017592582842d0 - smat(3,1) = 0.006222453314828841402579857769176388d0 - smat(3,2) = -0.014997336800523680380014089987559404d0 - smat(3,3) = 0.047453516040898854179488908764151671d0 - smat(3,4) = 0.046903603330951205816625313258253975d0 - smat(3,5) = -0.0091237430287923083899782645348084664d0 - smat(3,6) = 0.0049050426361681303290490038120303824d0 - smat(3,7) = -0.0032840069800381201187887718150524584d0 - smat(3,8) = 0.0024691673939039426973459085603950062d0 - smat(3,9) = -0.0020056874732367528344227089792523023d0 - smat(3,10) = 0.0017273367551440028687935901237797713d0 - smat(3,11) = -0.001561116187178749786652367913877696d0 - smat(3,12) = 0.001472073426435798439277611942103939d0 - smat(3,13) = -0.00072199112961560304186458667526943965d0 - smat(4,1) = -0.0055825487627581444676782438342936816d0 - smat(4,2) = 0.012248514613399648112978982202092485d0 - smat(4,3) = -0.017174612352449338531934650174149322d0 - smat(4,4) = 0.061484467155043049483206356014774453d0 - smat(4,5) = 0.061079112231604347811097242326666909d0 - smat(4,6) = -0.012876038180860002843026583928081246d0 - smat(4,7) = 0.0072696119468938690931256889600149988d0 - smat(4,8) = -0.0050739083481009913960471375668420592d0 - smat(4,9) = 0.0039610566760487922555416867711101437d0 - smat(4,10) = -0.0033336544537238069202043771781743213d0 - smat(4,11) = 0.0029725064161469772087491874787810234d0 - smat(4,12) = -0.0027830120296569375821521706296811602d0 - smat(4,13) = 0.0013618956816862999767662006101534232d0 - smat(5,1) = 0.0047988289444294263522028145956904454d0 - smat(5,2) = -0.010164328764809466064416915015790652d0 - smat(5,3) = 0.012297827042327344081849698828302491d0 - smat(5,4) = -0.01854060596122353228638052635997527d0 - smat(5,5) = 0.071401422420095010525502991872737772d0 - smat(5,6) = 0.071150501600392918170809113619768289d0 - smat(5,7) = -0.015884552672618415066513871653698448d0 - smat(5,8) = 0.0093233604845671461554252772409826957d0 - smat(5,9) = -0.0067449273081823324262206903781745044d0 - smat(5,10) = 0.005452686601157022480408805587879419d0 - smat(5,11) = -0.0047543509238734100917846151955818931d0 - smat(5,12) = 0.0044002314864929250869101278946753453d0 - smat(5,13) = -0.0021456155000150180922416298487578224d0 - smat(6,1) = -0.0039247030703035522263286887215674014d0 - smat(6,2) = 0.0081720467252998453280149368020613099d0 - smat(6,3) = -0.0092928445905953950257729987896073106d0 - smat(6,4) = 0.011894065775572884586140270671764704d0 - smat(6,5) = -0.018811044048466638897131363501111248d0 - smat(6,6) = 0.076496157746158138132379231468336947d0 - smat(6,7) = 0.076411063199128941577040382180209423d0 - smat(6,8) = -0.017910796175610526321427815203115851d0 - smat(6,9) = 0.010897805679810704054592318749804764d0 - smat(6,10) = -0.0081708557802157394895332592643908961d0 - smat(6,11) = 0.0068572235799965688908157702647417861d0 - smat(6,12) = -0.0062283378636557416524551215681150469d0 - smat(6,13) = 0.0030197413741408922181157557228842546d0 - smat(7,1) = 0.0030197413741408922181157557228690079d0 - smat(7,2) = -0.0062283378636557416524551215680131956d0 - smat(7,3) = 0.0068572235799965688908157702647568534d0 - smat(7,4) = -0.0081708557802157394895332592644116153d0 - smat(7,5) = 0.010897805679810704054592318749788754d0 - smat(7,6) = -0.017910796175610526321427815203079238d0 - smat(7,7) = 0.076411063199128941577040382180159224d0 - smat(7,8) = 0.07649615774615813813237923146835502d0 - smat(7,9) = -0.018811044048466638897131363501090182d0 - smat(7,10) = 0.011894065775572884586140270671784853d0 - smat(7,11) = -0.0092928445905953950257729987895923569d0 - smat(7,12) = 0.0081720467252998453280149368021801546d0 - smat(7,13) = -0.0039247030703035522263286887215785936d0 - smat(8,1) = -0.0021456155000150180922416298487857921d0 - smat(8,2) = 0.0044002314864929250869101278945722623d0 - smat(8,3) = -0.0047543509238734100917846151955362878d0 - smat(8,4) = 0.0054526866011570224804088055877952197d0 - smat(8,5) = -0.0067449273081823324262206903782506287d0 - smat(8,6) = 0.0093233604845671461554252772410928789d0 - smat(8,7) = -0.015884552672618415066513871653952636d0 - smat(8,8) = 0.071150501600392918170809113619738106d0 - smat(8,9) = 0.071401422420095010525502991872758661d0 - smat(8,10) = -0.018540605961223532286380526360021195d0 - smat(8,11) = 0.012297827042327344081849698828323521d0 - smat(8,12) = -0.010164328764809466064416915016031138d0 - smat(8,13) = 0.0047988289444294263522028145956780937d0 - smat(9,1) = 0.0013618956816862999767662006100784665d0 - smat(9,2) = -0.0027830120296569375821521706297467389d0 - smat(9,3) = 0.0029725064161469772087491874789316373d0 - smat(9,4) = -0.0033336544537238069202043771782894153d0 - smat(9,5) = 0.0039610566760487922555416867709118896d0 - smat(9,6) = -0.005073908348100991396047137566522229d0 - smat(9,7) = 0.0072696119468938690931256889592972103d0 - smat(9,8) = -0.012876038180860002843026583928277023d0 - smat(9,9) = 0.061079112231604347811097242326739681d0 - smat(9,10) = 0.061484467155043049483206356014774579d0 - smat(9,11) = -0.017174612352449338531934650174042355d0 - smat(9,12) = 0.012248514613399648112978982202091161d0 - smat(9,13) = -0.005582548762758144467678243834355527d0 - smat(10,1) = -0.0007219911296156030418645866753842317d0 - smat(10,2) = 0.0014720734264357984392776119418502971d0 - smat(10,3) = -0.0015611161871787497866523679135998132d0 - smat(10,4) = 0.0017273367551440028687935901236579163d0 - smat(10,5) = -0.0020056874732367528344227089795975717d0 - smat(10,6) = 0.0024691673939039426973459085609770186d0 - smat(10,7) = -0.003284006980038120118788771816363337d0 - smat(10,8) = 0.0049050426361681303290490038116675984d0 - smat(10,9) = -0.0091237430287923083899782645346703992d0 - smat(10,10) = 0.046903603330951205816625313258146296d0 - smat(10,11) = 0.04745351604089885417948890876428229d0 - smat(10,12) = -0.014997336800523680380014089988176103d0 - smat(10,13) = 0.0062224533148288414025798577691101818d0 - smat(11,1) = 0.00026951028153427303775812017580441063d0 - smat(11,2) = -0.0005487801482892964096586626164459996d0 - smat(11,3) = 0.00057954534660086284680701195417899637d0 - smat(11,4) = -0.00063629124769892768322177498423826958d0 - smat(11,5) = 0.0007293656469923361595135677000008142d0 - smat(11,6) = -0.00087913071083113910322622033027302751d0 - smat(11,7) = 0.0011276500473284478735131137599323574d0 - smat(11,8) = -0.001572263653641560264980786872737065d0 - smat(11,9) = 0.0024868264863807902223483610625209842d0 - smat(11,10) = -0.0049877287771198289944320968737508283d0 - smat(11,11) = 0.029659853920918820447715258905045729d0 - smat(11,12) = 0.030396588223050213267560446874919338d0 - smat(11,13) = -0.0066749341629101714066863242686069941d0 - smat(12,1) = -0.000035288959479095846785608236735453971d0 - smat(12,2) = 0.000071811192051347009201509649837470869d0 - smat(12,3) = -0.000075688805540651660506792727247961136d0 - smat(12,4) = 0.000082801230488540605442435753868413282d0 - smat(12,5) = -0.000094356478176003952260917120756424796d0 - smat(12,6) = 0.00011266653440511920437336940502842288d0 - smat(12,7) = -0.00014230004322922589287907593604902546d0 - smat(12,8) = 0.00019308756397099453995123507424873741d0 - smat(12,9) = -0.00028931731756445801509571048256669423d0 - smat(12,10) = 0.00050586775331751122553695563148166597d0 - smat(12,11) = -0.0011905937159861112930031456227510591d0 - smat(12,12) = 0.010989242416242542103495308538716258d0 - smat(12,13) = 0.0069091554849653485976588362077443305d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.066987298107780676618138414623531908d0 - nodes(3) = 0.25d0 - nodes(4) = 0.5d0 - nodes(5) = 0.75d0 - nodes(6) = 0.93301270189221932338186158537646809d0 - nodes(7) = 1.0d0 - smat(1,1) = 0.027217641773063450651486911537124147d0 - smat(1,2) = 0.043301987114152472024853676078676587d0 - smat(1,3) = -0.0049824159104277846004735414275810216d0 - smat(1,4) = 0.0023168848381701680174186430475824364d0 - smat(1,5) = -0.0015101936882055623782513192053587995d0 - smat(1,6) = 0.0012035299857422600293949108337421896d0 - smat(1,7) = -0.00056013600471432712629086624065363049d0 - smat(2,1) = -0.023646213201634879222915482965695576d0 - smat(2,2) = 0.11130059290333706380765806959210959d0 - smat(2,3) = 0.10900027305328492745761639857043816d0 - smat(2,4) = -0.02057085309213842198567261130155069d0 - smat(2,5) = 0.011778050831062705235394176348215943d0 - smat(2,6) = -0.0089807131778349704650812596791315465d0 - smat(2,7) = 0.0041315645761428985548622948120822023d0 - smat(3,1) = 0.017460317460317460317460317460317461d0 - smat(3,2) = -0.042997994092957230059923950470226231d0 - smat(3,3) = 0.14915674603174603174603174603174603d0 - smat(3,4) = 0.14841269841269841269841269841269841d0 - smat(3,5) = -0.034871031746031746031746031746031744d0 - smat(3,6) = 0.023156724251687388790082680628956399d0 - smat(3,7) = -0.010317460317460317460317460317460319d0 - smat(4,1) = -0.010317460317460317460317460317460317d0 - smat(4,2) = 0.023156724251687388790082680628956401d0 - smat(4,3) = -0.034871031746031746031746031746031733d0 - smat(4,4) = 0.14841269841269841269841269841269841d0 - smat(4,5) = 0.14915674603174603174603174603174604d0 - smat(4,6) = -0.042997994092957230059923950470226249d0 - smat(4,7) = 0.017460317460317460317460317460317457d0 - smat(5,1) = 0.004131564576142898554862294812082202d0 - smat(5,2) = -0.0089807131778349704650812596791315272d0 - smat(5,3) = 0.011778050831062705235394176348215959d0 - smat(5,4) = -0.02057085309213842198567261130155069d0 - smat(5,5) = 0.10900027305328492745761639857043817d0 - smat(5,6) = 0.11130059290333706380765806959210962d0 - smat(5,7) = -0.023646213201634879222915482965695588d0 - smat(6,1) = -0.00056013600471432712629086624065363037d0 - smat(6,2) = 0.0012035299857422600293949108337421987d0 - smat(6,3) = -0.0015101936882055623782513192053587914d0 - smat(6,4) = 0.0023168848381701680174186430475824367d0 - smat(6,5) = -0.0049824159104277846004735414275810177d0 - smat(6,6) = 0.043301987114152472024853676078676598d0 - smat(6,7) = 0.027217641773063450651486911537124144d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.25d0 - nodes(3) = 0.75d0 - nodes(4) = 1.0d0 - smat(1,1) = 0.10243055555555555555555555555555556d0 - smat(1,2) = 0.16319444444444444444444444444444444d0 - smat(1,3) = -0.024305555555555555555555555555555556d0 - smat(1,4) = 0.0086805555555555555555555555555555557d0 - smat(2,1) = -0.055555555555555555555555555555555556d0 - smat(2,2) = 0.30555555555555555555555555555555556d0 - smat(2,3) = 0.30555555555555555555555555555555556d0 - smat(2,4) = -0.055555555555555555555555555555555556d0 - smat(3,1) = 0.0086805555555555555555555555555555545d0 - smat(3,2) = -0.024305555555555555555555555555555554d0 - smat(3,3) = 0.16319444444444444444444444444444444d0 - smat(3,4) = 0.10243055555555555555555555555555556d0 - end select - case(17) - select case(refine) - case(8) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.0096073597983847754369088819328804816d0 - nodes(3) = 0.038060233744356621935908405301605857d0 - nodes(4) = 0.084265193848727381460605811191047122d0 - nodes(5) = 0.14644660940672623779957781894757548d0 - nodes(6) = 0.22221488349019888762858459302573356d0 - nodes(7) = 0.30865828381745511413577000798480057d0 - nodes(8) = 0.40245483899193586607585756576148888d0 - nodes(9) = 0.5d0 - nodes(10) = 0.59754516100806413392414243423851112d0 - nodes(11) = 0.69134171618254488586422999201519943d0 - nodes(12) = 0.77778511650980111237141540697426644d0 - nodes(13) = 0.85355339059327376220042218105242452d0 - nodes(14) = 0.91573480615127261853939418880895288d0 - nodes(15) = 0.96193976625564337806409159469839414d0 - nodes(16) = 0.99039264020161522456309111806711952d0 - nodes(17) = 1.0d0 - smat(1,1) = 0.0038950713533365004403197865060139599d0 - smat(1,2) = 0.0061950189195266359256232288113118945d0 - smat(1,3) = -0.00066539910616212945303957658549445881d0 - smat(1,4) = 0.00027914146921208818526779299190424039d0 - smat(1,5) = -0.0001568058434915510076750746261045871d0 - smat(1,6) = 0.00010222822224364891018823195945934367d0 - smat(1,7) = -0.000073173518185615681811119960470139492d0 - smat(1,8) = 0.000055926780896448434865623559882090993d0 - smat(1,9) = -0.00004491704897099513340814448436960827d0 - smat(1,10) = 0.00003752913014370816538674619077199704d0 - smat(1,11) = -0.000032404163988397377600953307716325469d0 - smat(1,12) = 0.000028781857882482557987297372577130755d0 - smat(1,13) = -0.000026213453468915295781570529311795577d0 - smat(1,14) = 0.000024424715021997985859391350846110261d0 - smat(1,15) = -0.000023246026549509653188479058193598994d0 - smat(1,16) = 0.000022575157601877993595915235529322567d0 - smat(1,17) = -0.000011178646663499559680213494001473159d0 - smat(2,1) = -0.0038204434440338403973082013975794384d0 - smat(2,2) = 0.017316921142479962941960103133236032d0 - smat(2,3) = 0.016888672857159681399769700772395515d0 - smat(2,4) = -0.0027952904841623698664531224236552115d0 - smat(2,5) = 0.0013682761323604267196163439629736523d0 - smat(2,6) = -0.00084473816711935125258871087172573015d0 - smat(2,7) = 0.00058820021053491252751988037201469617d0 - smat(2,8) = -0.00044245025376192048454185528973394778d0 - smat(2,9) = 0.00035180550317430076074137348637080817d0 - smat(2,10) = -0.00029198988202139433473823937027355213d0 - smat(2,11) = 0.00025096162999980954998348027144535519d0 - smat(2,12) = -0.00022218942381118846484735697691375668d0 - smat(2,13) = 0.00020190078389873633244654729543232524d0 - smat(2,14) = -0.00018782561940001404305275619713340122d0 - smat(2,15) = 0.00017857518795957715134703971692250204d0 - smat(2,16) = -0.00017331878325164164354650171569547248d0 - smat(2,17) = 0.000085806555966159602691798602539024134d0 - smat(3,1) = 0.0036740555341312078364774231049163692d0 - smat(3,2) = -0.0088296820423001607743713851786221127d0 - smat(3,3) = 0.02760131220634262594567217009112506d0 - smat(3,4) = 0.027258499947660739397986306214245278d0 - smat(3,5) = -0.0051780567399383902087151644493913821d0 - smat(3,6) = 0.0027157311565297458065982810197172734d0 - smat(3,7) = -0.0017636659398997718143190070994502465d0 - smat(3,8) = 0.0012781301307240868330801932255018392d0 - smat(3,9) = -0.00099376334515644564078614390301505557d0 - smat(3,10) = 0.00081293970700984328535223520862862087d0 - smat(3,11) = -0.00069189712309670764470479850195137527d0 - smat(3,12) = 0.00060841524839560938121623359345263144d0 - smat(3,13) = -0.00055022785765450593121021271020149674d0 - smat(3,14) = 0.0005101856719275726184986486665993719d0 - smat(3,15) = -0.00048401275080504845302040979838296085d0 - smat(3,16) = 0.00046919076636915105046561329653243337d0 - smat(3,17) = -0.00023219446586879216352257689540419586d0 - smat(4,1) = -0.003461533228910875256352581117375196d0 - smat(4,2) = 0.0075734950696364471579975761360226035d0 - smat(4,3) = -0.010527383334684234095497316692387613d0 - smat(4,4) = 0.036934547569809652301891609938216995d0 - smat(4,5) = 0.036646177073402807432941605514369385d0 - smat(4,6) = -0.007477481695240087173982005894831289d0 - smat(4,7) = 0.0040879650773713435642845002842954364d0 - smat(4,8) = -0.0027454382843440675377383418232174551d0 - smat(4,9) = 0.0020473596946494784719425878010281269d0 - smat(4,10) = -0.0016325374419481017999141549286863021d0 - smat(4,11) = 0.0013664113810838387587271074198661855d0 - smat(4,12) = -0.00118796965890721808025584648260342d0 - smat(4,13) = 0.0010659672387379707744842728247398037d0 - smat(4,14) = -0.00098311353852704934162660821748315855d0 - smat(4,15) = 0.0009294353351708490316609900808853724d0 - smat(4,16) = -0.00089920247039102261323880595965348195d0 - smat(4,17) = 0.00044471677108912474364741888323871873d0 - smat(5,1) = 0.0031910436413785781854349756627981587d0 - smat(5,2) = -0.0067394515815607778906763915266486887d0 - smat(5,3) = 0.0080830148842815524166369345593720479d0 - smat(5,4) = -0.012003180306336249323190332188158231d0 - smat(5,5) = 0.044885014521793884513670929632164857d0 - smat(5,6) = 0.044652322983471890869616128323876615d0 - smat(5,7) = -0.0095467345788427673235323842494207d0 - smat(5,8) = 0.005376225547576385240411834657836714d0 - smat(5,9) = -0.0037041224178669088293560367532953558d0 - smat(5,10) = 0.0028266524707197968127866644390531607d0 - smat(5,11) = -0.0023025738906227259903277983622395513d0 - smat(5,12) = 0.001966661348444585298108844245125869d0 - smat(5,13) = -0.0017437387689107572135495962259288742d0 - smat(5,14) = 0.0015953511376377657569643960148385776d0 - smat(5,15) = -0.0015004786322316872153435885539180062d0 - smat(5,16) = 0.001447474083161506335917218724857847d0 - smat(5,17) = -0.00071520635862142181456502433818993844d0 - smat(6,1) = -0.0028729815346908745063444027431102067d0 - smat(6,2) = 0.005964130292526792786836723415653312d0 - smat(6,3) = -0.0067205170854548380375732416177849772d0 - smat(6,4) = 0.0084693618327530608722888466720966844d0 - smat(6,5) = -0.013094351479827081547377143897050803d0 - smat(6,6) = 0.051129027613631432176285793888126432d0 - smat(6,7) = 0.050957527060864835124281018657654154d0 - smat(6,8) = -0.011285128662278881557302609065428492d0 - smat(6,9) = 0.0065083762827865909730531582347100691d0 - smat(6,10) = -0.0045820920299614787784289531925275904d0 - smat(6,11) = 0.0035686009718567383164589489452163603d0 - smat(6,12) = -0.002964782159524886775223213007100946d0 - smat(6,13) = 0.0025820208584966077988910010118134228d0 - smat(6,14) = -0.0023347154987697593645324410428006656d0 - smat(6,15) = 0.002179613158977884144892174380203992d0 - smat(6,16) = -0.0020939577594390406126758429154928932d0 - smat(6,17) = 0.0010332684653091254936555972583099978d0 - smat(7,1) = 0.002519569857236488274094847894657716d0 - smat(7,2) = -0.005180069207987981939804018991550994d0 - smat(7,3) = 0.0056480715986366009877741877808415269d0 - smat(7,4) = -0.0066204314790260149840688871570849317d0 - smat(7,5) = 0.0086236143613959076150639805484186941d0 - smat(7,6) = -0.013725972310665783821852377376333673d0 - smat(7,7) = 0.055419948686367632497633428849165461d0 - smat(7,8) = 0.055314770531630100206426272104311863d0 - smat(7,9) = -0.012616738866415137479493526582993961d0 - smat(7,10) = 0.007430950497204377982704014295068786d0 - smat(7,11) = -0.0053368420613876868238536240600804977d0 - smat(7,12) = 0.004238503118391843280399753586540338d0 - smat(7,13) = -0.003591304443105587840869009291410657d0 - smat(7,14) = 0.0031915561506760869942830598166602335d0 - smat(7,15) = -0.0029478062599608178084962020476339792d0 - smat(7,16) = 0.0028154151442542365260508104837000772d0 - smat(7,17) = -0.001386680142763511725905152107301528d0 - smat(8,1) = -0.0021443900215844394782826322237573846d0 - smat(8,2) = 0.0043825140658723793225886598876000491d0 - smat(8,3) = -0.0046858812726632986623030896624416012d0 - smat(8,4) = 0.0052796769362635046062918922177217844d0 - smat(8,5) = -0.0063665870228177279324400390096357818d0 - smat(8,6) = 0.0085055665279018808962662306234228459d0 - smat(8,7) = -0.013860386311961289496991374521531859d0 - smat(8,8) = 0.057589984111542563421019671498060994d0 - smat(8,9) = 0.057554531653271748820526910715797239d0 - smat(8,10) = -0.013486540046668642454553854882530972d0 - smat(8,11) = 0.0081049546881525303124951453812343499d0 - smat(8,12) = -0.0059377725207729523269573367906614263d0 - smat(8,13) = 0.0048125488232447128482166582617945541d0 - smat(8,14) = -0.0041654122137955465745826257213395758d0 - smat(8,15) = 0.003787195011558709507414902638057425d0 - smat(8,16) = -0.0035867013778955594062840519083935907d0 - smat(8,17) = 0.0017618599784155605217173677783946838d0 - smat(9,1) = 0.0017618599784155605217173677771161854d0 - smat(9,2) = -0.0035867013778955594062840519306536587d0 - smat(9,3) = 0.0037871950115587095074149026426961925d0 - smat(9,4) = -0.0041654122137955465745826257294268194d0 - smat(9,5) = 0.0048125488232447128482166582519652036d0 - smat(9,6) = -0.0059377725207729523269573367838856264d0 - smat(9,7) = 0.0081049546881525303124951453844130743d0 - smat(9,8) = -0.0134865400466686424545538548847681d0 - smat(9,9) = 0.057554531653271748820526910714959227d0 - smat(9,10) = 0.057589984111542563421019671497801585d0 - smat(9,11) = -0.01386038631196128949699137451613799d0 - smat(9,12) = 0.0085055665279018808962662306218890865d0 - smat(9,13) = -0.006366587022817727932440039037387738d0 - smat(9,14) = 0.0052796769362635046062918922067347827d0 - smat(9,15) = -0.0046858812726632986623030896565647319d0 - smat(9,16) = 0.0043825140658723793225886598675419014d0 - smat(9,17) = -0.0021443900215844394782826322273078547d0 - smat(10,1) = -0.0013866801427635117259051521015116181d0 - smat(10,2) = 0.0028154151442542365260508104910614368d0 - smat(10,3) = -0.0029478062599608178084962020580166336d0 - smat(10,4) = 0.0031915561506760869942830598360424488d0 - smat(10,5) = -0.0035913044431055878408690092379091604d0 - smat(10,6) = 0.0042385031183918432803997536118724618d0 - smat(10,7) = -0.005336842061387686823853624053871102d0 - smat(10,8) = 0.0074309504972043779827040142843920153d0 - smat(10,9) = -0.012616738866415137479493526584995385d0 - smat(10,10) = 0.055314770531630100206426272101339473d0 - smat(10,11) = 0.055419948686367632497633428850538083d0 - smat(10,12) = -0.013725972310665783821852377381201549d0 - smat(10,13) = 0.0086236143613959076150639805683144813d0 - smat(10,14) = -0.0066204314790260149840688871363295099d0 - smat(10,15) = 0.0056480715986366009877741877694528932d0 - smat(10,16) = -0.0051800692079879819398040189580520232d0 - smat(10,17) = 0.0025195698572364882740948478962198312d0 - smat(11,1) = 0.0010332684653091254936555972660792549d0 - smat(11,2) = -0.0020939577594390406126758429270591335d0 - smat(11,3) = 0.0021796131589778841448921743550500344d0 - smat(11,4) = -0.0023347154987697593645324409937306038d0 - smat(11,5) = 0.0025820208584966077988910011460654956d0 - smat(11,6) = -0.0029647821595248867752232129335628606d0 - smat(11,7) = 0.0035686009718567383164589489694143874d0 - smat(11,8) = -0.0045820920299614787784289532265036901d0 - smat(11,9) = 0.0065083762827865909730531582373665921d0 - smat(11,10) = -0.011285128662278881557302609075020481d0 - smat(11,11) = 0.050957527060864835124281018699703592d0 - smat(11,12) = 0.051129027613631432176285793866713824d0 - smat(11,13) = -0.013094351479827081547377143988881948d0 - smat(11,14) = 0.0084693618327530608722888466704210155d0 - smat(11,15) = -0.0067205170854548380375732416184792763d0 - smat(11,16) = 0.0059641302925267927868367234036584558d0 - smat(11,17) = -0.0028729815346908745063444027538085085d0 - smat(12,1) = -0.00071520635862142181456502432412164153d0 - smat(12,2) = 0.0014474740831615063359172187778919007d0 - smat(12,3) = -0.001500478632231687215343588642605319d0 - smat(12,4) = 0.0015953511376377657569643961855561037d0 - smat(12,5) = -0.0017437387689107572135495958403058398d0 - smat(12,6) = 0.0019666613484445852981088444083017316d0 - smat(12,7) = -0.0023025738906227259903277983071247797d0 - smat(12,8) = 0.002826652470719796812786664360326262d0 - smat(12,9) = -0.0037041224178669088293560367257408665d0 - smat(12,10) = 0.0053762255475763852404118346347793957d0 - smat(12,11) = -0.0095467345788427673235323840965416803d0 - smat(12,12) = 0.044652322983471890869616128252146704d0 - smat(12,13) = 0.044885014521793884513670929691144145d0 - smat(12,14) = -0.012003180306336249323190332117146918d0 - smat(12,15) = 0.0080830148842815524166369345273381073d0 - smat(12,16) = -0.0067394515815607778906763914514725652d0 - smat(12,17) = 0.0031910436413785781854349756503647552d0 - smat(13,1) = 0.00044471677108912474364741888868330735d0 - smat(13,2) = -0.00089920247039102261323880580941538539d0 - smat(13,3) = 0.00092943533517084903166098989535619806d0 - smat(13,4) = -0.00098311353852704934162660786092640315d0 - smat(13,5) = 0.0010659672387379707744842735555181692d0 - smat(13,6) = -0.0011879696589072180802558462046954622d0 - smat(13,7) = 0.001366411381083838758727107520463067d0 - smat(13,8) = -0.001632537441948101799914155061857991d0 - smat(13,9) = 0.002047359694649478471942587885154337d0 - smat(13,10) = -0.0027454382843440675377383418670965733d0 - smat(13,11) = 0.0040879650773713435642845005923362206d0 - smat(13,12) = -0.007477481695240087173982006056071016d0 - smat(13,13) = 0.036646177073402807432941605439046892d0 - smat(13,14) = 0.036934547569809652301891609932801182d0 - smat(13,15) = -0.010527383334684234095497316705948813d0 - smat(13,16) = 0.0075734950696364471579975761619759844d0 - smat(13,17) = -0.0034615332289108752563525811521564993d0 - smat(14,1) = -0.00023219446586879216352257690898223966d0 - smat(14,2) = 0.00046919076636915105046561358092777085d0 - smat(14,3) = -0.00048401275080504845302041008100124172d0 - smat(14,4) = 0.00051018567192757261849864920497409253d0 - smat(14,5) = -0.00055022785765450593121021167885992735d0 - smat(14,6) = 0.00060841524839560938121623394728076994d0 - smat(14,7) = -0.00069189712309670764470479836827331848d0 - smat(14,8) = 0.00081293970700984328535223504545411255d0 - smat(14,9) = -0.00099376334515644564078614375361407545d0 - smat(14,10) = 0.0012781301307240868330801931630168261d0 - smat(14,11) = -0.0017636659398997718143190066484163196d0 - smat(14,12) = 0.002715731156529745806598280773329298d0 - smat(14,13) = -0.0051780567399383902087151647697526221d0 - smat(14,14) = 0.02725849994766073939798630625836582d0 - smat(14,15) = 0.027601312206342625945672170026279152d0 - smat(14,16) = -0.0088296820423001607743713850550549162d0 - smat(14,17) = 0.0036740555341312078364774230719544768d0 - smat(15,1) = 0.000085806555966159602691798574431774067d0 - smat(15,2) = -0.00017331878325164164354650141433409138d0 - smat(15,3) = 0.00017857518795957715134703944073829231d0 - smat(15,4) = -0.00018782561940001404305275567474974496d0 - smat(15,5) = 0.00020190078389873633244654825734044679d0 - smat(15,6) = -0.00022218942381118846484735666629637093d0 - smat(15,7) = 0.00025096162999980954998348039301622766d0 - smat(15,8) = -0.00029198988202139433473823950677862951d0 - smat(15,9) = 0.00035180550317430076074137364553789126d0 - smat(15,10) = -0.00044245025376192048454185534966131527d0 - smat(15,11) = 0.00058820021053491252751988080447678792d0 - smat(15,12) = -0.00084473816711935125258871111500999679d0 - smat(15,13) = 0.0013682761323604267196163436846562426d0 - smat(15,14) = -0.0027952904841623698664531223201772478d0 - smat(15,15) = 0.016888672857159681399769700733808474d0 - smat(15,16) = 0.017316921142479962941960103108484618d0 - smat(15,17) = -0.0038204434440338403973082014353410233d0 - smat(16,1) = -0.000011178646663499559680213508865536299d0 - smat(16,2) = 0.000022575157601877993595915369024657866d0 - smat(16,3) = -0.000023246026549509653188479175772513871d0 - smat(16,4) = 0.000024424715021997985859391572239024674d0 - smat(16,5) = -0.000026213453468915295781570129157737542d0 - smat(16,6) = 0.000028781857882482557987297497614635806d0 - smat(16,7) = -0.000032404163988397377600953257931587248d0 - smat(16,8) = 0.000037529130143708165386746137597140786d0 - smat(16,9) = -0.000044917048970995133408144414211821921d0 - smat(16,10) = 0.000055926780896448434865623534569103294d0 - smat(16,11) = -0.000073173518185615681811119778387437726d0 - smat(16,12) = 0.00010222822224364891018823185573495191d0 - smat(16,13) = -0.00015680584349155100767507474500149323d0 - smat(16,14) = 0.0002791414692120881852677930309943269d0 - smat(16,15) = -0.00066539910616212945303957658861861675d0 - smat(16,16) = 0.0061950189195266359256232288045155508d0 - smat(16,17) = 0.0038950713533365004403197864986105568d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.038060233744356621935908405301605857d0 - nodes(3) = 0.14644660940672623779957781894757548d0 - nodes(4) = 0.30865828381745511413577000798480057d0 - nodes(5) = 0.5d0 - nodes(6) = 0.69134171618254488586422999201519943d0 - nodes(7) = 0.85355339059327376220042218105242452d0 - nodes(8) = 0.96193976625564337806409159469839414d0 - nodes(9) = 1.0d0 - smat(1,1) = 0.015446942589330503000508663449987255d0 - smat(1,2) = 0.024571482764589171269473279957615346d0 - smat(1,3) = -0.0027292031693117551469555730885524011d0 - smat(1,4) = 0.0012032717847525820515086196769462349d0 - smat(1,5) = -0.0007254858795644505687305583642067501d0 - smat(1,6) = 0.0005193332763892971933218119544627156d0 - smat(1,7) = -0.00041852184693699231788565624639968958d0 - smat(1,8) = 0.00037047163577776345415915451176587754d0 - smat(1,9) = -0.00017805741066949699949133655001274502d0 - smat(2,1) = -0.014284667911499342383051696632943004d0 - smat(2,2) = 0.065936015302512478001394667403264558d0 - smat(2,3) = 0.064433133068355454270914110191314059d0 - smat(2,4) = -0.011352775377787173411387730111410457d0 - smat(2,5) = 0.0059796718502256497349685233567425182d0 - smat(2,6) = -0.0040641423785444213585649548332606578d0 - smat(2,7) = 0.0031968866471017310751071631737572791d0 - smat(2,8) = -0.002798077626495417682658972268551566d0 - smat(2,9) = 0.0013403320885006576169483033670569956d0 - smat(3,1) = 0.012137064339490624190989302960854163d0 - smat(3,2) = -0.029504918979320072720126753003180839d0 - smat(3,3) = 0.09681395624632992106397229434301373d0 - smat(3,4) = 0.095937513323380720744747485105547128d0 - smat(3,5) = -0.020065348060354333061956683400867557d0 - smat(3,6) = 0.011658919281530739014576110710998294d0 - smat(3,7) = -0.0086164639990830224068874253060961936d0 - smat(3,8) = 0.0073388879192636753198885546661019445d0 - smat(3,9) = -0.0034879356605093758090106970391458451d0 - smat(4,1) = -0.0093310850490678165544780158096444382d0 - smat(4,2) = 0.020651758228406044235552779596616959d0 - smat(4,3) = -0.029751051205224818551352531429101463d0 - smat(4,4) = 0.11352170202280769331051897659152622d0 - smat(4,5) = 0.11322386050239154659413141682103022d0 - smat(4,6) = -0.026564892572284546796719478807455749d0 - smat(4,7) = 0.016753803941309164552770158044604414d0 - smat(4,8) = -0.013456294636724564371715297182731607d0 - smat(4,9) = 0.0062939149509321834455219841903555566d0 - smat(5,1) = 0.0062939149509321834455219841903555279d0 - smat(5,2) = -0.013456294636724564371715297182731863d0 - smat(5,3) = 0.016753803941309164552770158044604307d0 - smat(5,4) = -0.02656489257228454679671947880745535d0 - smat(5,5) = 0.11322386050239154659413141682102966d0 - smat(5,6) = 0.11352170202280769331051897659152612d0 - smat(5,7) = -0.029751051205224818551352531429101765d0 - smat(5,8) = 0.02065175822840604423555277959661683d0 - smat(5,9) = -0.0093310850490678165544780158096444724d0 - smat(6,1) = -0.003487935660509375809010697039145936d0 - smat(6,2) = 0.0073388879192636753198885546661022262d0 - smat(6,3) = -0.0086164639990830224068874253060961643d0 - smat(6,4) = 0.011658919281530739014576110710999555d0 - smat(6,5) = -0.02006534806035433306195668340086967d0 - smat(6,6) = 0.095937513323380720744747485105547664d0 - smat(6,7) = 0.096813956246329921063972294343014024d0 - smat(6,8) = -0.029504918979320072720126753003179116d0 - smat(6,9) = 0.012137064339490624190989302960854117d0 - smat(7,1) = 0.001340332088500657616948303367056873d0 - smat(7,2) = -0.0027980776264954176826589722685514887d0 - smat(7,3) = 0.0031968866471017310751071631737572239d0 - smat(7,4) = -0.0040641423785444213585649548332590465d0 - smat(7,5) = 0.0059796718502256497349685233567392369d0 - smat(7,6) = -0.01135277537778717341138773011140933d0 - smat(7,7) = 0.064433133068355454270914110191313952d0 - smat(7,8) = 0.065936015302512478001394667403264912d0 - smat(7,9) = -0.01428466791149934238305169663294307d0 - smat(8,1) = -0.00017805741066949699949133655001280258d0 - smat(8,2) = 0.00037047163577776345415915451176594706d0 - smat(8,3) = -0.00041852184693699231788565624639970263d0 - smat(8,4) = 0.00051933327638929719332181195446349925d0 - smat(8,5) = -0.00072548587956445056873055836420848331d0 - smat(8,6) = 0.0012032717847525820515086196769467959d0 - smat(8,7) = -0.0027292031693117551469555730885526981d0 - smat(8,8) = 0.024571482764589171269473279957615764d0 - smat(8,9) = 0.015446942589330503000508663449987241d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.14644660940672623779957781894757548d0 - nodes(3) = 0.5d0 - nodes(4) = 0.85355339059327376220042218105242452d0 - nodes(5) = 1.0d0 - smat(1,1) = 0.059701779686442458740014072701747484d0 - smat(1,2) = 0.095031716019062009094954263719320677d0 - smat(1,3) = -0.012132034355964257320253308631454712d0 - smat(1,4) = 0.0066433683707435685448487184562145472d0 - smat(1,5) = -0.002798220313557541259985927298252516d0 - smat(2,1) = -0.043035113019775792073347406035080817d0 - smat(2,2) = 0.21507831261090820533859016014022492d0 - smat(2,3) = 0.21213203435596425732025330863145471d0 - smat(2,4) = -0.050086730334047116311726475649093474d0 - smat(2,5) = 0.019464886980224207926652593964919183d0 - smat(3,1) = 0.019464886980224207926652593964919183d0 - smat(3,2) = -0.050086730334047116311726475649093474d0 - smat(3,3) = 0.21213203435596425732025330863145471d0 - smat(3,4) = 0.21507831261090820533859016014022492d0 - smat(3,5) = -0.043035113019775792073347406035080818d0 - smat(4,1) = -0.0027982203135575412599859272982525158d0 - smat(4,2) = 0.0066433683707435685448487184562145471d0 - smat(4,3) = -0.012132034355964257320253308631454713d0 - smat(4,4) = 0.095031716019062009094954263719320676d0 - smat(4,5) = 0.059701779686442458740014072701747484d0 - case(16) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - end select - end subroutine sdcquadCC - - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! - ! Set Gauss-Lobatto SDC nodes and S matrix. - ! - subroutine sdcquadGL(nnodes, refine, smat, nodes) - implicit none - integer, intent(in) :: nnodes, refine - real(8), intent(out) :: smat((nnodes-1)/refine,(nnodes-1)/refine+1) - real(8), intent(out) :: nodes((nnodes-1)/refine+1) - - select case(nnodes) - case(2) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - case(3) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - case(4) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.27639320225002103035908263312687238d0 - nodes(3) = 0.72360679774997896964091736687312762d0 - nodes(4) = 1.0d0 - smat(1,1) = 0.11030056647916491413674311390609397d0 - smat(1,2) = 0.18969943352083508586325688609390603d0 - smat(1,3) = -0.033907364229143883777660480779221592d0 - smat(1,4) = 0.010300566479164914136743113906093969d0 - smat(2,1) = -0.037267799624996494940152894478854605d0 - smat(2,2) = 0.26087459737497546458107026135198223d0 - smat(2,3) = 0.26087459737497546458107026135198223d0 - smat(2,4) = -0.037267799624996494940152894478854604d0 - smat(3,1) = 0.010300566479164914136743113906093968d0 - smat(3,2) = -0.03390736422914388377766048077922159d0 - smat(3,3) = 0.18969943352083508586325688609390603d0 - smat(3,4) = 0.11030056647916491413674311390609397d0 - end select - case(5) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.17267316464601142810085377187657082d0 - nodes(3) = 0.5d0 - nodes(4) = 0.82732683535398857189914622812342918d0 - nodes(5) = 1.0d0 - smat(1,1) = 0.067728432186156897969267419174073482d0 - smat(1,2) = 0.11974476934341168251615379970493965d0 - smat(1,3) = -0.021735721866558113665511351745074292d0 - smat(1,4) = 0.010635824225415491883105056997129926d0 - smat(1,5) = -0.0037001392424145306021611522544979462d0 - smat(2,1) = -0.027103432186156897969267419174073483d0 - smat(2,2) = 0.1834394139796310955018131986775051d0 - smat(2,3) = 0.19951349964433589144328912952285207d0 - smat(2,4) = -0.041597785326236047678849833157352459d0 - smat(2,5) = 0.013075139242414530602161152254497946d0 - smat(3,1) = 0.013075139242414530602161152254497944d0 - smat(3,2) = -0.041597785326236047678849833157352467d0 - smat(3,3) = 0.19951349964433589144328912952285207d0 - smat(3,4) = 0.1834394139796310955018131986775051d0 - smat(3,5) = -0.027103432186156897969267419174073483d0 - smat(4,1) = -0.0037001392424145306021611522544979483d0 - smat(4,2) = 0.010635824225415491883105056997129916d0 - smat(4,3) = -0.021735721866558113665511351745074289d0 - smat(4,4) = 0.11974476934341168251615379970493965d0 - smat(4,5) = 0.067728432186156897969267419174073482d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - case(7) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.08488805186071653506398389301626743d0 - nodes(3) = 0.26557560326464289309811405904561684d0 - nodes(4) = 0.5d0 - nodes(5) = 0.73442439673535710690188594095438316d0 - nodes(6) = 0.91511194813928346493601610698373257d0 - nodes(7) = 1.0d0 - smat(1,1) = 0.032846264328292647881547377380331422d0 - smat(1,2) = 0.059322894027551404504198527596713417d0 - smat(1,3) = -0.010768594451189267105573388916275431d0 - smat(1,4) = 0.0055975917805697772306731264515785006d0 - smat(1,5) = -0.0034889299708074627664800460458214549d0 - smat(1,6) = 0.0022170965889145396997313080577989004d0 - smat(1,7) = -0.00083827044261510438011301150805792506d0 - smat(2,1) = -0.014844041126477482177573917220046854d0 - smat(2,2) = 0.098378236614137637543590534877657125d0 - smat(2,3) = 0.11312340649805118231952005065436878d0 - smat(2,4) = -0.024075851054028821213813638699094632d0 - smat(2,5) = 0.013066510071548868720769722563293356d0 - smat(2,6) = -0.007898961155138917272704488025874257d0 - smat(2,7) = 0.0029382515558338901143419018790458892d0 - smat(3,1) = 0.0095275387029467390579313017444773406d0 - smat(3,2) = -0.029912875081851572461120588119813071d0 - smat(3,3) = 0.13513084067478352829638957489055147d0 - smat(3,4) = 0.14038302117822094874504527415227803d0 - smat(3,5) = -0.031190542217455537755690402005435583d0 - smat(3,6) = 0.016306632687169881991654908758551025d0 - smat(3,7) = -0.0058202192084568809723241284662260596d0 - smat(4,1) = -0.0058202192084568809723241284662260527d0 - smat(4,2) = 0.016306632687169881991654908758551021d0 - smat(4,3) = -0.031190542217455537755690402005435601d0 - smat(4,4) = 0.14038302117822094874504527415227805d0 - smat(4,5) = 0.13513084067478352829638957489055146d0 - smat(4,6) = -0.029912875081851572461120588119813028d0 - smat(4,7) = 0.0095275387029467390579313017444773374d0 - smat(5,1) = 0.0029382515558338901143419018790458885d0 - smat(5,2) = -0.0078989611551389172727044880258742804d0 - smat(5,3) = 0.013066510071548868720769722563293299d0 - smat(5,4) = -0.024075851054028821213813638699094569d0 - smat(5,5) = 0.11312340649805118231952005065436878d0 - smat(5,6) = 0.098378236614137637543590534877657116d0 - smat(5,7) = -0.01484404112647748217757391722004685d0 - smat(6,1) = -0.00083827044261510438011301150805793219d0 - smat(6,2) = 0.0022170965889145396997313080577988887d0 - smat(6,3) = -0.0034889299708074627664800460458215095d0 - smat(6,4) = 0.0055975917805697772306731264515785569d0 - smat(6,5) = -0.010768594451189267105573388916275418d0 - smat(6,6) = 0.059322894027551404504198527596713429d0 - smat(6,7) = 0.032846264328292647881547377380331424d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.26557560326464289309811405904561684d0 - nodes(3) = 0.73442439673535710690188594095438316d0 - nodes(4) = 1.0d0 - smat(1,1) = 0.10715228991046060259362482448762206d0 - smat(1,2) = 0.17839900068455401485955625157062166d0 - smat(1,3) = -0.029605376133200380848848921804927737d0 - smat(1,4) = 0.0096296888028286564937819047923008503d0 - smat(2,1) = -0.044033366529337851989134612631389608d0 - smat(2,2) = 0.27845776326469495889102055358577277d0 - smat(2,3) = 0.27845776326469495889102055358577277d0 - smat(2,4) = -0.044033366529337851989134612631389609d0 - smat(3,1) = 0.0096296888028286564937819047923008507d0 - smat(3,2) = -0.029605376133200380848848921804927739d0 - smat(3,3) = 0.17839900068455401485955625157062166d0 - smat(3,4) = 0.10715228991046060259362482448762206d0 - end select - case(9) - select case(refine) - case(8) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.050121002294269921343827377790831021d0 - nodes(3) = 0.16140686024463112327705728645432877d0 - nodes(4) = 0.31844126808691092064462396564567039d0 - nodes(5) = 0.5d0 - nodes(6) = 0.68155873191308907935537603435432961d0 - nodes(7) = 0.83859313975536887672294271354567123d0 - nodes(8) = 0.94987899770573007865617262220916898d0 - nodes(9) = 1.0d0 - smat(1,1) = 0.01929383820104321255959180983657622d0 - smat(1,2) = 0.035125520977621796835804754698841396d0 - smat(1,3) = -0.0063641024187047848382867337621814209d0 - smat(1,4) = 0.0033337771969983822838953024622409661d0 - smat(1,5) = -0.0021368470176082402286362169591461734d0 - smat(1,6) = 0.0014942991627282266615861703969998644d0 - smat(1,7) = -0.0010740606993816592835517151742117065d0 - smat(1,8) = 0.00073377266653928893305941646073070123d0 - smat(1,9) = -0.00028519577496630157963541016901882398d0 - smat(2,1) = -0.0091097577928155630356858967516355718d0 - smat(2,2) = 0.059960987471740313487022288583111465d0 - smat(2,3) = 0.070296098047142873148422267385556947d0 - smat(2,4) = -0.01491950853084110089849710840675199d0 - smat(2,5) = 0.0082867839181600416563050774591966602d0 - smat(2,6) = -0.0054751249499109258618626287807744952d0 - smat(2,7) = 0.0038293847888008123119484828413555037d0 - smat(2,8) = -0.0025812778059228966119317226329364923d0 - smat(2,9) = 0.00099827280400764773750914896637572119d0 - smat(3,1) = 0.0063852894353441505258017149742988603d0 - smat(3,2) = -0.019992991353155140735457471041512992d0 - smat(3,3) = 0.088950065396445358222556830527948461d0 - smat(3,4) = 0.095671210022755845457893355168963792d0 - smat(3,5) = -0.021280610072886296125948299634482418d0 - smat(3,6) = 0.011981429357581907782191514383522278d0 - smat(3,7) = -0.007851649951160637778659063552931846d0 - smat(3,8) = 0.0051371297094232104169666096822689933d0 - smat(3,9) = -0.0019654647020686003977785113167334777d0 - smat(4,1) = -0.0045793524824606889385965169481283804d0 - smat(4,2) = 0.012776316626856166239969250656049772d0 - smat(4,3) = -0.024199838718300382805744226975463246d0 - smat(4,4) = 0.10567260162700525505353424269214943d0 - smat(4,5) = 0.10801049176643880308830211487139337d0 - smat(4,6) = -0.024544428399794417921175081846490673d0 - smat(4,7) = 0.013683459805239288663666967999613671d0 - smat(4,8) = -0.0084117775126999760422632663919486652d0 - smat(4,9) = 0.0031512592008050320176825502971543592d0 - smat(5,1) = 0.0031512592008050320176825502971543772d0 - smat(5,2) = -0.008411777512699976042263266391948609d0 - smat(5,3) = 0.013683459805239288663666967999613528d0 - smat(5,4) = -0.024544428399794417921175081846490421d0 - smat(5,5) = 0.10801049176643880308830211487139369d0 - smat(5,6) = 0.10567260162700525505353424269214951d0 - smat(5,7) = -0.02419983871830038280574422697546314d0 - smat(5,8) = 0.012776316626856166239969250656049783d0 - smat(5,9) = -0.004579352482460688938596516948128527d0 - smat(6,1) = -0.0019654647020686003977785113167334363d0 - smat(6,2) = 0.0051371297094232104169666096822690056d0 - smat(6,3) = -0.0078516499511606377786590635529322756d0 - smat(6,4) = 0.011981429357581907782191514383522773d0 - smat(6,5) = -0.021280610072886296125948299634481156d0 - smat(6,6) = 0.095671210022755845457893355168963937d0 - smat(6,7) = 0.088950065396445358222556830527948536d0 - smat(6,8) = -0.019992991353155140735457471041513007d0 - smat(6,9) = 0.0063852894353441505258017149742986068d0 - smat(7,1) = 0.00099827280400764773750914896637568664d0 - smat(7,2) = -0.0025812778059228966119317226329365601d0 - smat(7,3) = 0.0038293847888008123119484828413548151d0 - smat(7,4) = -0.0054751249499109258618626287807737764d0 - smat(7,5) = 0.0082867839181600416563050774591988273d0 - smat(7,6) = -0.014919508530841100898497108406751991d0 - smat(7,7) = 0.070296098047142873148422267385557046d0 - smat(7,8) = 0.059960987471740313487022288583111558d0 - smat(7,9) = -0.0091097577928155630356858967516361684d0 - smat(8,1) = -0.00028519577496630157963541016901886324d0 - smat(8,2) = 0.00073377266653928893305941646073061345d0 - smat(8,3) = -0.0010740606993816592835517151742121944d0 - smat(8,4) = 0.001494299162728226661586170397000332d0 - smat(8,5) = -0.0021368470176082402286362169591446166d0 - smat(8,6) = 0.0033337771969983822838953024622409639d0 - smat(8,7) = -0.006364102418704784838286733762181339d0 - smat(8,8) = 0.035125520977621796835804754698841438d0 - smat(8,9) = 0.019293838201043212559591809836576012d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.16140686024463112327705728645432877d0 - nodes(3) = 0.5d0 - nodes(4) = 0.83859313975536887672294271354567123d0 - nodes(5) = 1.0d0 - smat(1,1) = 0.064373074514399118473727713839915566d0 - smat(1,2) = 0.10867271363747866269435538086532761d0 - smat(1,3) = -0.01706833884506950893445373594028856d0 - smat(1,4) = 0.0087336792787243527118839371920118381d0 - smat(1,5) = -0.0033042683409015016684560095026376805d0 - smat(2,1) = -0.033043833854725404266409048990625051d0 - smat(2,2) = 0.19604819942080738869403743761587039d0 - smat(2,3) = 0.2050257641443853403480126634051993d0 - smat(2,4) = -0.044945402443055775831970406511540064d0 - smat(2,5) = 0.015508412487957327779272068026766654d0 - smat(3,1) = 0.015508412487957327779272068026766651d0 - smat(3,2) = -0.044945402443055775831970406511540064d0 - smat(3,3) = 0.2050257641443853403480126634051993d0 - smat(3,4) = 0.19604819942080738869403743761587039d0 - smat(3,5) = -0.03304383385472540426640904899062505d0 - smat(4,1) = -0.0033042683409015016684560095026376829d0 - smat(4,2) = 0.0087336792787243527118839371920118382d0 - smat(4,3) = -0.017068338845069508934453735940288563d0 - smat(4,4) = 0.10867271363747866269435538086532761d0 - smat(4,5) = 0.064373074514399118473727713839915566d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - end select - case(13) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.023345076678918044051547267622275424d0 - nodes(3) = 0.07682621767406384156703719645062332d0 - nodes(4) = 0.15690576545912128696362048021682222d0 - nodes(5) = 0.25854508945433189912653138318153319d0 - nodes(6) = 0.37535653494688000371566314981288651d0 - nodes(7) = 0.5d0 - nodes(8) = 0.62464346505311999628433685018711349d0 - nodes(9) = 0.74145491054566810087346861681846681d0 - nodes(10) = 0.84309423454087871303637951978317778d0 - nodes(11) = 0.92317378232593615843296280354937668d0 - nodes(12) = 0.97665492332108195594845273237772458d0 - nodes(13) = 1.0d0 - smat(1,1) = 0.0089516664290492543488459693641154749d0 - smat(1,2) = 0.016394941409005488641035370593682598d0 - smat(1,3) = -0.0029645579056363292094773014293706026d0 - smat(1,4) = 0.0015570365400511474308570888771336358d0 - smat(1,5) = -0.001006428170182765813095770517691479d0 - smat(1,6) = 0.0007190435396289052424374363717949691d0 - smat(1,7) = -0.00054447355263089598199497658191839296d0 - smat(1,8) = 0.00042705722368298591113966995972492842d0 - smat(1,9) = -0.00034127147037031058340229653559059163d0 - smat(1,10) = 0.00027325389026460871768250741289537543d0 - smat(1,11) = -0.00021370824360146965148646975096435233d0 - smat(1,12) = 0.00015326455806115744464049820097501839d0 - smat(1,13) = -0.000060747568403732445634458342512499446d0 - smat(2,1) = -0.0043651954876963111901906934491178649d0 - smat(2,2) = 0.028593802868135422012347912361221988d0 - smat(2,3) = 0.033997387127231133422578025387294244d0 - smat(2,4) = -0.0071861411376939650215910010421974787d0 - smat(2,5) = 0.0040174878080693141820519539726654278d0 - smat(2,6) = -0.0027059746882329188833511749605306788d0 - smat(2,7) = 0.0019880541573910556809097729672371039d0 - smat(2,8) = -0.0015323686749921173030124951806224655d0 - smat(2,9) = 0.0012114414686008620767341318721684935d0 - smat(2,10) = -0.00096338407040393008686841166402404953d0 - smat(2,11) = 0.00075022740245101321789807530450690121d0 - smat(2,12) = -0.00053671817129911138998070072382291d0 - smat(2,13) = 0.00021252239358535079796453398357390168d0 - smat(3,1) = 0.0032517336907376481508110904389331507d0 - smat(3,2) = -0.010167796872956119416988861789026946d0 - smat(3,3) = 0.044806735364961543899480547574614586d0 - smat(3,4) = 0.049341498882242656534681967109566668d0 - smat(3,5) = -0.010916045256426182929928992672469097d0 - smat(3,6) = 0.006236757637718945507788690632439036d0 - smat(3,7) = -0.004268781486806910106383810316725141d0 - smat(3,8) = 0.0031685960917198882415991619513125799d0 - smat(3,9) = -0.0024499064726319824423766310386946006d0 - smat(3,10) = 0.0019216684383045607436816308597547993d0 - smat(3,11) = -0.0014838619916835230928180591931840799d0 - smat(3,12) = 0.0010564757900883006549157882207007169d0 - smat(3,13) = -0.00041752603021138034787923801103210087d0 - smat(4,1) = -0.0025733160692668747752356568029676313d0 - smat(4,2) = 0.0071672815450939414724467986572922232d0 - smat(4,3) = -0.013521006494915505121296965634113488d0 - smat(4,4) = 0.05810443564641467970948395436824686d0 - smat(4,5) = 0.061549146121953899025475102230174679d0 - smat(4,6) = -0.013914688675330097265712826340337998d0 - smat(4,7) = 0.0080228169564618181011133721492691978d0 - smat(4,8) = -0.0055221074850718601527974492634063868d0 - smat(4,9) = 0.0040996065583828904685929339382725585d0 - smat(4,10) = -0.0031398893501405182221541872758094328d0 - smat(4,11) = 0.0023902294012749194439468590441061991d0 - smat(4,12) = -0.0016883247656511657310168341136462284d0 - smat(4,13) = 0.0006651406060044852100658020076457956d0 - smat(5,1) = 0.0020631747843585146647599411313476068d0 - smat(5,2) = -0.0054931059774658873740429238623394254d0 - smat(5,3) = 0.0088833138015635613028177389454893685d0 - smat(5,4) = -0.015792947967838408060602122180814605d0 - smat(5,5) = 0.067715997614330727572231278361898572d0 - smat(5,6) = 0.069869813192030921203967431577781863d0 - smat(5,7) = -0.01600097865986761001256679412376586d0 - smat(5,8) = 0.0092544694968835102460471421803811647d0 - smat(5,9) = -0.0063613912616261101763852157765067796d0 - smat(5,10) = 0.004676003585794580107978555374382681d0 - smat(5,11) = -0.003477598079941212020372519533277637d0 - smat(5,12) = 0.0024256067150384048798640113511405557d0 - smat(5,13) = -0.00095091175071288774456475681438465971d0 - smat(6,1) = -0.0016408387878873594041188558105183132d0 - smat(6,2) = 0.004271848506199340682923210980481919d0 - smat(6,3) = -0.0064699618461119004978383592541014433d0 - smat(6,4) = 0.0097367610539852159922102246960529451d0 - smat(6,5) = -0.016979849321385193218675672283952694d0 - smat(6,6) = 0.073053236300968409750863925212371708d0 - smat(6,7) = 0.073786074918814226329957096291212739d0 - smat(6,8) = -0.01704593880566839426968043796084565d0 - smat(6,9) = 0.0098451091643398948815461826394247698d0 - smat(6,10) = -0.0067048629092055818416130771617689195d0 - smat(6,11) = 0.0047937648092119428665258098336813087d0 - smat(6,12) = -0.003276432230840307979349775710069542d0 - smat(6,13) = 0.0012745542006997029915865787151737261d0 - smat(7,1) = 0.0012745542006997029915865787151591054d0 - smat(7,2) = -0.0032764322308403079793497757100566752d0 - smat(7,3) = 0.0047937648092119428665258098337570382d0 - smat(7,4) = -0.0067048629092055818416130771618184212d0 - smat(7,5) = 0.0098451091643398948815461826393964206d0 - smat(7,6) = -0.017045938805668394269680437960871985d0 - smat(7,7) = 0.073786074918814226329957096291223289d0 - smat(7,8) = 0.073053236300968409750863925212382268d0 - smat(7,9) = -0.016979849321385193218675672283990453d0 - smat(7,10) = 0.009736761053985215992210224696033653d0 - smat(7,11) = -0.0064699618461119004978383592540693244d0 - smat(7,12) = 0.0042718485061993406829232109804486632d0 - smat(7,13) = -0.0016408387878873594041188558105259133d0 - smat(8,1) = -0.00095091175071288774456475681441543583d0 - smat(8,2) = 0.0024256067150384048798640113512623473d0 - smat(8,3) = -0.0034775980799412120203725195331154752d0 - smat(8,4) = 0.0046760035857945801079785553743024628d0 - smat(8,5) = -0.0063613912616261101763852157765771145d0 - smat(8,6) = 0.0092544694968835102460471421802077499d0 - smat(8,7) = -0.016000978659867610012566794123705367d0 - smat(8,8) = 0.06986981319203092120396743157768302d0 - smat(8,9) = 0.067715997614330727572231278361916941d0 - smat(8,10) = -0.015792947967838408060602122180699914d0 - smat(8,11) = 0.0088833138015635613028177389454744671d0 - smat(8,12) = -0.0054931059774658873740429238622855943d0 - smat(8,13) = 0.0020631747843585146647599411313399656d0 - smat(9,1) = 0.00066514060600448521006580200755343394d0 - smat(9,2) = -0.0016883247656511657310168341134242365d0 - smat(9,3) = 0.0023902294012749194439468590445567787d0 - smat(9,4) = -0.0031398893501405182221541872761009467d0 - smat(9,5) = 0.0040996065583828904685929339380471472d0 - smat(9,6) = -0.0055221074850718601527974492638709279d0 - smat(9,7) = 0.0080228169564618181011133721494607847d0 - smat(9,8) = -0.013914688675330097265712826340730635d0 - smat(9,9) = 0.061549146121953899025475102230081674d0 - smat(9,10) = 0.058104435646414679709483954368170935d0 - smat(9,11) = -0.013521006494915505121296965633926178d0 - smat(9,12) = 0.0071672815450939414724467986573105791d0 - smat(9,13) = -0.0025733160692668747752356568030299968d0 - smat(10,1) = -0.00041752603021138034787923801119507346d0 - smat(10,2) = 0.0010564757900883006549157882210758715d0 - smat(10,3) = -0.0014838619916835230928180591924654614d0 - smat(10,4) = 0.0019216684383045607436816308592270761d0 - smat(10,5) = -0.0024499064726319824423766310391034564d0 - smat(10,6) = 0.0031685960917198882415991619504570375d0 - smat(10,7) = -0.0042687814868069101063838103163393714d0 - smat(10,8) = 0.0062367576377189455077886906317016687d0 - smat(10,9) = -0.010916045256426182929928992672780816d0 - smat(10,10) = 0.049341498882242656534681967109615939d0 - smat(10,11) = 0.044806735364961543899480547574617333d0 - smat(10,12) = -0.01016779687295611941698886178881464d0 - smat(10,13) = 0.0032517336907376481508110904388394382d0 - smat(11,1) = 0.0002125223935853507979645339833746691d0 - smat(11,2) = -0.00053671817129911138998070072343233684d0 - smat(11,3) = 0.00075022740245101321789807530530870831d0 - smat(11,4) = -0.00096338407040393008686841166467867192d0 - smat(11,5) = 0.0012114414686008620767341318716729072d0 - smat(11,6) = -0.001532368674992117303012495181624166d0 - smat(11,7) = 0.001988054157391055680909772967717979d0 - smat(11,8) = -0.00270597468823291888335117496143512d0 - smat(11,9) = 0.004017487808069314182051953972329621d0 - smat(11,10) = -0.0071861411376939650215910010419214217d0 - smat(11,11) = 0.033997387127231133422578025387431098d0 - smat(11,12) = 0.028593802868135422012347912361226566d0 - smat(11,13) = -0.0043651954876963111901906934492712798d0 - smat(12,1) = -0.000060747568403732445634458342632480215d0 - smat(12,2) = 0.00015326455806115744464049820119866265d0 - smat(12,3) = -0.00021370824360146965148646975051002255d0 - smat(12,4) = 0.00027325389026460871768250741250202256d0 - smat(12,5) = -0.00034127147037031058340229653588692725d0 - smat(12,6) = 0.00042705722368298591113966995913024914d0 - smat(12,7) = -0.00054447355263089598199497658162446904d0 - smat(12,8) = 0.00071904353962890524243743637124753436d0 - smat(12,9) = -0.0010064281701827658130957705178935556d0 - smat(12,10) = 0.0015570365400511474308570888772663d0 - smat(12,11) = -0.002964557905636329209477301429152671d0 - smat(12,12) = 0.016394941409005488641035370593697567d0 - smat(12,13) = 0.0089516664290492543488459693640670538d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.07682621767406384156703719645062332d0 - nodes(3) = 0.25854508945433189912653138318153319d0 - nodes(4) = 0.5d0 - nodes(5) = 0.74145491054566810087346861681846681d0 - nodes(6) = 0.92317378232593615843296280354937668d0 - nodes(7) = 1.0d0 - smat(1,1) = 0.030380058306020613582328476178375766d0 - smat(1,2) = 0.051807845070122688610361808376822745d0 - smat(1,3) = -0.0077564892442311121147570470734921913d0 - smat(1,4) = 0.0038356303163342695384914051846038424d0 - smat(1,5) = -0.0024383304818093882449092872508795519d0 - smat(1,6) = 0.0017060773850409592815463737710427011d0 - smat(1,7) = -0.00070857367741418908602453273584998992d0 - smat(2,1) = -0.018188063121557329133549875393469293d0 - smat(2,2) = 0.10353036860620286936897852338841461d0 - smat(2,3) = 0.11125666742326954798406794795274613d0 - smat(2,4) = -0.022434703664606561294990360510066958d0 - smat(2,5) = 0.012468366468630528257686084499940559d0 - smat(2,6) = -0.0083216426936984272628006854271118243d0 - smat(2,7) = 0.003407878762027429640102552220456636d0 - smat(3,1) = 0.012457766927842628586339516802183388d0 - smat(3,2) = -0.035050435850455692955661706786557831d0 - smat(3,3) = 0.14132463025967464695266777670321206d0 - smat(3,4) = 0.14402860678575614568102619579818056d0 - smat(3,5) = -0.032807361723011769465453560177354931d0 - smat(3,6) = 0.018998807050502343966957545008741339d0 - smat(3,7) = -0.007497102904640201892407150529937768d0 - smat(4,1) = -0.0074971029046402018924071505299377707d0 - smat(4,2) = 0.018998807050502343966957545008741393d0 - smat(4,3) = -0.032807361723011769465453560177354875d0 - smat(4,4) = 0.14402860678575614568102619579818054d0 - smat(4,5) = 0.14132463025967464695266777670321205d0 - smat(4,6) = -0.035050435850455692955661706786557898d0 - smat(4,7) = 0.012457766927842628586339516802183397d0 - smat(5,1) = 0.0034078787620274296401025522204566559d0 - smat(5,2) = -0.0083216426936984272628006854271116951d0 - smat(5,3) = 0.012468366468630528257686084499940637d0 - smat(5,4) = -0.02243470366460656129499036051006701d0 - smat(5,5) = 0.11125666742326954798406794795274607d0 - smat(5,6) = 0.1035303686062028693689785233884146d0 - smat(5,7) = -0.018188063121557329133549875393469282d0 - smat(6,1) = -0.0007085736774141890860245327358499702d0 - smat(6,2) = 0.0017060773850409592815463737710427846d0 - smat(6,3) = -0.0024383304818093882449092872508794946d0 - smat(6,4) = 0.0038356303163342695384914051846038081d0 - smat(6,5) = -0.0077564892442311121147570470734922603d0 - smat(6,6) = 0.051807845070122688610361808376822724d0 - smat(6,7) = 0.030380058306020613582328476178375769d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.25854508945433189912653138318153319d0 - nodes(3) = 0.74145491054566810087346861681846681d0 - nodes(4) = 1.0d0 - smat(1,1) = 0.105048271427472098509702375047934d0 - smat(1,2) = 0.17139104111290183073066737709898355d0 - smat(1,3) = -0.027092731426822420958691868430474717d0 - smat(1,4) = 0.009198508340780390844853499465090355d0 - smat(2,1) = -0.048954861717094456828283382244770311d0 - smat(2,2) = 0.29040977226276255770175199906323712d0 - smat(2,3) = 0.29040977226276255770175199906323712d0 - smat(2,4) = -0.04895486171709445682828338224477031d0 - smat(3,1) = 0.0091985083407803908448534994650903541d0 - smat(3,2) = -0.027092731426822420958691868430474718d0 - smat(3,3) = 0.17139104111290183073066737709898355d0 - smat(3,4) = 0.105048271427472098509702375047934d0 - end select - case(17) - select case(refine) - case(8) - nodes(1) = 0.0d0 - nodes(2) = 0.5d0 - nodes(3) = 1.0d0 - smat(1,1) = 0.20833333333333333333333333333333333d0 - smat(1,2) = 0.33333333333333333333333333333333333d0 - smat(1,3) = -0.041666666666666666666666666666666667d0 - smat(2,1) = -0.041666666666666666666666666666666667d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.20833333333333333333333333333333333d0 - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.013433911684290842921510249063139285d0 - nodes(3) = 0.044560002042213202188098746801136766d0 - nodes(4) = 0.092151874389114846446624723381236673d0 - nodes(5) = 0.15448550968615764730254032131377335d0 - nodes(6) = 0.22930730033494923043813329624796837d0 - nodes(7) = 0.31391278321726147904638265963237109d0 - nodes(8) = 0.40524401324084130584786849262344301d0 - nodes(9) = 0.5d0 - nodes(10) = 0.59475598675915869415213150737655699d0 - nodes(11) = 0.68608721678273852095361734036762891d0 - nodes(12) = 0.77069269966505076956186670375203163d0 - nodes(13) = 0.84551449031384235269745967868622665d0 - nodes(14) = 0.90784812561088515355337527661876333d0 - nodes(15) = 0.95543999795778679781190125319886323d0 - nodes(16) = 0.98656608831570915707848975093686072d0 - nodes(17) = 1.0d0 - smat(1,1) = 0.0051439045655495383289793154771010942d0 - smat(1,2) = 0.0094416392228881510990616733950058288d0 - smat(1,3) = -0.0017058216503455016777275259967656382d0 - smat(1,4) = 0.00089628774827992104132005185408669956d0 - smat(1,5) = -0.00058008204662187458519473409156848682d0 - smat(1,6) = 0.00041565470456583646560080817731032257d0 - smat(1,7) = -0.00031659609918475417403550676235233711d0 - smat(1,8) = 0.00025108492827764157453774270723241796d0 - smat(1,9) = -0.00020476671000683781436878956198726988d0 - smat(1,10) = 0.00017024316101219594162600667016979596d0 - smat(1,11) = -0.00014329993529739865877723463398543151d0 - smat(1,12) = 0.00012131562880079018494734314972959782d0 - smat(1,13) = -0.00010249289460155851256503560503324611d0 - smat(1,14) = 0.000085413597292150486577545573164548496d0 - smat(1,15) = -0.000068656840735997567414923657357394909d0 - smat(1,16) = 0.000050066116774793974791349866459132578d0 - smat(1,17) = -0.000019981812356253185847837496984788041d0 - smat(2,1) = -0.0025377381319999191482044945091962526d0 - smat(2,2) = 0.016595179772871764556544512548932772d0 - smat(2,3) = 0.01983097751906953589510282005409609d0 - smat(2,4) = -0.0041841148605820380808797084165654724d0 - smat(2,5) = 0.0023412428697822554823702151739104325d0 - smat(2,6) = -0.001580978282389918018364364779153055d0 - smat(2,7) = 0.001167871788804509666294052950616455d0 - smat(2,8) = -0.00090972004404834742110821731817309207d0 - smat(2,9) = 0.00073347954762042418146861213431144955d0 - smat(2,10) = -0.00060516471459621565709824227931180741d0 - smat(2,11) = 0.00050668717345196485485961818195217463d0 - smat(2,12) = -0.0004273383717093460216147595515087667d0 - smat(2,13) = 0.00036006366091820246144398848724157688d0 - smat(2,14) = -0.00029949430247899362625372163398207923d0 - smat(2,15) = 0.00024043081392429313889709743513512169d0 - smat(2,16) = -0.00017519295266819386039876634061633701d0 - smat(2,17) = 0.000069898871952380863529855596498791923d0 - smat(3,1) = 0.0019309236943027587921989650182920113d0 - smat(3,2) = -0.0060356438658692212233808743289740892d0 - smat(3,3) = 0.02651431806953369194905614743171798d0 - smat(3,4) = 0.02943661272578384431896836493875252d0 - smat(3,5) = -0.0064946385764852169386119678491730006d0 - smat(3,6) = 0.0037170649418339075536359661913927518d0 - smat(3,7) = -0.0025559328705895151931721335677850529d0 - smat(3,8) = 0.0019154082094702723829249687956598622d0 - smat(3,9) = -0.0015085358070060819184386621073579722d0 - smat(3,10) = 0.0012257725147835062524314485362729089d0 - smat(3,11) = -0.0010156834010935338038663218743382685d0 - smat(3,12) = 0.00085041015522116877703829895052767167d0 - smat(3,13) = -0.00071285406169563694210797150164487474d0 - smat(3,14) = 0.00059080718143696683298536561176672018d0 - smat(3,15) = -0.00047314930806578033783558842422315216d0 - smat(3,16) = 0.0003442677026667774270311944343713162d0 - smat(3,17) = -0.00013727495732626367033122366763086171d0 - smat(4,1) = -0.0015781865036003410188646352916882451d0 - smat(4,2) = 0.0043940831902918810066417106457379036d0 - smat(4,3) = -0.0082820411498237649230759431300606624d0 - smat(4,4) = 0.035420987228039690973105312366808484d0 - smat(4,5) = 0.037960140442358525979393278745461523d0 - smat(4,6) = -0.0085511611893581866273255717415361843d0 - smat(4,7) = 0.0049459236066673930732487734292435157d0 - smat(4,8) = -0.0034316463559439714632501075788248908d0 - smat(4,9) = 0.0025902359930399321547501207917263193d0 - smat(4,10) = -0.0020503196090088382672240049899321479d0 - smat(4,11) = 0.0016698998603069340426854983706019481d0 - smat(4,12) = -0.001381809902967198290908331829673446d0 - smat(4,13) = 0.0011488552594307818620034126187969543d0 - smat(4,14) = -0.00094678395396249602167118169808711017d0 - smat(4,15) = 0.00075538164973530992794657817602035492d0 - smat(4,16) = -0.00054838914740582356051796453027510824d0 - smat(4,17) = 0.00021846587924297200897865356612567383d0 - smat(5,1) = 0.0013242305551739391957891243417471795d0 - smat(5,2) = -0.0035240638557125108673750995387683837d0 - smat(5,3) = 0.0056930070204679474105728691868432d0 - smat(5,4) = -0.010104212814573885682145874704091973d0 - smat(5,5) = 0.043029795762111821062893155090256606d0 - smat(5,6) = 0.045102891575985176499793096619086595d0 - smat(5,7) = -0.010284390330352418974954294123322814d0 - smat(5,8) = 0.0059813556737142726596463705965717695d0 - smat(5,9) = -0.0041689763417589248936805725809522792d0 - smat(5,10) = 0.003156591542606990751205051316551269d0 - smat(5,11) = -0.0025010720529059981469686485312565789d0 - smat(5,12) = 0.0020324216427608897401872617219288469d0 - smat(5,13) = -0.0016691511676359715757249862844617228d0 - smat(5,14) = 0.0013641247398589483861108066835577407d0 - smat(5,15) = -0.0010823902785712281861168817407109768d0 - smat(5,16) = 0.00078324001874382524044255279434111523d0 - smat(5,17) = -0.00031161104112128948408095589563483943d0 - smat(6,1) = -0.001120765383519142348967260170122677d0 - smat(6,2) = 0.0029159576402080212806802003733481926d0 - smat(6,3) = -0.0044098523941601365795007132920846963d0 - smat(6,4) = 0.0066219755761913663759809103845837919d0 - smat(6,5) = -0.01151501211830099784971737394498776d0 - smat(6,6) = 0.049074680932644168007773617689000322d0 - smat(6,7) = 0.050610043104220949825996657133657448d0 - smat(6,8) = -0.011634763790145447376307141133776264d0 - smat(6,9) = 0.0067864084798524479795731117149404596d0 - smat(6,10) = -0.0047387528665858648910398739420042793d0 - smat(6,11) = 0.0035883876519090324414239275378313401d0 - smat(6,12) = -0.0028353590384838356678930627359534897d0 - smat(6,13) = 0.002286389649312198362337435906643184d0 - smat(6,14) = -0.001846072302344196302275718017929441d0 - smat(6,15) = 0.0014533742031826392227706150879750617d0 - smat(6,16) = -0.0010468819835812259581563425000253907d0 - smat(6,17) = 0.00041572552191227208557037326947897595d0 - smat(7,1) = 0.00094744160285232058472155921301277012d0 - smat(7,2) = -0.002433329048397035516427013410836538d0 - smat(7,3) = 0.003552802927278439493741992564760746d0 - smat(7,4) = -0.00495368328504779646367525464726172d0 - smat(7,5) = 0.0072450460109404624089565582707478567d0 - smat(7,6) = -0.012485565397400971914901695617214907d0 - smat(7,7) = 0.053340436539015518549138322482593855d0 - smat(7,8) = 0.054283998699701128711607432928134918d0 - smat(7,9) = -0.012554989931356863096046085489530034d0 - smat(7,10) = 0.0073319938467402774420744712819207738d0 - smat(7,11) = -0.0051180373037335659091701607268061494d0 - smat(7,12) = 0.00386439208339600444390280974529152d0 - smat(7,13) = -0.0030305726925455077437269119059946756d0 - smat(7,14) = 0.0024038764762895636413560670636214662d0 - smat(7,15) = -0.0018714453617135396425731426179198039d0 - smat(7,16) = 0.0013393485157559984705725565846883743d0 - smat(7,17) = -0.00053048365819460665806567269709927853d0 - smat(8,1) = -0.00079433358852822607682904466762562745d0 - smat(8,2) = 0.0020236933166241504587686755296512164d0 - smat(8,3) = -0.002893040818899299744482735874511494d0 - smat(8,4) = 0.0038729331806678207385116992735686471d0 - smat(8,5) = -0.0052387752733541017205123037575079932d0 - smat(8,6) = 0.0075699294954368450614795462110241789d0 - smat(8,7) = -0.012989407626328757562547064830562841d0 - smat(8,8) = 0.055674319265668509462470281675625327d0 - smat(8,9) = 0.055992613457983261731594076856049292d0 - smat(8,10) = -0.013012230622836492156451945835982139d0 - smat(8,11) = 0.0075972966529385751883173876474351073d0 - smat(8,12) = -0.0052892179795245604351867792763505186d0 - smat(8,13) = 0.0039659182773498977768640281195986331d0 - smat(8,14) = -0.0030622024313367859301283120286300265d0 - smat(8,15) = 0.0023452408509669512157715497641318074d0 - smat(8,16) = -0.0016630043715642477045778882066363765d0 - smat(8,17) = 0.00065625497389515384907033673559190041d0 - smat(9,1) = 0.0006562549738951538490703367372614294d0 - smat(9,2) = -0.0016630043715642477045778882093198288d0 - smat(9,3) = 0.0023452408509669512157715497785510193d0 - smat(9,4) = -0.0030622024313367859301283120190996257d0 - smat(9,5) = 0.0039659182773498977768640281244791496d0 - smat(9,6) = -0.0052892179795245604351867792742437701d0 - smat(9,7) = 0.0075972966529385751883173876503613351d0 - smat(9,8) = -0.013012230622836492156451945832442086d0 - smat(9,9) = 0.055992613457983261731594076855235562d0 - smat(9,10) = 0.055674319265668509462470281675592117d0 - smat(9,11) = -0.01298940762632875756254706483329881d0 - smat(9,12) = 0.0075699294954368450614795462210600509d0 - smat(9,13) = -0.0052387752733541017205123037459721313d0 - smat(9,14) = 0.0038729331806678207385116992866902374d0 - smat(9,15) = -0.0028930408188992997444827358499820895d0 - smat(9,16) = 0.0020236933166241504587686755210523854d0 - smat(9,17) = -0.00079433358852822607682904466377540779d0 - smat(10,1) = -0.00053048365819460665806567270256257203d0 - smat(10,2) = 0.0013393485157559984705725566044974463d0 - smat(10,3) = -0.001871445361713539642573142635543359d0 - smat(10,4) = 0.0024038764762895636413560670461711849d0 - smat(10,5) = -0.0030305726925455077437269119178399178d0 - smat(10,6) = 0.0038643920833960044439028097078473021d0 - smat(10,7) = -0.0051180373037335659091701607173455569d0 - smat(10,8) = 0.0073319938467402774420744713016758752d0 - smat(10,9) = -0.012554989931356863096046085495317407d0 - smat(10,10) = 0.054283998699701128711607432922459887d0 - smat(10,11) = 0.05334043653901551854913832248323167d0 - smat(10,12) = -0.012485565397400971914901695664306467d0 - smat(10,13) = 0.00724504601094046240895655826319309d0 - smat(10,14) = -0.0049536832850477964636752546734895718d0 - smat(10,15) = 0.0035528029272784394937419925544453081d0 - smat(10,16) = -0.0024333290483970355164270134005434731d0 - smat(10,17) = 0.00094744160285232058472155921145994631d0 - smat(11,1) = 0.00041572552191227208557037326281555699d0 - smat(11,2) = -0.0010468819835812259581563424628234684d0 - smat(11,3) = 0.0014533742031826392227706150927161228d0 - smat(11,4) = -0.0018460723023441963022757180418873956d0 - smat(11,5) = 0.0022863896493121983623374359000962698d0 - smat(11,6) = -0.0028353590384838356678930628135585074d0 - smat(11,7) = 0.0035883876519090324414239275439490203d0 - smat(11,8) = -0.0047387528665858648910398738562914756d0 - smat(11,9) = 0.006786408479852447979573111690119393d0 - smat(11,10) = -0.011634763790145447376307141161763182d0 - smat(11,11) = 0.050610043104220949825996657112556416d0 - smat(11,12) = 0.049074680932644168007773617692504628d0 - smat(11,13) = -0.01151501211830099784971737390045589d0 - smat(11,14) = 0.0066219755761913663759809103773237792d0 - smat(11,15) = -0.0044098523941601365795007132088360397d0 - smat(11,16) = 0.0029159576402080212806802003635619953d0 - smat(11,17) = -0.0011207653835191423489672601566160162d0 - smat(12,1) = -0.00031161104112128948408095591217218712d0 - smat(12,2) = 0.00078324001874382524044255289169119448d0 - smat(12,3) = -0.0010823902785712281861168817494041344d0 - smat(12,4) = 0.0013641247398589483861108065976517643d0 - smat(12,5) = -0.0016691511676359715757249862984712563d0 - smat(12,6) = 0.0020324216427608897401872615497959064d0 - smat(12,7) = -0.0025010720529059981469686485615866562d0 - smat(12,8) = 0.0031565915426069907512050515743120265d0 - smat(12,9) = -0.004168976341758924893680572655804712d0 - smat(12,10) = 0.0059813556737142726596463705187824133d0 - smat(12,11) = -0.010284390330352418974954294209544897d0 - smat(12,12) = 0.045102891575985176499793096475891432d0 - smat(12,13) = 0.0430297957621118210628931550775182d0 - smat(12,14) = -0.010104212814573885682145874826894198d0 - smat(12,15) = 0.0056930070204679474105728692802941732d0 - smat(12,16) = -0.0035240638557125108673750995193250343d0 - smat(12,17) = 0.0013242305551739391957891243620810924d0 - smat(13,1) = 0.00021846587924297200897865354742265701d0 - smat(13,2) = -0.00054838914740582356051796436285509061d0 - smat(13,3) = 0.00075538164973530992794657819659386404d0 - smat(13,4) = -0.00094678395396249602167118185352778054d0 - smat(13,5) = 0.0011488552594307818620034126206401013d0 - smat(13,6) = -0.0013818099029671982909083320862483902d0 - smat(13,7) = 0.0016698998603069340426854982417551917d0 - smat(13,8) = -0.0020503196090088382672240044297840169d0 - smat(13,9) = 0.0025902359930399321547501206287903081d0 - smat(13,10) = -0.0034316463559439714632501077405162893d0 - smat(13,11) = 0.0049459236066673930732487732430026578d0 - smat(13,12) = -0.0085511611893581866273255722044345747d0 - smat(13,13) = 0.037960140442358525979393278821324394d0 - smat(13,14) = 0.035420987228039690973105312326462353d0 - smat(13,15) = -0.008282041149823764923075942808091682d0 - smat(13,16) = 0.0043940831902918810066417106427787201d0 - smat(13,17) = -0.0015781865036003410188646352305997765d0 - smat(14,1) = -0.00013727495732626367033122368494067689d0 - smat(14,2) = 0.0003442677026667774270311946699287588d0 - smat(14,3) = -0.00047314930806578033783558838973920209d0 - smat(14,4) = 0.00059080718143696683298536537946233003d0 - smat(14,5) = -0.00071285406169563694210797148479960259d0 - smat(14,6) = 0.00085041015522116877703829864914301253d0 - smat(14,7) = -0.0010156834010935338038663221320871322d0 - smat(14,8) = 0.0012257725147835062524314494103917022d0 - smat(14,9) = -0.0015085358070060819184386623623585619d0 - smat(14,10) = 0.0019154082094702723829249685516154881d0 - smat(14,11) = -0.002555932870589515193172133858081482d0 - smat(14,12) = 0.0037170649418339075536359655388550248d0 - smat(14,13) = -0.0064946385764852169386119676063603146d0 - smat(14,14) = 0.029436612725783844318968364800543212d0 - smat(14,15) = 0.02651431806953369194905614762315572d0 - smat(14,16) = -0.006035643865869221223380874277184492d0 - smat(14,17) = 0.0019309236943027587921989650949526914d0 - smat(15,1) = 0.000069898871952380863529855588198537827d0 - smat(15,2) = -0.00017519295266819386039876611006376283d0 - smat(15,3) = 0.00024043081392429313889709748522746074d0 - smat(15,4) = -0.00029949430247899362625372186549716491d0 - smat(15,5) = 0.00036006366091820246144398851726610758d0 - smat(15,6) = -0.00042733837170934602161475980234319686d0 - smat(15,7) = 0.00050668717345196485485961787268079157d0 - smat(15,8) = -0.0006051647145962156570982413491602749d0 - smat(15,9) = 0.00073347954762042418146861186225154333d0 - smat(15,10) = -0.00090972004404834742110821757233858692d0 - smat(15,11) = 0.0011678717888045096662940526448754924d0 - smat(15,12) = -0.0015809782823899180183643654591925122d0 - smat(15,13) = 0.0023412428697822554823702154169257013d0 - smat(15,14) = -0.0041841148605820380808797086794598994d0 - smat(15,15) = 0.019830977519069535895102820298922703d0 - smat(15,16) = 0.016595179772871764556544512517012671d0 - smat(15,17) = -0.0025377381319999191482044944091828313d0 - smat(16,1) = -0.000019981812356253185847837499174121585d0 - smat(16,2) = 0.000050066116774793974791349992135229948d0 - smat(16,3) = -0.000068656840735997567414923628433240281d0 - smat(16,4) = 0.000085413597292150486577545445427307087d0 - smat(16,5) = -0.00010249289460155851256503558616335287d0 - smat(16,6) = 0.00012131562880079018494734302715366753d0 - smat(16,7) = -0.00014329993529739865877723481792616845d0 - smat(16,8) = 0.00017024316101219594162600719442927183d0 - smat(16,9) = -0.00020476671000683781436878971560905448d0 - smat(16,10) = 0.00025108492827764157453774256568603918d0 - smat(16,11) = -0.00031659609918475417403550693367609302d0 - smat(16,12) = 0.00041565470456583646560080780324946576d0 - smat(16,13) = -0.00058008204662187458519473395033563174d0 - smat(16,14) = 0.00089628774827992104132005172223065593d0 - smat(16,15) = -0.001705821650345501677727525772058549d0 - smat(16,16) = 0.0094416392228881510990616733782108259d0 - smat(16,17) = 0.0051439045655495383289793155066737306d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.044560002042213202188098746801136766d0 - nodes(3) = 0.15448550968615764730254032131377335d0 - nodes(4) = 0.31391278321726147904638265963237109d0 - nodes(5) = 0.5d0 - nodes(6) = 0.68608721678273852095361734036762891d0 - nodes(7) = 0.84551449031384235269745967868622665d0 - nodes(8) = 0.95543999795778679781190125319886323d0 - nodes(9) = 1.0d0 - smat(1,1) = 0.01756666634551372748601937487627127d0 - smat(1,2) = 0.030065714833485509159589990073601873d0 - smat(1,3) = -0.0044200652633146205741814245868462138d0 - smat(1,4) = 0.0021407078365603049889780126547120568d0 - smat(1,5) = -0.0013338210105752682671411659664559417d0 - smat(1,6) = 0.00094279940880133677636707426462875156d0 - smat(1,7) = -0.00071390032934406985805926450429548651d0 - smat(1,8) = 0.00054556120541474048631265485194218374d0 - smat(1,9) = -0.0002336609843284580097865048624217275d0 - smat(2,1) = -0.011096047203051847130586705533089162d0 - smat(2,2) = 0.062289114134268252056632714849079877d0 - smat(2,3) = 0.067542294378641668608731026889851519d0 - smat(2,4) = -0.013168348840169986098514459655106815d0 - smat(2,5) = 0.0071361659544316826924675854971367694d0 - smat(2,6) = -0.0047766378448207547836804695680144636d0 - smat(2,7) = 0.0035246860072792068029487368163436689d0 - smat(2,8) = -0.0026603837826954738151448915521781917d0 - smat(2,9) = 0.0011346648400616967815880367686133816d0 - smat(3,1) = 0.0085100404153724656189314462762212805d0 - smat(3,2) = -0.023741760610656507439812414541159699d0 - smat(3,3) = 0.092455502582839596517808154059193442d0 - smat(3,4) = 0.095803345546473633480637885688688766d0 - smat(3,5) = -0.020709622366140934462906530005333364d0 - smat(3,6) = 0.011830624341955872331082930224650392d0 - smat(3,7) = -0.0081901654264663683009903273205702077d0 - smat(3,8) = 0.0060076398615497346539817471075570028d0 - smat(3,9) = -0.0025383308138236606548905531706498888d0 - smat(4,1) = -0.0063073721253176802127376896358209473d0 - smat(4,2) = 0.015828749382417190185751696718159037d0 - smat(4,3) = -0.026617901340759955848104455746739922d0 - smat(4,4) = 0.10926959950049120674017353232777192d0 - smat(4,5) = 0.11043060555858240424898360122464682d0 - smat(4,6) = -0.025467660389088129891723692042864957d0 - smat(4,7) = 0.015021205768443836770747937466852431d0 - smat(4,8) = -0.010370399089575958831833332894528845d0 - smat(4,9) = 0.0043003895175456077923597429501531764d0 - smat(5,1) = 0.0043003895175456077923597429501530674d0 - smat(5,2) = -0.010370399089575958831833332894528782d0 - smat(5,3) = 0.015021205768443836770747937466852053d0 - smat(5,4) = -0.025467660389088129891723692042865251d0 - smat(5,5) = 0.11043060555858240424898360122464664d0 - smat(5,6) = 0.10926959950049120674017353232777191d0 - smat(5,7) = -0.026617901340759955848104455746740307d0 - smat(5,8) = 0.015828749382417190185751696718159056d0 - smat(5,9) = -0.0063073721253176802127376896358209001d0 - smat(6,1) = -0.0025383308138236606548905531706501785d0 - smat(6,2) = 0.0060076398615497346539817471075569359d0 - smat(6,3) = -0.0081901654264663683009903273205710243d0 - smat(6,4) = 0.011830624341955872331082930224649892d0 - smat(6,5) = -0.020709622366140934462906530005334059d0 - smat(6,6) = 0.095803345546473633480637885688688922d0 - smat(6,7) = 0.092455502582839596517808154059193662d0 - smat(6,8) = -0.023741760610656507439812414541160909d0 - smat(6,9) = 0.0085100404153724656189314462762213286d0 - smat(7,1) = 0.0011346648400616967815880367686129926d0 - smat(7,2) = -0.0026603837826954738151448915521777533d0 - smat(7,3) = 0.0035246860072792068029487368163421925d0 - smat(7,4) = -0.0047766378448207547836804695680150789d0 - smat(7,5) = 0.0071361659544316826924675854971356214d0 - smat(7,6) = -0.013168348840169986098514459655106307d0 - smat(7,7) = 0.067542294378641668608731026889851215d0 - smat(7,8) = 0.062289114134268252056632714849079254d0 - smat(7,9) = -0.011096047203051847130586705533089069d0 - smat(8,1) = -0.00023366098432845800978650486242195026d0 - smat(8,2) = 0.00054556120541474048631265485194254785d0 - smat(8,3) = -0.00071390032934406985805926450429639746d0 - smat(8,4) = 0.00094279940880133677636707426462843319d0 - smat(8,5) = -0.0013338210105752682671411659664566634d0 - smat(8,6) = 0.0021407078365603049889780126547123694d0 - smat(8,7) = -0.0044200652633146205741814245868467946d0 - smat(8,8) = 0.030065714833485509159589990073601337d0 - smat(8,9) = 0.017566666345513727486019374876271297d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.15448550968615764730254032131377335d0 - nodes(3) = 0.5d0 - nodes(4) = 0.84551449031384235269745967868622665d0 - nodes(5) = 1.0d0 - smat(1,1) = 0.062242741335712659512941231394904623d0 - smat(1,2) = 0.1022208859760725852397669911537368d0 - smat(1,3) = -0.014620835197950998874099313391661808d0 - smat(1,4) = 0.0077098447281936114290787644117153067d0 - smat(1,5) = -0.0030671271558702100051473522549215686d0 - smat(2,1) = -0.037329876353353584868095692510759806d0 - smat(2,2) = 0.20448961959144077598496969356267171d0 - smat(2,3) = 0.20834426782000480382375341009424053d0 - smat(2,4) = -0.047213602035923612139014268532716318d0 - smat(2,5) = 0.017224081291673969895846536072790537d0 - smat(3,1) = 0.017224081291673969895846536072790536d0 - smat(3,2) = -0.047213602035923612139014268532716323d0 - smat(3,3) = 0.20834426782000480382375341009424052d0 - smat(3,4) = 0.20448961959144077598496969356267171d0 - smat(3,5) = -0.037329876353353584868095692510759807d0 - smat(4,1) = -0.0030671271558702100051473522549215697d0 - smat(4,2) = 0.0077098447281936114290787644117153022d0 - smat(4,3) = -0.01462083519795099887409931339166181d0 - smat(4,4) = 0.1022208859760725852397669911537368d0 - smat(4,5) = 0.062242741335712659512941231394904622d0 - case(16) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0.5d0 - smat(1,2) = 0.5d0 - end select - end select - end subroutine sdcquadGL - - - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! - ! Set Gauss-Radau SDC nodes and S matrix. - ! - subroutine sdcquadGR(nnodes, refine, smat, nodes) - implicit none - integer, intent(in) :: nnodes, refine - real(8), intent(out) :: smat((nnodes-1)/refine,(nnodes-1)/refine+1) - real(8), intent(out) :: nodes((nnodes-1)/refine+1) - - select case(nnodes) - case(2) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 1.0d0 - end select - case(3) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.33333333333333333333333333333333333d0 - nodes(3) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.41666666666666666666666666666666667d0 - smat(1,3) = -0.083333333333333333333333333333333333d0 - smat(2,1) = 0d0 - smat(2,2) = 0.33333333333333333333333333333333333d0 - smat(2,3) = 0.33333333333333333333333333333333333d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 1.0d0 - end select - case(4) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.15505102572168219018027159252941086d0 - nodes(3) = 0.64494897427831780981972840747058914d0 - nodes(4) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.19681547722366042586838614299182989d0 - smat(1,3) = -0.065535425850198388108522782569608692d0 - smat(1,4) = 0.023770974348220152420408232107189663d0 - smat(2,1) = 0d0 - smat(2,2) = 0.19760883751542685112902552846666769d0 - smat(2,3) = 0.35760883751542685112902552846666769d0 - smat(2,4) = -0.065319726474218082618594241992157104d0 - smat(3,1) = 0d0 - smat(3,2) = -0.018021252038620001947336229089216785d0 - smat(3,3) = 0.22041241452319315081831070062254909d0 - smat(3,4) = 0.15265986323710904130929712099607855d0 - end select - case(5) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.088587959512703947395546143769456197d0 - nodes(3) = 0.40946686444073471086492625206882989d0 - nodes(4) = 0.78765946176084705602524188987599962d0 - nodes(5) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.1129994793231561859938500530113885d0 - smat(1,3) = -0.040309220723522205735549888393159895d0 - smat(1,4) = 0.025802377420336391035940091595814209d0 - smat(1,5) = -0.0099046765072664238986941124445866174d0 - smat(2,1) = 0d0 - smat(2,2) = 0.12138451642424407057981162095608487d0 - smat(2,3) = 0.24720179465888110584019498721531942d0 - smat(2,4) = -0.073659505468877109885948582738602703d0 - smat(2,5) = 0.025952099313782696935322082866572116d0 - smat(3,1) = 0d0 - smat(3,2) = -0.017702211124149914729609176895629068d0 - smat(3,3) = 0.19923068993201441112055347872005641d0 - smat(3,4) = 0.2368936462185970613229419107378119d0 - smat(3,5) = -0.04022952770634921255357057475506951d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0037804265535180334314259749653416915d0 - smat(4,3) = -0.017929795024201430444966270652198753d0 - smat(4,4) = 0.13980780181000340147135580147777343d0 - smat(4,5) = 0.086682104899832939516942604333084013d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.40946686444073471086492625206882989d0 - nodes(3) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.55142597137225466194695700963018573d0 - smat(1,3) = -0.14195910693151995108203075756135584d0 - smat(2,1) = 0d0 - smat(2,2) = 0.29526656777963264456753687396558505d0 - smat(2,3) = 0.29526656777963264456753687396558505d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 1.0d0 - end select - case(7) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.039809857051468742340806690093333168d0 - nodes(3) = 0.19801341787360817253579213679529624d0 - nodes(4) = 0.43797481024738614400501252000522885d0 - nodes(5) = 0.69546427335363609451461482372116716d0 - nodes(6) = 0.90146491420117357387650110211224731d0 - nodes(7) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.050950010994640609251478059633024629d0 - smat(1,3) = -0.01890730655429213909330279381391825d0 - smat(1,4) = 0.013686071433088228819012995720112285d0 - smat(1,5) = -0.010370038766046045839009537968545119d0 - smat(1,6) = 0.0073606563966398039365575429778365572d0 - smat(1,7) = -0.002909536452561714733929576455176934d0 - smat(2,1) = 0d0 - smat(2,2) = 0.057271647924418051133099988548545862d0 - smat(2,3) = 0.12588282649162474289615150251062559d0 - smat(2,4) = -0.04122509478848064914783785809880541d0 - smat(2,5) = 0.02786678590727420737009702816565566d0 - smat(2,6) = -0.019014378287835390740318560661002067d0 - smat(2,7) = 0.0074217735751384686837933462369434255d0 - smat(3,1) = 0d0 - smat(3,2) = -0.010441988826413305724756586563173136d0 - smat(3,3) = 0.11619673069956323186435087897437646d0 - smat(3,4) = 0.16385370262844430686034072124337222d0 - smat(3,5) = -0.047143713129424377881970304224188792d0 - smat(3,6) = 0.028012300734632746511088512408955858d0 - smat(3,7) = -0.010515639733024630159832838629409999d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0043427055202884863427110292579287041d0 - smat(4,3) = -0.020196293263804756483465158230492642d0 - smat(4,4) = 0.14008445710769594649040391715947061d0 - smat(4,5) = 0.16065298912423919670354277658659465d0 - smat(4,6) = -0.041234882043259446243667310145363611d0 - smat(4,7) = 0.013840486661090523700077049087800561d0 - smat(5,1) = 0d0 - smat(5,2) = -0.0017913742279730394331905061198884314d0 - smat(5,3) = 0.0072713511802473826199206076112037765d0 - smat(5,4) = -0.020313764330410216623830859138418894d0 - smat(5,5) = 0.12235991156852267061970324943081018d0 - smat(5,6) = 0.11730683753552188336551399334241344d0 - smat(5,7) = -0.018832320878371201186230206735039953d0 - smat(6,1) = 0d0 - smat(6,2) = 0.00046319124177961853525839311813014791d0 - smat(6,3) = -0.0017966413973845923239518456804718189d0 - smat(6,4) = 0.0043780195444498748870257863990376483d0 - smat(6,5) = -0.010672340470080692892449254196881756d0 - smat(6,6) = 0.067389842274555886443715813975277765d0 - smat(6,7) = 0.03877301460550633147390000427266067d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.19801341787360817253579213679529624d0 - nodes(3) = 0.69546427335363609451461482372116716d0 - nodes(4) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.26835579582160400828058710842451239d0 - smat(1,3) = -0.12086918945607219220648547782966657d0 - smat(1,4) = 0.050526811508076356461690506200450419d0 - smat(2,1) = 0d0 - smat(2,2) = 0.19729951465268570465661265907397955d0 - smat(2,3) = 0.38415417603110614070318485529120559d0 - smat(2,4) = -0.084002835203763923380974827439314209d0 - smat(3,1) = 0d0 - smat(3,2) = -0.011799027493410593399608934707399905d0 - smat(3,3) = 0.18334028243164346639286062212793256d0 - smat(3,4) = 0.13299447170813103249213348885830019d0 - end select - case(9) - select case(refine) - case(8) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 1.0d0 - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.02247938643871249810882549957084506d0 - nodes(3) = 0.11467905316090423190964023706751463d0 - nodes(4) = 0.26578982278458946847678939169339d0 - nodes(5) = 0.45284637366944461699855144234765115d0 - nodes(6) = 0.6473752828868303626260922298287588d0 - nodes(7) = 0.81975930826310763501242005719081822d0 - nodes(8) = 0.94373743946307785353434780896768882d0 - nodes(9) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.028802823892616741227063631345286911d0 - smat(1,3) = -0.010821698052015636810433647962131589d0 - smat(1,4) = 0.0080690102038513812973563691639836691d0 - smat(1,5) = -0.006493073596535741255496250469049289d0 - smat(1,6) = 0.0053000410172951216632814748610368096d0 - smat(1,7) = -0.00422330965000984175072771104725848d0 - smat(1,8) = 0.0030694133491409289296822743548496153d0 - smat(1,9) = -0.0012238207256304551919006406758726176d0 - smat(2,1) = 0d0 - smat(2,2) = 0.0328780023203332034418453730260726d0 - smat(2,3) = 0.074129603487301441936695035692477762d0 - smat(2,4) = -0.024835177825153343201779689826925684d0 - smat(2,5) = 0.017769649559715804950591736067822105d0 - smat(2,6) = -0.013875441865378397016998275605830173d0 - smat(2,7) = 0.010830366548432844298280477313960316d0 - smat(2,8) = -0.0077932307231328222039266467747720073d0 - smat(2,9) = 0.0030958952200730015961067276038647231d0 - smat(3,1) = 0d0 - smat(3,2) = -0.0063952629457152894862000027150991834d0 - smat(3,3) = 0.07126411441915835049637783903437134d0 - smat(3,4) = 0.10559634952043188718406721739108369d0 - smat(3,5) = -0.03159906180018910222987894744807682d0 - smat(3,6) = 0.021206423068506982192882489804307986d0 - smat(3,7) = -0.015577082652465580657120402385940578d0 - smat(3,8) = 0.010904718290999435105431227537970349d0 - smat(3,9) = -0.0042894282770414460384102665927415293d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0030151227903047058227196860669985249d0 - smat(4,3) = -0.0140943583771055109716733152891338d0 - smat(4,4) = 0.09758410241936146625346136878821079d0 - smat(4,5) = 0.12175338999442497287570952849367731d0 - smat(4,6) = -0.033827218618978765594055725965444613d0 - smat(4,7) = 0.02121730004943959075773056270736954d0 - smat(4,8) = -0.013979538694908350686474481657204116d0 - smat(4,9) = 0.0053877513223170400643444275097876259d0 - smat(5,1) = 0d0 - smat(5,2) = -0.0016186770727385241376713733249542249d0 - smat(5,3) = 0.0065655000060715282874265974119516798d0 - smat(5,4) = -0.018325913899125656436414158093873401d0 - smat(5,5) = 0.10777134460642216300309691588143044d0 - smat(5,6) = 0.12038320214338806010593869781186034d0 - smat(5,7) = -0.031522583105940581427165613639041846d0 - smat(5,8) = 0.017868284283065847655150020835606311d0 - smat(5,9) = -0.0065922477437570914228202994018719832d0 - smat(6,1) = 0d0 - smat(6,2) = 0.00086102303244227632497940916105339559d0 - smat(6,3) = -0.0033021692440227014644217631947532538d0 - smat(6,4) = 0.0078631818643744041820762756652914669d0 - smat(6,5) = -0.01838243501661525019474645933557564d0 - smat(6,6) = 0.10026988319836387913672284613069998d0 - smat(6,7) = 0.10171233356804537942147304159778191d0 - smat(6,8) = -0.024794442263185695985138063531167213d0 - smat(6,9) = 0.0081566502368749809653825408687286187d0 - smat(7,1) = 0d0 - smat(7,2) = -0.00039606045800908571951388744105748385d0 - smat(7,3) = 0.0014797024986822821543388901320752959d0 - smat(7,4) = -0.0033082390956722011450279104687126782d0 - smat(7,5) = 0.0065946223925144481649447221424086855d0 - smat(7,6) = -0.014246104246339443443757562629205104d0 - smat(7,7) = 0.076184262716394830046176580853785895d0 - smat(7,8) = 0.068437283204570772551195004667101881d0 - smat(7,9) = -0.010767335812171384086428085479527114d0 - smat(8,1) = 0d0 - smat(8,2) = 0.00010743581289457219795402814147847656d0 - smat(8,3) = -0.00039674407313727199937498906834547766d0 - smat(8,4) = 0.00086408462918270198059848659201620464d0 - smat(8,5) = -0.0016283524134904987729714783305734692d0 - smat(8,6) = 0.0030479879977018412420506863133607012d0 - smat(8,7) = -0.0065559771505040762007752897005222567d0 - smat(8,8) = 0.038966589954939523904445150917264021d0 - smat(8,9) = 0.021857535779335354113725596167631943d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.11467905316090423190964023706751463d0 - nodes(3) = 0.45284637366944461699855144234765115d0 - nodes(4) = 0.81975930826310763501242005719081822d0 - nodes(5) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.15567531564541482165152397256142455d0 - smat(1,3) = -0.072874631259749064804262271660969841d0 - smat(1,4) = 0.056338063068391117120655047938909236d0 - smat(1,5) = -0.024459694293152642058276511771849313d0 - smat(2,1) = 0d0 - smat(2,2) = 0.12568624681333033235659174746704821d0 - smat(2,3) = 0.27191569070232393697232439367832713d0 - smat(2,4) = -0.099002500671349108075579414083294664d0 - smat(2,5) = 0.03956788366423522383557447821805584d0 - smat(3,1) = 0d0 - smat(3,2) = -0.014184263648654520659127892520578109d0 - smat(3,3) = 0.18655233179008594738114105975394729d0 - smat(3,4) = 0.24372982807259015786859496670290388d0 - smat(3,5) = -0.049184961620358566576739519093105986d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0021129254918428939454767027046174573d0 - smat(4,3) = -0.011430889996524686096154325006783987d0 - smat(4,4) = 0.11444246577655591209191977345025315d0 - smat(4,5) = 0.075116190465018245046337791661095168d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.45284637366944461699855144234765115d0 - nodes(3) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.64024332059352122339657967126865785d0 - smat(1,3) = -0.18739694692407660639802822892100671d0 - smat(2,1) = 0d0 - smat(2,2) = 0.27357681316527769150072427882617443d0 - smat(2,3) = 0.27357681316527769150072427882617443d0 - end select - case(13) - select case(refine) - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.010018280461680405843024729867804785d0 - nodes(3) = 0.052035451127180552583542695772964322d0 - nodes(4) = 0.12461922514444307373529958726390923d0 - nodes(5) = 0.22284060704383785550783145345736276d0 - nodes(6) = 0.34000815791466518823360523389701753d0 - nodes(7) = 0.46813761308958404208311038075775359d0 - nodes(8) = 0.59849727976713918322772071367304359d0 - nodes(9) = 0.72220328489096792556332130780461091d0 - nodes(10) = 0.8308248996228185740305665439056567d0 - nodes(11) = 0.91695838655259485329313462701802742d0 - nodes(12) = 0.9747263796024796502466688135383709d0 - nodes(13) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.012846810497864825776182905484705835d0 - smat(1,3) = -0.0048676719162665844347264083380969339d0 - smat(1,4) = 0.0036970143961447756379702924693690252d0 - smat(1,5) = -0.0030694523476289173121948581778195579d0 - smat(1,6) = 0.0026388912642729432314221087128493388d0 - smat(1,7) = -0.0023027994237786174686331232404691203d0 - smat(1,8) = 0.0020161902532283582767712981015325238d0 - smat(1,9) = -0.0017535676286226183164068096702065582d0 - smat(1,10) = 0.0014960537327175130655936239602977802d0 - smat(1,11) = -0.0012236839546492389594869236729830091d0 - smat(1,12) = 0.00090234591709602368568730123294998258d0 - smat(1,13) = -0.00036185032869805733915467699431984449d0 - smat(2,1) = 0d0 - smat(2,2) = 0.014824033073859883199201132667653634d0 - smat(2,3) = 0.034025220638948337318782519766343069d0 - smat(2,4) = -0.011562883541979595450534395322354239d0 - smat(2,5) = 0.0085256883794136358385317798145342503d0 - smat(2,6) = -0.0070016437096564857202951043530572469d0 - smat(2,7) = 0.005973121126734559735921852144419302d0 - smat(2,8) = -0.0051634764753598048471346998175997798d0 - smat(2,9) = 0.0044563636884657170689607850077892249d0 - smat(2,10) = -0.0037835941708625073821709556196532944d0 - smat(2,11) = 0.0030854767352453016650652805296194171d0 - smat(2,12) = -0.0022713446776438247769114395187587423d0 - smat(2,13) = 0.00091020959833493009110121060621212758d0 - smat(3,1) = 0d0 - smat(3,2) = -0.0030097828668017097066591461426428509d0 - smat(3,3) = 0.033615168480321317569914155843950465d0 - smat(3,4) = 0.051491234617024610450661445939048243d0 - smat(3,5) = -0.015739591300760674127533962345069253d0 - smat(3,6) = 0.011067018703460572212435291877848969d0 - smat(3,7) = -0.0088414125322989053959392380398412805d0 - smat(3,8) = 0.0073843873573288775933825723327612614d0 - smat(3,9) = -0.006246567885154558988784642181127298d0 - smat(3,10) = 0.0052387877967789597637813185697962962d0 - smat(3,11) = -0.0042401641231134934332991393677448267d0 - smat(3,12) = 0.0031081254699194006593633105816514344d0 - smat(3,13) = -0.0012434296994418754455650755776699321d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0015258618011374626611980974350081799d0 - smat(4,3) = -0.0071762912661799610931850626204559609d0 - smat(4,4) = 0.049884144771270083496377171829834563d0 - smat(4,5) = 0.065524327133315168978341659316352696d0 - smat(4,6) = -0.018770575575146671965292146059275653d0 - smat(4,7) = 0.01268991021360727538901280570878685d0 - smat(4,8) = -0.009852996305579672982547900117638791d0 - smat(4,9) = 0.0080161204954806306189209083696108977d0 - smat(4,10) = -0.0065716637153046982212454565737352717d0 - smat(4,11) = 0.0052474763999146065430471260673330405d0 - smat(4,12) = -0.0038176984262838958258692398222134706d0 - smat(4,13) = 0.0015227663731644541737739026598260598d0 - smat(5,1) = 0d0 - smat(5,2) = -0.00092372269890120838556404675907701803d0 - smat(5,3) = 0.0037640015467489159721043575486500783d0 - smat(5,4) = -0.010599641478257000494854642961769757d0 - smat(5,5) = 0.062497367294598300253398299401984947d0 - smat(5,6) = 0.075277283399720275107198144764606009d0 - smat(5,7) = -0.020636655308544480309565016485866562d0 - smat(5,8) = 0.01349979256278459040109360238416646d0 - smat(5,9) = -0.010183435945119916945024438139297003d0 - smat(5,10) = 0.0080193840389374525622355617416710901d0 - smat(5,11) = -0.0062595478630572479781792815700294723d0 - smat(5,12) = 0.0044984613404058057121835511076180088d0 - smat(5,13) = -0.0017857360184881531692523105929776848d0 - smat(6,1) = 0d0 - smat(6,2) = 0.0006016571610361040098900490724077468d0 - smat(6,3) = -0.0023120945843907995714259652515674887d0 - smat(6,4) = 0.005528925235988324441459931207443321d0 - smat(6,5) = -0.013021588671171645056830404995584898d0 - smat(6,6) = 0.07059921950298945099748031557809573d0 - smat(6,7) = 0.080109728885541166277065532115241211d0 - smat(6,8) = -0.02125764814754668755348436261075166d0 - smat(6,9) = 0.013496211011629232584805695412167233d0 - smat(6,10) = -0.0098550829313346824531372513183845615d0 - smat(6,11) = 0.0073986814365331373120754241007430008d0 - smat(6,12) = -0.0052116860315687864050059497514153304d0 - smat(6,13) = 0.0020531323072140392666121333023112011d0 - smat(7,1) = 0d0 - smat(7,2) = -0.00040273816949381105144739539629500879d0 - smat(7,3) = 0.0015018587921308655536088477058963654d0 - smat(7,4) = -0.0033469778653159993908517355751542392d0 - smat(7,5) = 0.0066435692085660993965298439163431407d0 - smat(7,6) = -0.014283081235963744489357627944319016d0 - smat(7,7) = 0.073639840120169737692130750997951652d0 - smat(7,8) = 0.079699700848068294196787083382940858d0 - smat(7,9) = -0.020602743715052695107902729738538274d0 - smat(7,10) = 0.012681396951110931051855886120283d0 - smat(7,11) = -0.008852595700939557869159533485814161d0 - smat(7,12) = 0.0060254740825915252492035228093571339d0 - smat(7,13) = -0.0023440366383165040867865798773350226d0 - smat(8,1) = 0d0 - smat(8,2) = 0.00026849303595457089645594956181604354d0 - smat(8,3) = -0.00098407189437366543913829907989017127d0 - smat(8,4) = 0.0021125150212176281921096567246307546d0 - smat(8,5) = -0.0038897366734025802367579501265400331d0 - smat(8,6) = 0.0070276020701591415356136400863851922d0 - smat(8,7) = -0.014301505453831826531811313562377191d0 - smat(8,8) = 0.071412206567349303807842428694736857d0 - smat(8,9) = 0.074076049059380974219684593076599333d0 - smat(8,10) = -0.018708198315257722412908179221108253d0 - smat(8,11) = 0.011063152183383611125275383027451406d0 - smat(8,12) = -0.0070541550628191501082833193105485628d0 - smat(8,13) = 0.0026836545860684572875180042602550292d0 - smat(9,1) = 0d0 - smat(9,2) = -0.00017260838315176389130275520465995104d0 - smat(9,3) = 0.00062597697902054797016035840724068135d0 - smat(9,4) = -0.0013146894401421174137664193963960678d0 - smat(9,5) = 0.0023254685945524200253200035301291064d0 - smat(9,6) = -0.0038922132547930384596447106082450783d0 - smat(9,7) = 0.0066547386555824895311431752557221881d0 - smat(9,8) = -0.013075034292232382669931121829038689d0 - smat(9,9) = 0.064066044551057531015941407862701426d0 - smat(9,10) = 0.063617358998983060516502884554909504d0 - smat(9,11) = -0.015663735600242186483234637048785951d0 - smat(9,12) = 0.0085657347959555400451812651524546724d0 - smat(9,13) = -0.0031154268727394517191242145751666854d0 - smat(10,1) = 0d0 - smat(10,2) = 0.00010193327759990309929368825455915732d0 - smat(10,3) = -0.00036723722028459318551716784183527354d0 - smat(10,4) = 0.00076109888583668317918135139641037532d0 - smat(10,5) = -0.0013154387607745526946272208795208126d0 - smat(10,6) = 0.0021150087250044225988298617236108635d0 - smat(10,7) = -0.0033539551195726604949542754190203266d0 - smat(10,8) = 0.0055496228150510790581659256246222855d0 - smat(10,9) = -0.010682296374384580786642848467908965d0 - smat(10,10) = 0.052095784774682830264652058787835335d0 - smat(10,11) = 0.049019740987064804560245488107357285d0 - smat(10,12) = -0.01152558226536706868812596703467875d0 - smat(10,13) = 0.0037348072049200123520671888604252115d0 - smat(11,1) = 0d0 - smat(11,2) = -0.000049815442612886036202534154700274726d0 - smat(11,3) = 0.00017876120904586375873851918660200224d0 - smat(11,4) = -0.00036758434288013861968135115841183646d0 - smat(11,5) = 0.00062692291178634792829375574759378001d0 - smat(11,6) = -0.00098613910357895974124936683387134921d0 - smat(11,7) = 0.0015062568357801164642247424315662304d0 - smat(11,8) = -0.0023220458409229982225306318634759121d0 - smat(11,9) = 0.0037903375151851348460887302846896476d0 - smat(11,10) = -0.0072763693974184312151879199618140862d0 - smat(11,11) = 0.036298954862338659343759231445515989d0 - smat(11,12) = 0.031207825188226617742995033576618875d0 - smat(11,13) = -0.0048391113450645292957140221805582104d0 - smat(12,1) = 0d0 - smat(12,2) = 0.000013928317143278162965527748781615714d0 - smat(12,3) = -0.000049880618851048044144901190979848519d0 - smat(12,4) = 0.00010216339774702812496157832988090781d0 - smat(12,5) = -0.00017309625539738356809720419177682221d0 - smat(12,6) = 0.00026940961553707439439614659509696069d0 - smat(12,7) = -0.00040443772332230316955853403582025851d0 - smat(12,8) = 0.00060496973418493100557293251653545899d0 - smat(12,9) = -0.00093095720037193053532365884622517262d0 - smat(12,10) = 0.0015454096500121117880532479440961853d0 - smat(12,11) = -0.0030919209354808315648345907792453574d0 - smat(12,12) = 0.017658567138828300830371757817768742d0 - smat(12,13) = 0.0097294652774911223289688845532880513d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.052035451127180552583542695772964322d0 - nodes(3) = 0.22284060704383785550783145345736276d0 - nodes(4) = 0.46813761308958404208311038075775359d0 - nodes(5) = 0.72220328489096792556332130780461091d0 - nodes(6) = 0.91695838655259485329313462701802742d0 - nodes(7) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.070711520884440145777701622894259895d0 - smat(1,3) = -0.033754461870241915950261110255278244d0 - smat(1,4) = 0.02809352719979403428740425093531014d0 - smat(1,5) = -0.024198592199160015463942059919538009d0 - smat(1,6) = 0.020021144368942092449992214960107892d0 - smat(1,7) = -0.0088376872565937885173522228418973444d0 - smat(2,1) = 0d0 - smat(2,2) = 0.060764253585791153979312800354887733d0 - smat(2,3) = 0.14076979657083383801199757954478806d0 - smat(2,4) = -0.053188015768885621316750348497830364d0 - smat(2,5) = 0.040665494116609075077421335400330651d0 - smat(2,6) = -0.032284194736657615679601312401726308d0 - smat(2,7) = 0.014077822148966472851908703283948652d0 - smat(3,1) = 0d0 - smat(3,2) = -0.0091792294758381109282798097699221514d0 - smat(3,3) = 0.11530224148769152681357732420649603d0 - smat(3,4) = 0.17343620334606707850710130114214146d0 - smat(3,5) = -0.057196327588231423087765152683074199d0 - smat(3,6) = 0.039590809336214111854018187654997326d0 - smat(3,7) = -0.016656691060156996583372923250247619d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0033146789333612233478964178589737415d0 - smat(4,3) = -0.016991577995089252562480864396235417d0 - smat(4,4) = 0.13399913758470938829167619583934548d0 - smat(4,5) = 0.16496007324231162918554075619194263d0 - smat(4,6) = -0.05031464701248359642658264195051769d0 - smat(4,7) = 0.01909800704857449164416106350334854d0 - smat(5,1) = 0d0 - smat(5,2) = -0.0011469434977217154974589687590570924d0 - smat(5,3) = 0.0051147331683281717800920193658273993d0 - smat(5,4) = -0.015988737011619761888181022962554957d0 - smat(5,5) = 0.11155122201603017226721862748156966d0 - smat(5,6) = 0.11759280575992419005067526710395717d0 - smat(5,7) = -0.022367978773314128982532603016325662d0 - smat(6,1) = 0d0 - smat(6,2) = 0.00020952038202304471492283447754464838d0 - smat(6,3) = -0.00089282199596040594218408837894958747d0 - smat(6,4) = 0.0024391136623969851332962857325580109d0 - smat(6,5) = -0.006799141306146418961632189256586307d0 - smat(6,6) = 0.054607660011349794613734360737649694d0 - smat(6,7) = 0.033477282693742147148728169669756148d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.22284060704383785550783145345736276d0 - nodes(3) = 0.72220328489096792556332130780461091d0 - nodes(4) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.31401491781149672452986848679989864d0 - smat(1,3) = -0.16568951838574366757669497306302798d0 - smat(1,4) = 0.074515207618084798554657939720492101d0 - smat(2,1) = 0d0 - smat(2,2) = 0.19620387422181998964961171045773965d0 - smat(2,3) = 0.39928898992883604982575595816864284d0 - smat(2,4) = -0.096130186303525969419877814279134352d0 - smat(3,1) = 0d0 - smat(3,2) = -0.0092066977750303097688821587418240454d0 - smat(3,3) = 0.16465485957494172642888619453009317d0 - smat(3,4) = 0.12234855330912065777667465640711997d0 - end select - case(17) - select case(refine) - case(8) - nodes(1) = 0.0d0 - nodes(2) = 0.47594230846323486057258899201584968d0 - nodes(3) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.69206458339927734631268544653738074d0 - smat(1,3) = -0.21612227493604248574009645452153106d0 - smat(2,1) = 0d0 - smat(2,2) = 0.26202884576838256971370550399207516d0 - smat(2,3) = 0.26202884576838256971370550399207516d0 - case(1) - nodes(1) = 0.0d0 - nodes(2) = 0.005640688972511709757506466579444201d0 - nodes(3) = 0.029482298647942486631640984718003709d0 - nodes(4) = 0.071412953115158840054783901746734919d0 - nodes(5) = 0.12983102555359105597125453809428991d0 - nodes(6) = 0.20249275505010404756821998832023044d0 - nodes(7) = 0.28660608625752705998402604548439641d0 - nodes(8) = 0.37893868864697803810652900914277385d0 - nodes(9) = 0.47594230846323486057258899201584968d0 - nodes(10) = 0.57388916090668588067145385523752644d0 - nodes(11) = 0.66901519502995987653869563905313957d0 - nodes(12) = 0.75766473903134271199707427774028532d0 - nodes(13) = 0.8364309606056101239755590856541832d0 - nodes(14) = 0.90228670067937802663123850466200908d0 - nodes(15) = 0.95270040990583331433804420752426209d0 - nodes(16) = 0.98573054526317422526590063305912924d0 - nodes(17) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.0072353017248530190559999355683777753d0 - smat(1,3) = -0.002749370814509072621286030637413016d0 - smat(1,4) = 0.0021007023472625907612892548949854671d0 - smat(1,5) = -0.0017604335996887821248010802149132074d0 - smat(1,6) = 0.0015340429432776732889463117967137804d0 - smat(1,7) = -0.0013644413983363764988391080301881739d0 - smat(1,8) = 0.0012273674967279918640085356063364133d0 - smat(1,9) = -0.001110241231469734765925625192611177d0 - smat(1,10) = 0.0010055558002473515734600968928157535d0 - smat(1,11) = -0.00090823277421962539450660650725499723d0 - smat(1,12) = 0.00081432566972754600251320871316344254d0 - smat(1,13) = -0.00072018877684190327197035696481141668d0 - smat(1,14) = 0.00062164041704908208102848302473606702d0 - smat(1,15) = -0.0005124597398071432896883143907313262d0 - smat(1,16) = 0.00037966440690718865309746931372010173d0 - smat(1,17) = -0.00015254349866809555581970729122337868d0 - smat(2,1) = 0d0 - smat(2,2) = 0.0083803089020771161880825814751581522d0 - smat(2,3) = 0.019354330581589943976656845642696866d0 - smat(2,4) = -0.0066079486792547334960306150523591658d0 - smat(2,5) = 0.004916652761480212962337378549987059d0 - smat(2,6) = -0.0040916380875411276870853998044286486d0 - smat(2,7) = 0.003556825261349783140646515512802051d0 - smat(2,8) = -0.0031579132117697880459560862913764146d0 - smat(2,9) = 0.0028333804339110957733914205568537262d0 - smat(2,10) = -0.0025524579195882233523981294681831316d0 - smat(2,11) = 0.002296926542868737361099422154122567d0 - smat(2,12) = -0.002054102970538763634695172704724073d0 - smat(2,13) = 0.0018133137996982487422515851932645768d0 - smat(2,14) = -0.0015631738425923188478632315022297495d0 - smat(2,15) = 0.0012875169991782039001087788087937082d0 - smat(2,16) = -0.00095338552009681069377302252552650325d0 - smat(2,17) = 0.00038297462465920058736164758803446078d0 - smat(3,1) = 0d0 - smat(3,2) = -0.0017261630310079683625298721011582245d0 - smat(3,3) = 0.019298605569871845968047410369124533d0 - smat(3,4) = 0.029895644661491164525315880670804875d0 - smat(3,5) = -0.0091985499369762753999102857276814655d0 - smat(3,6) = 0.0065499138511350346409727796520152379d0 - smat(3,7) = -0.0053284199332371865933612421763512926d0 - smat(3,8) = 0.0045670248504939651711386488595050373d0 - smat(3,9) = -0.0040122041638524478711943825048510009d0 - smat(3,10) = 0.0035656720167926180064491749000491679d0 - smat(3,11) = -0.0031794294097666311224272976838416713d0 - smat(3,12) = 0.0028252594545572323635382891850504015d0 - smat(3,13) = -0.0024829329046328017326771130873332547d0 - smat(3,14) = 0.0021337567675993935788694732454360275d0 - smat(3,15) = -0.0017538205684623895851677773231035504d0 - smat(3,16) = 0.0012970585257030649557924376443154299d0 - smat(3,17) = -0.00052076128249226511971320688551579477d0 - smat(4,1) = 0d0 - smat(4,2) = 0.00089525495263512854902390551784155672d0 - smat(4,3) = -0.0042211605624294057407567393785022567d0 - smat(4,4) = 0.029406048562290065017960865029004049d0 - smat(4,5) = 0.039277331980236235454798599227617275d0 - smat(4,6) = -0.011349418157162932176671623639462727d0 - smat(4,7) = 0.0078033979883481692611278766604327182d0 - smat(4,8) = -0.0062092445724290649721171176816116687d0 - smat(4,9) = 0.0052374941038391622362019577999521013d0 - smat(4,10) = -0.0045402255686790902926878232361025784d0 - smat(4,11) = 0.0039831213344398178806880631789051874d0 - smat(4,12) = -0.0035005120345394310494870602579495432d0 - smat(4,13) = 0.0030529085055182167523697174156029143d0 - smat(4,14) = -0.0026097662965926050056962976994254099d0 - smat(4,15) = 0.0021375698307884210911169064952132051d0 - smat(4,16) = -0.0015775727800590011961618621193595821d0 - smat(4,17) = 0.00063284515222853010676126902596445918d0 - smat(5,1) = 0d0 - smat(5,2) = -0.00056058141412470967488581988934089111d0 - smat(5,3) = 0.002289745583358534324624318348859141d0 - smat(5,4) = -0.0064761852069544708772883837363723119d0 - smat(5,5) = 0.03829998260770102280794418498564013d0 - smat(5,6) = 0.047199323563549091473034416728528184d0 - smat(5,7) = -0.013082144094883502446611752823572523d0 - smat(5,8) = 0.008750934928996695503711368434645868d0 - smat(5,9) = -0.0068268489383585029799879219540993506d0 - smat(5,10) = 0.0056669233645702627512152963637127444d0 - smat(5,11) = -0.0048402834941313660032460648553202498d0 - smat(5,12) = 0.0041798426732030780189044530231076246d0 - smat(5,13) = -0.0036024155970859853091262246481900689d0 - smat(5,14) = 0.0030548543371490419056410859637405146d0 - smat(5,15) = -0.0024889571820729172574156060608835268d0 - smat(5,16) = 0.0018311862114324177761670257772638881d0 - smat(5,17) = -0.00073364784583569841571492542077372962d0 - smat(6,1) = 0d0 - smat(6,2) = 0.00038311762178168639205711555947602254d0 - smat(6,3) = -0.0014753252183277058449428668651718664d0 - smat(6,4) = 0.003541654614669303029956674979454974d0 - smat(6,5) = -0.0083900012492905800155476846106951774d0 - smat(6,6) = 0.045640871356508267504000300439722624d0 - smat(6,7) = 0.053370757877165723650156641167061151d0 - smat(6,8) = -0.014357632194136693419515679744174502d0 - smat(6,9) = 0.0093917191435366789849737848085727124d0 - smat(6,10) = -0.0071969117602760880737060830198572833d0 - smat(6,11) = 0.0058788207552062110502546834862613417d0 - smat(6,12) = -0.0049386902597309353127053397230444204d0 - smat(6,13) = 0.0041808186799901069235864221575168453d0 - smat(6,14) = -0.0035035695100007582967206251067744893d0 - smat(6,15) = 0.002832789865596183032175474477937337d0 - smat(6,16) = -0.0020748478667885980984437151683847396d0 - smat(6,17) = 0.0008297593515202109102269543136870105d0 - smat(7,1) = 0d0 - smat(7,2) = -0.00027446559627483130115635609227223206d0 - smat(7,3) = 0.0010251592507947207760566402723736922d0 - smat(7,4) = -0.0022915963886884422346896672619111072d0 - smat(7,5) = 0.0045704182550997620566918811390094638d0 - smat(7,6) = -0.009892660449456905004928084970002533d0 - smat(7,7) = 0.051148203201057789735619790574072453d0 - smat(7,8) = 0.057559150892219295085966129097864045d0 - smat(7,9) = -0.015137016992590980475657568017973608d0 - smat(7,10) = 0.0097146677012382570123000569431553474d0 - smat(7,11) = -0.0073200463379059725453287756340543199d0 - smat(7,12) = 0.0058788973985512807773493125594974802d0 - smat(7,13) = -0.0048415180609766986755754629955794832d0 - smat(7,14) = 0.0039867214094031723493821497708571015d0 - smat(7,15) = -0.0031880228536509591569901878876240098d0 - smat(7,16) = 0.0023202215657342054472241396887913737d0 - smat(7,17) = -0.000925510605102715723761033513616575d0 - smat(8,1) = 0d0 - smat(8,2) = 0.00020163664940030283442766542545692928d0 - smat(8,3) = -0.00073976475991313358455201913198233048d0 - smat(8,4) = 0.0015911080042890874536965241251745211d0 - smat(8,5) = -0.0029387802789967303597031448564195589d0 - smat(8,6) = 0.0053344960280034379436728097984121815d0 - smat(8,7) = -0.010929228109735828102309763287685627d0 - smat(8,8) = 0.054611184986826373677859099547990127d0 - smat(8,9) = 0.059605489525959905252053532942656432d0 - smat(8,10) = -0.015394499481906548243299100774436796d0 - smat(8,11) = 0.0097124254045560919817243867574176092d0 - smat(8,12) = -0.0071956541300070081073238871935649074d0 - smat(8,13) = 0.0056675062625965343647662455864851993d0 - smat(8,14) = -0.00454375351425498882889399098439d0 - smat(8,15) = 0.0035749175912239382763492059498709028d0 - smat(8,16) = -0.0025780892524332925119010085182035901d0 - smat(8,17) = 0.0010246248906486804194934274698067328d0 - smat(9,1) = 0d0 - smat(9,2) = -0.00014967050974781213516524252158394725d0 - smat(9,3) = 0.00054289912311503539826055658677372358d0 - smat(9,4) = -0.0011407196566037049165640790881345473d0 - smat(9,5) = 0.0020195200921344462609126163364041987d0 - smat(9,6) = -0.0033856552267909895716975150541661956d0 - smat(9,7) = 0.0058055146604496616581951405793932893d0 - smat(9,8) = -0.011461435921430478268238716422155612d0 - smat(9,9) = 0.055897120931049842740475393341775489d0 - smat(9,10) = 0.059431925542889292315196993646210583d0 - smat(9,11) = -0.015121430400522622687812563047114441d0 - smat(9,12) = 0.0093852814557666099635290469936666609d0 - smat(9,13) = -0.0068249597947846692468500760593568366d0 - smat(9,14) = 0.0052399523693909533732863033259273888d0 - smat(9,15) = -0.0040215392892036339136368664655314494d0 - smat(9,16) = 0.0028611403747191195845765872295728628d0 - smat(9,17) = -0.0011310913069800304556027161404324925d0 - smat(10,1) = 0d0 - smat(10,2) = 0.00011087765154477405049207843950529413d0 - smat(10,3) = -0.00039913541036984216226061145581071334d0 - smat(10,4) = 0.00082601278345873770744179498088638724d0 - smat(10,5) = -0.0014247508704746120519353401915940763d0 - smat(10,6) = 0.0022851134130864140482970577052386757d0 - smat(10,7) = -0.0036140971727908563986014321888797162d0 - smat(10,8) = 0.005966216380612491940113233863743393d0 - smat(10,9) = -0.011469489359649166916415484859156449d0 - smat(10,10) = 0.054956641354477250930649180459908563d0 - smat(10,11) = 0.057045244054434589755035588950535819d0 - smat(10,12) = -0.014327392963177770453879253634370727d0 - smat(10,13) = 0.0087412906620632400829179726198492347d0 - smat(10,14) = -0.0062084344957109928364679287636425386d0 - smat(10,15) = 0.0045754071595728558066875695467321852d0 - smat(10,16) = -0.0031874666994040536620528961830653926d0 - smat(10,17) = 0.001249997635600936027220254500273382d0 - smat(11,1) = 0d0 - smat(11,2) = -0.000080950337705702174750638266548868813d0 - smat(11,3) = 0.00028987225983356114027764931952353627d0 - smat(11,4) = -0.00059374317565855073739304374846228358d0 - smat(11,5) = 0.0010067795670129009887879304882563178d0 - smat(11,6) = -0.0015711720571732061869703229998697442d0 - smat(11,7) = 0.00237538986484000305328549487282365d0 - smat(11,8) = -0.0036152927349585083805658817371578103d0 - smat(11,9) = 0.0058106826023472338522936267249349817d0 - smat(11,10) = -0.010952997542346274098213558536152119d0 - smat(11,11) = 0.051825607345878271362622917947884067d0 - smat(11,12) = 0.052536659112089375175721214776967838d0 - smat(11,13) = -0.013039288835855456227371088144728226d0 - smat(11,14) = 0.0077927952755095872472598512240259219d0 - smat(11,15) = -0.0053334091631937214177237352288881862d0 - smat(11,16) = 0.0035874059199768656325472817995824499d0 - smat(11,17) = -0.001388794099213543771429059791357271d0 - smat(12,1) = 0d0 - smat(12,2) = 0.000057330682490671353873183037529465619d0 - smat(12,3) = -0.00020453302827184903844098244207623719d0 - smat(12,4) = 0.00041595453510462771377860073726027388d0 - smat(12,5) = -0.00069718319086338016202000704314840241d0 - smat(12,6) = 0.0010687339792924490563624572847723292d0 - smat(12,7) = -0.0015715579123216637785935661803521421d0 - smat(12,8) = 0.0022863901435180610438091293481769576d0 - smat(12,9) = -0.0033891471873032932662961977845240902d0 - smat(12,10) = 0.0053445009743927867861230065268659699d0 - smat(12,11) = -0.009930954385800203243529652366005174d0 - smat(12,12) = 0.046623606670564969590181557831630741d0 - smat(12,13) = 0.046078006585294560588727717803826573d0 - smat(12,14) = -0.011297712322962174360890361106281328d0 - smat(12,15) = 0.0065440874434587134363522555262692674d0 - smat(12,16) = -0.0041211155529764115869574347871911615d0 - smat(12,17) = 0.0015598141406495478460051014762080231d0 - smat(13,1) = 0d0 - smat(13,2) = -0.000038453809946206369910045720943723839d0 - smat(13,3) = 0.0001368296177851285557228074530639066d0 - smat(13,4) = -0.00027688017585875856595727805618750222d0 - smat(13,5) = 0.00046039895760232364333345264136257476d0 - smat(13,6) = -0.000697354946431717065663190242103689d0 - smat(13,7) = 0.0010072704754495656435016004366135462d0 - smat(13,8) = -0.0014258676434649518237729811178581019d0 - smat(13,9) = 0.0020219493441773881809220194234901965d0 - smat(13,10) = -0.0029442728706262732166091226638201008d0 - smat(13,11) = 0.0045845601070097177721934456055205908d0 - smat(13,12) = -0.0084407397236041540968600855426089135d0 - smat(13,13) = 0.039548969855581884882678755357361348d0 - smat(13,14) = 0.037914056394242032106959640639414131d0 - smat(13,15) = -0.0091460566641139350806000380023486801d0 - smat(13,16) = 0.0049377289940758944064333512171615444d0 - smat(13,17) = -0.0017863978381100363166929125293609001d0 - smat(14,1) = 0d0 - smat(14,2) = 0.000023380637036487915388999173518353157d0 - smat(14,3) = -0.000083045433328972046797785778047819296d0 - smat(14,4) = 0.00016747256314432766997691924789291086d0 - smat(14,5) = -0.00027697958653178300317536851669524803d0 - smat(14,6) = 0.00041620586366615527663770739299684464d0 - smat(14,7) = -0.00059424246765964904763039631003734562d0 - smat(14,8) = 0.00082694152788604161247629341659168621d0 - smat(14,9) = -0.0011424420752151966377598848696273639d0 - smat(14,10) = 0.0015944264443467039260934157470642326d0 - smat(14,11) = -0.0022985467062473615262310617047268386d0 - smat(14,12) = 0.003558741850004762462095273971975791d0 - smat(14,13) = -0.0065360884236384769488040076551893439d0 - smat(14,14) = 0.030869985621102043417016991973148365d0 - smat(14,15) = 0.028349039920025009352251833699139566d0 - smat(14,16) = -0.0065827424431767128004775780755594013d0 - smat(14,17) = 0.0021216019350419080857443508724434373d0 - smat(15,1) = 0d0 - smat(15,2) = -0.000011642230389338899955398422711493362d0 - smat(15,3) = 0.000041304179523507759345909271028221436d0 - smat(15,4) = -0.000083113849352992997399758855572308158d0 - smat(15,5) = 0.00013699147986369740144805509354129403d0 - smat(15,6) = -0.00020482494037838386959094121878084693d0 - smat(15,7) = 0.00029035368433099269717953971952821749d0 - smat(15,8) = -0.00039990823326055890130871012784540286d0 - smat(15,9) = 0.00054414908967572982189932014543382498d0 - smat(15,10) = -0.00074185868650489015034118875202674899d0 - smat(15,11) = 0.0010289038092252414841223034546955736d0 - smat(15,12) = -0.001482788565643932101006746839240089d0 - smat(15,13) = 0.0023076776369358360523121553417182177d0 - smat(15,14) = -0.0042844938085048156898663638925251862d0 - smat(15,15) = 0.020910143905785448381238844669197886d0 - smat(15,16) = 0.017711625824524691368945667244339214d0 - smat(15,17) = -0.0027323839384893214291662614339047569d0 - smat(16,1) = 0d0 - smat(16,2) = 0.0000032876157845468247675203327607453221d0 - smat(16,3) = -0.000011656633654079487618318949840727499d0 - smat(16,4) = 0.000023428871553704308091352215755483158d0 - smat(16,5) = -0.000038547021774391736699676635528871452d0 - smat(16,6) = 0.000057483768517748473262846786728760092d0 - smat(16,7) = -0.000081185547656870025590079874417953112d0 - smat(16,8) = 0.00011123043184667232551070228153000258d0 - smat(16,9) = -0.00015020110654187279537526931897464356d0 - smat(16,10) = 0.00020245548675678579745588210740298823d0 - smat(16,11) = -0.00027579510069221634142639529715762643d0 - smat(16,12) = 0.00038546528773838542031624068385637041d0 - smat(16,13) = -0.00056532698376151554191709157945840225d0 - smat(16,14) = 0.00090731775110337632221564867513201451d0 - smat(16,15) = -0.0017745665326414845715523307449579325d0 - smat(16,16) = 0.010000301765704292957571518416236138d0 - smat(16,17) = 0.0054757626845426928050868177924619456d0 - case(2) - nodes(1) = 0.0d0 - nodes(2) = 0.029482298647942486631640984718003709d0 - nodes(3) = 0.12983102555359105597125453809428991d0 - nodes(4) = 0.28660608625752705998402604548439641d0 - nodes(5) = 0.47594230846323486057258899201584968d0 - nodes(6) = 0.66901519502995987653869563905313957d0 - nodes(7) = 0.8364309606056101239755590856541832d0 - nodes(8) = 0.95270040990583331433804420752426209d0 - nodes(9) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.040077559065051825975337247251235027d0 - smat(1,3) = -0.019242068446646506163737823053335511d0 - smat(1,4) = 0.01627686619010069761354602023073904d0 - smat(1,5) = -0.01449959613793653873562501825384602d0 - smat(1,6) = 0.0130396919559393400845838791331497d0 - smat(1,7) = -0.011568389286950918750217495175864632d0 - smat(1,8) = 0.0096970011076538763365432214795039013d0 - smat(1,9) = -0.0042987657992692897287890468935778852d0 - smat(2,1) = 0d0 - smat(2,2) = 0.035171371538891042158908339981374969d0 - smat(2,3) = 0.083371263253911374851027439351047343d0 - smat(2,4) = -0.031736710939468794786878677046320588d0 - smat(2,5) = 0.02499094043233693603286597651734095d0 - smat(2,6) = -0.021435494976545620655553843694667018d0 - smat(2,7) = 0.018599946108767800123448203110111465d0 - smat(2,8) = -0.015427477214450374345979059728869831d0 - smat(2,9) = 0.0068148887022062059617751748862690532d0 - smat(3,1) = 0d0 - smat(3,2) = -0.0057712960622424669574044836566696403d0 - smat(3,3) = 0.071923269733546515648576463126985658d0 - smat(3,4) = 0.1128253760513305937045064488512259d0 - smat(3,5) = -0.037510555800287404847173101369583865d0 - smat(3,6) = 0.02762456773242484335366114517712135d0 - smat(3,7) = -0.022546510164648758483791939773297899d0 - smat(3,8) = 0.018196534515066088196913678867636139d0 - smat(3,9) = -0.007966325301253406602516703833311319d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0024418490942676244769034510525118347d0 - smat(4,3) = -0.012482950653048413974923729813996081d0 - smat(4,4) = 0.096245461064776431519530178468805411d0 - smat(4,5) = 0.12676729062427095364813275783083129d0 - smat(4,6) = -0.039071836338424829727628045631744164d0 - smat(4,7) = 0.027253227515828219928041042563261451d0 - smat(4,8) = -0.020724815965608819759060503909655562d0 - smat(4,9) = 0.0089079968636466344775677959714392248d0 - smat(5,1) = 0d0 - smat(5,2) = -0.0011832773192687646393750860108848187d0 - smat(5,3) = 0.0052260376888099611409863831560640386d0 - smat(5,4) = -0.016018626640800995206756027491719113d0 - smat(5,5) = 0.10422394913839534560533045897957842d0 - smat(5,6) = 0.12317066528421496153089427644300139d0 - smat(5,7) = -0.036335953335957346652441096618311728d0 - smat(5,8) = 0.023840885592904538770437538685765038d0 - smat(5,9) = -0.0098507938415726845829698001062037802d0 - smat(6,1) = 0d0 - smat(6,2) = 0.00055997734873371992482853902444649912d0 - smat(6,3) = -0.0023339325769018191607647152522444624d0 - smat(6,4) = 0.0060941183553323296969944679004425967d0 - smat(6,5) = -0.015577044000921434223228211114346656d0 - smat(6,6) = 0.094618593411313389521505587796126792d0 - smat(6,7) = 0.10258316689033796267854799407418548d0 - smat(6,8) = -0.029503024246705925320939163063306244d0 - smat(6,9) = 0.010973910394462024319918947235739197d0 - smat(7,1) = 0d0 - smat(7,2) = -0.0002183318473986673069219410163716891d0 - smat(7,3) = 0.00088578370144532402268865479065806114d0 - smat(7,4) = -0.0021713139867237920445645827726981995d0 - smat(7,5) = 0.0047331193058715782594326170914199822d0 - smat(7,6) = -0.011255080950902123771746010515179653d0 - smat(7,7) = 0.068936305691811010709375168932841234d0 - smat(7,8) = 0.068032158664734166650965472696579407d0 - smat(7,9) = -0.012673191278614306156744257337171464d0 - smat(8,1) = 0d0 - smat(8,2) = 0.000041966170728379848951176888323936386d0 - smat(8,3) = -0.00016829519028957233361950944146802499d0 - smat(8,4) = 0.00040218446932140363237239321273034644d0 - smat(8,5) = -0.00083023898764319496644084935065286296d0 - smat(8,6) = 0.0017158913337403041836440815512803411d0 - smat(8,7) = -0.0041816297967302312413159683505465243d0 - smat(8,8) = 0.031471104407924768225556966265170628d0 - smat(8,9) = 0.018848607687114828312807501700899752d0 - case(4) - nodes(1) = 0.0d0 - nodes(2) = 0.12983102555359105597125453809428991d0 - nodes(3) = 0.47594230846323486057258899201584968d0 - nodes(4) = 0.8364309606056101239755590856541832d0 - nodes(5) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 0.18271996857730968294962953461585189d0 - smat(1,3) = -0.097930923269809608311043530412896635d0 - smat(1,4) = 0.083922873896611824961022533477480375d0 - smat(1,5) = -0.03888089365052084362835399958614572d0 - smat(2,1) = 0d0 - smat(2,2) = 0.12747488997801355417228361685823353d0 - smat(2,3) = 0.28482733302373583483513124802649303d0 - smat(2,4) = -0.11562004011097734067599638398420161d0 - smat(2,5) = 0.049429100018871756269915973021034823d0 - smat(3,1) = 0d0 - smat(3,2) = -0.012614015329009868842838241101330784d0 - smat(3,3) = 0.17996993402951234383548079795774081d0 - smat(3,4) = 0.24822859793341885708516951909863694d0 - smat(3,5) = -0.05509586449154606867484198231671345d0 - smat(4,1) = 0d0 - smat(4,2) = 0.0015158272503007179704431049405904244d0 - smat(4,3) = -0.0087943481978768498106906457857431039d0 - smat(4,4) = 0.10189663861345109254547071318942843d0 - smat(4,5) = 0.068950921728514915319217742001541052d0 - case(16) - nodes(1) = 0.0d0 - nodes(2) = 1.0d0 - smat(1,1) = 0d0 - smat(1,2) = 1.0d0 - end select - end select - end subroutine sdcquadGR - -end module sdcquad_module diff --git a/Tutorials/Chemotaxis_F/write_plotfile.f90 b/Tutorials/Chemotaxis_F/write_plotfile.f90 deleted file mode 100644 index 2d3b51045..000000000 --- a/Tutorials/Chemotaxis_F/write_plotfile.f90 +++ /dev/null @@ -1,43 +0,0 @@ -module write_plotfile_module - - use layout_module - use multifab_module - use fabio_module - - implicit none - -contains - - subroutine write_plotfile(la,phi,istep,dx,time,prob_lo,prob_hi) - - type(layout), intent(in) :: la - type(multifab), intent(in) :: phi - integer, intent(in) :: istep - real(dp_t), intent(in) :: dx, time - real(dp_t), intent(in) :: prob_lo(phi%dim), prob_hi(phi%dim) - - character(len=8) :: plotfile_name - character(len=20) :: variable_names(2) - type(multifab) :: plotdata(1) - integer :: rr(0) - real(dp_t) :: dx_vec(phi%dim) - - dx_vec(:) = dx - variable_names = [ "density", "signal " ] - - ! build plotdata, copy state - call build(plotdata(1),la,2,0) - call copy(plotdata(1),phi) - - ! define the name of the plotfile that will be written - write(unit=plotfile_name,fmt='("plt",i5.5)') istep - - ! write the plotfile - call fabio_ml_multifab_write_d(plotdata, rr, plotfile_name, variable_names, & - la%lap%pd, prob_lo, prob_hi, time, dx_vec) - - call destroy(plotdata(1)) - - end subroutine write_plotfile - -end module write_plotfile_module diff --git a/Tutorials/DataServicesTest0/DataServicesTest0.cpp b/Tutorials/DataServicesTest0/DataServicesTest0.cpp index 8b8e4f349..c719588e5 100644 --- a/Tutorials/DataServicesTest0/DataServicesTest0.cpp +++ b/Tutorials/DataServicesTest0/DataServicesTest0.cpp @@ -10,13 +10,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include const unsigned int msps(1000000); diff --git a/Tutorials/DataServicesTest0/GNUmakefile b/Tutorials/DataServicesTest0/GNUmakefile index ad956a58d..1974442fd 100644 --- a/Tutorials/DataServicesTest0/GNUmakefile +++ b/Tutorials/DataServicesTest0/GNUmakefile @@ -15,21 +15,21 @@ HERE = . DEFINES += -DBL_NOLINEVALUES -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CEXE_sources += $(EBASE).cpp -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package INCLUDE_LOCATIONS += $(HERE) -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata include $(BOXLIB_HOME)/Src/Extern/amrdata/Make.package PATHDIRS = $(HERE) -PATHDIRS += $(BOXLIB_HOME)/Src/C_BaseLib +PATHDIRS += $(BOXLIB_HOME)/Src/Base PATHDIRS += $(BOXLIB_HOME)/Src/Extern/amrdata @@ -42,5 +42,5 @@ vpath %.cpp $(PATHDIRS) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_c_c/GNUmakefile b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_c_c/GNUmakefile index 9bddc52a0..281f4aa2e 100644 --- a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_c_c/GNUmakefile +++ b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_c_c/GNUmakefile @@ -18,7 +18,7 @@ USE_MPI=TRUE USE_OMP=TRUE -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs override CXXOPTF = -O3 -msse3 @@ -47,6 +47,6 @@ vpath %.a $(LIBRARY_LOCATIONS) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/GNUmakefile b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/GNUmakefile index f7248b709..e90753b00 100644 --- a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/GNUmakefile +++ b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/GNUmakefile @@ -26,7 +26,7 @@ USE_OMP = TRUE HERE = . -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs override CXXOPTF = -O3 -msse3 @@ -48,23 +48,23 @@ include ./Make.package DEFINES += -DBL_PARALLEL_IO -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package INCLUDE_LOCATIONS += $(HERE) -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package -INCLUDES += $(BOXLIB_HOME)/Src/C_BoundaryLib +include $(BOXLIB_HOME)/Src/Boundary/Make.package +INCLUDES += $(BOXLIB_HOME)/Src/Boundary PATHDIRS = $(HERE) -PATHDIRS += $(BOXLIB_HOME)/Src/C_BaseLib -PATHDIRS += $(BOXLIB_HOME)/Src/C_AMRLib +PATHDIRS += $(BOXLIB_HOME)/Src/Base +PATHDIRS += $(BOXLIB_HOME)/Src/Amr PATHDIRS += $(BOXLIB_HOME)/Src/Extern/amrdata -PATHDIRS += $(BOXLIB_HOME)/Src/C_BoundaryLib +PATHDIRS += $(BOXLIB_HOME)/Src/Boundary @@ -80,6 +80,6 @@ vpath %.cpp $(PATHDIRS) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly.cpp b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly.cpp index 125d80ca6..62ceaf896 100644 --- a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly.cpp +++ b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly.cpp @@ -1,7 +1,7 @@ // -------------------------------------------------------------------- // HyptermOnly.cpp // -------------------------------------------------------------------- -#include +#include #include #include @@ -17,13 +17,13 @@ using std::endl; #include #endif -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #ifdef SHOWVAL diff --git a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.F b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.F index cd9d61555..247127769 100644 --- a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.F +++ b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.F @@ -1,11 +1,11 @@ /* -------------------------------------------------------------------- */ /* HyptermOnly_F.F */ /* -------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include -#include +#include #define SDIM 3 diff --git a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.H b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.H index 3938f372b..9f0c54a1b 100644 --- a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.H +++ b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_F/HyptermOnly_F.H @@ -23,7 +23,7 @@ # define FORT_INITDATA initdata_ # endif -#include +#include extern "C" { diff --git a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/GNUmakefile b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/GNUmakefile index a257ecb84..762a66bb3 100644 --- a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/GNUmakefile +++ b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/GNUmakefile @@ -28,7 +28,7 @@ USE_OMP = TRUE HERE = . -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs override CXXOPTF = -O3 -msse3 override COPTF = -O3 -msse3 @@ -49,24 +49,24 @@ include ./Make.package DEFINES += -DBL_PARALLEL_IO -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package INCLUDE_LOCATIONS += $(HERE) -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Extern/amrdata -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Tutorials/Exp_CNS_NoSpec/HyptermKernels/HyptermKernel_cpp_F -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package -INCLUDES += $(BOXLIB_HOME)/Src/C_BoundaryLib +include $(BOXLIB_HOME)/Src/Boundary/Make.package +INCLUDES += $(BOXLIB_HOME)/Src/Boundary PATHDIRS = $(HERE) -PATHDIRS += $(BOXLIB_HOME)/Src/C_BaseLib -PATHDIRS += $(BOXLIB_HOME)/Src/C_AMRLib +PATHDIRS += $(BOXLIB_HOME)/Src/Base +PATHDIRS += $(BOXLIB_HOME)/Src/Amr PATHDIRS += $(BOXLIB_HOME)/Src/Extern/amrdata -PATHDIRS += $(BOXLIB_HOME)/Src/C_BoundaryLib +PATHDIRS += $(BOXLIB_HOME)/Src/Boundary PATHDIRS += $(BOXLIB_HOME)/Tutorials/Exp_CNS_NoSpec/HyptermKernels/HyptermKernel_c_c PATHDIRS += $(BOXLIB_HOME)/Tutorials/Exp_CNS_NoSpec/HyptermKernels/HyptermKernel_cpp_F @@ -84,6 +84,6 @@ vpath %.c $(PATHDIRS) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/HyptermOnly.cpp b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/HyptermOnly.cpp index 4aa29446b..9dd3deb0a 100644 --- a/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/HyptermOnly.cpp +++ b/Tutorials/Exp_CNS_NoSpec_F/HyptermKernels/HyptermKernel_cpp_c/HyptermOnly.cpp @@ -1,7 +1,7 @@ // -------------------------------------------------------------------- // HyptermOnly.cpp // -------------------------------------------------------------------- -#include +#include #include #include @@ -17,13 +17,13 @@ using std::endl; #include #endif -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #ifdef SHOWVAL #undef SHOWVAL diff --git a/Tutorials/GettingStarted_C/GNUmakefile b/Tutorials/GettingStarted_C/GNUmakefile index acebaf4b1..d370dabf5 100644 --- a/Tutorials/GettingStarted_C/GNUmakefile +++ b/Tutorials/GettingStarted_C/GNUmakefile @@ -6,15 +6,14 @@ DEBUG = FALSE USE_MPI = FALSE USE_OMP = FALSE PROFILE = FALSE -COMP = g++ -FCOMP = gfortran +COMP = gnu DIM = 2 PRECISION = DOUBLE EBASE = main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs include ./Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/GettingStarted_C/main.cpp b/Tutorials/GettingStarted_C/main.cpp index 5f70ebaae..f8b9a68c8 100644 --- a/Tutorials/GettingStarted_C/main.cpp +++ b/Tutorials/GettingStarted_C/main.cpp @@ -1,11 +1,10 @@ -#include -#include -#include +#include +#include //*********************************************** // This can be moved into a C++ header file and #included here instead -#include +#include extern "C" { @@ -54,28 +53,26 @@ void main_main () geom.define(bx, &real_box, coord, is_per); // define a multifab with 2 components and 6 ghost cells - // We use the PArray class to help manage the memory - // (auto deallocation to prevent memory leaks) int Ncomp = 2 , Nghost = 6; // the "1" means only 1 MultiFab; you can declare more if needed - PArray data(1,PArrayManage); + Array > data(1); - // build the "0th" MultiFab in the PArray - data.set(0, new MultiFab(ba, Ncomp, Nghost)); + // build the "0th" MultiFab + data[0].reset(new MultiFab(ba, Ncomp, Nghost)); // MFIter is a "MultiFab Iterator" that loops over // the grids in the MultiFab - for ( MFIter mfi(data[0]); mfi.isValid(); ++mfi) + for ( MFIter mfi(*data[0]); mfi.isValid(); ++mfi) { // get the box associated with the current grid const Box& bx = mfi.validbox(); - work_on_data((data[0])[mfi].dataPtr(), &Nghost, &Ncomp, + work_on_data((*data[0])[mfi].dataPtr(), &Nghost, &Ncomp, bx.loVect(), bx.hiVect()); } // fill periodic domain boundary and neighboring grid ghost cells - data[0].FillBoundary(geom.periodicity()); + data[0]->FillBoundary(geom.periodicity()); } int main (int argc, char* argv[]) diff --git a/Tutorials/HeatEquation_EX1_C/GNUmakefile b/Tutorials/HeatEquation_EX1_C/GNUmakefile index 0b14c28d2..a509e6771 100644 --- a/Tutorials/HeatEquation_EX1_C/GNUmakefile +++ b/Tutorials/HeatEquation_EX1_C/GNUmakefile @@ -11,9 +11,9 @@ DIM = 2 PRECISION = DOUBLE EBASE = main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs include ./Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/HeatEquation_EX1_C/main.cpp b/Tutorials/HeatEquation_EX1_C/main.cpp index a6c756a5c..71cd0c582 100644 --- a/Tutorials/HeatEquation_EX1_C/main.cpp +++ b/Tutorials/HeatEquation_EX1_C/main.cpp @@ -1,14 +1,15 @@ #include #include -#include +#include #include -#include -#include +#include +#include #include "myfunc_F.H" -void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, +void advance (MultiFab& old_phi, MultiFab& new_phi, + Array >& flux, Real dt, const Geometry& geom) { // Fill the ghost cells of each grid from the other grids @@ -17,7 +18,7 @@ void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, int Ncomp = old_phi.nComp(); int ng_p = old_phi.nGrow(); - int ng_f = flux[0].nGrow(); + int ng_f = flux[0]->nGrow(); const Real* dx = geom.CellSize(); @@ -34,10 +35,10 @@ void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, compute_flux(old_phi[mfi].dataPtr(), &ng_p, - flux[0][mfi].dataPtr(), - flux[1][mfi].dataPtr(), + (*flux[0])[mfi].dataPtr(), + (*flux[1])[mfi].dataPtr(), #if (BL_SPACEDIM == 3) - flux[2][mfi].dataPtr(), + (*flux[2])[mfi].dataPtr(), #endif &ng_f, bx.loVect(), bx.hiVect(), &dx[0]); } @@ -50,10 +51,10 @@ void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, update_phi(old_phi[mfi].dataPtr(), new_phi[mfi].dataPtr(), &ng_p, - flux[0][mfi].dataPtr(), - flux[1][mfi].dataPtr(), + (*flux[0])[mfi].dataPtr(), + (*flux[1])[mfi].dataPtr(), #if (BL_SPACEDIM == 3) - flux[2][mfi].dataPtr(), + (*flux[2])[mfi].dataPtr(), #endif &ng_f, bx.loVect(), bx.hiVect(), &dx[0] , &dt); } @@ -137,22 +138,22 @@ void main_main () // we allocate two phi multifabs; one will store the old state, the other the new // we swap the indices each time step to avoid copies of new into old - PArray phi(2, PArrayManage); - phi.set(0, new MultiFab(ba, Ncomp, Nghost)); - phi.set(1, new MultiFab(ba, Ncomp, Nghost)); + Array > phi(2); + phi[0].reset(new MultiFab(ba, Ncomp, Nghost)); + phi[1].reset(new MultiFab(ba, Ncomp, Nghost)); // Initialize both to zero (just because) - phi[0].setVal(0.0); - phi[1].setVal(0.0); + phi[0]->setVal(0.0); + phi[1]->setVal(0.0); // Initialize phi[init_index] by calling a Fortran routine. // MFIter = MultiFab Iterator int init_index = 0; - for ( MFIter mfi(phi[init_index]); mfi.isValid(); ++mfi ) + for ( MFIter mfi(*phi[init_index]); mfi.isValid(); ++mfi ) { const Box& bx = mfi.validbox(); - init_phi(phi[init_index][mfi].dataPtr(), + init_phi((*phi[init_index])[mfi].dataPtr(), bx.loVect(), bx.hiVect(), &Nghost, geom.CellSize(), geom.ProbLo(), geom.ProbHi()); } @@ -165,17 +166,17 @@ void main_main () { int n = 0; const std::string& pltfile = BoxLib::Concatenate("plt",n,5); - writePlotFile(pltfile, phi[init_index], geom, time); + writePlotFile(pltfile, *phi[init_index], geom, time); } // build the flux multifabs - PArray flux(BL_SPACEDIM, PArrayManage); + Array > flux(BL_SPACEDIM); for (int dir = 0; dir < BL_SPACEDIM; dir++) { // flux(dir) has one component, zero ghost cells, and is nodal in direction dir BoxArray edge_ba = ba; edge_ba.surroundingNodes(dir); - flux.set(dir, new MultiFab(edge_ba, 1, 0)); + flux[dir].reset(new MultiFab(edge_ba, 1, 0)); } int old_index = init_index; @@ -184,7 +185,7 @@ void main_main () int new_index = 1 - old_index; // new_phi = old_phi + dt * (something) - advance(phi[old_index], phi[new_index], flux, dt, geom); + advance(*phi[old_index], *phi[new_index], flux, dt, geom); time = time + dt; // Tell the I/O Processor to write out which step we're doing @@ -195,7 +196,7 @@ void main_main () if (plot_int > 0 && n%plot_int == 0) { const std::string& pltfile = BoxLib::Concatenate("plt",n,5); - writePlotFile(pltfile, phi[new_index], geom, time); + writePlotFile(pltfile, *phi[new_index], geom, time); } } diff --git a/Tutorials/HeatEquation_EX1_C/myfunc_F.H b/Tutorials/HeatEquation_EX1_C/myfunc_F.H index d7865a015..63b969781 100644 --- a/Tutorials/HeatEquation_EX1_C/myfunc_F.H +++ b/Tutorials/HeatEquation_EX1_C/myfunc_F.H @@ -1,7 +1,7 @@ #ifndef MYFUNC_F_H__ #define MUFUNC_F_H__ -#include +#include extern "C" { diff --git a/Tutorials/HeatEquation_EX1_C/writePlotFile.H b/Tutorials/HeatEquation_EX1_C/writePlotFile.H index 62874b308..76c63a2b6 100644 --- a/Tutorials/HeatEquation_EX1_C/writePlotFile.H +++ b/Tutorials/HeatEquation_EX1_C/writePlotFile.H @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include void writePlotFile (const std::string& dir, diff --git a/Tutorials/HeatEquation_EX1_CF/GNUmakefile b/Tutorials/HeatEquation_EX1_CF/GNUmakefile index 3ef2e5ee1..52275f8c1 100644 --- a/Tutorials/HeatEquation_EX1_CF/GNUmakefile +++ b/Tutorials/HeatEquation_EX1_CF/GNUmakefile @@ -19,15 +19,15 @@ DIM = 3 EBASE = main include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package include $(BOXLIB_HOME)/Src/F_Interfaces/BaseLib/Make.package -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/F_Interfaces/BaseLib -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Base VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/F_Interfaces/BaseLib vpath %.c . $(VPATH_LOCATIONS) @@ -41,5 +41,5 @@ vpath %.F90 . $(VPATH_LOCATIONS) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/HeatEquation_EX2_C/FILCC_2D.F b/Tutorials/HeatEquation_EX2_C/FILCC_2D.F index 7972e2377..097ade1da 100644 --- a/Tutorials/HeatEquation_EX2_C/FILCC_2D.F +++ b/Tutorials/HeatEquation_EX2_C/FILCC_2D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_ArrayLim.H" #define SDIM 2 diff --git a/Tutorials/HeatEquation_EX2_C/FILCC_3D.F b/Tutorials/HeatEquation_EX2_C/FILCC_3D.F index 24a7c5f82..06203a721 100644 --- a/Tutorials/HeatEquation_EX2_C/FILCC_3D.F +++ b/Tutorials/HeatEquation_EX2_C/FILCC_3D.F @@ -4,10 +4,10 @@ #define BL_LANG_FORT #endif -#include "REAL.H" -#include "CONSTANTS.H" -#include "BC_TYPES.H" -#include "ArrayLim.H" +#include "AMReX_REAL.H" +#include "AMReX_CONSTANTS.H" +#include "AMReX_BC_TYPES.H" +#include "AMReX_ArrayLim.H" #define SDIM 3 diff --git a/Tutorials/HeatEquation_EX2_C/GNUmakefile b/Tutorials/HeatEquation_EX2_C/GNUmakefile index 0b14c28d2..a509e6771 100644 --- a/Tutorials/HeatEquation_EX2_C/GNUmakefile +++ b/Tutorials/HeatEquation_EX2_C/GNUmakefile @@ -11,9 +11,9 @@ DIM = 2 PRECISION = DOUBLE EBASE = main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs include ./Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/HeatEquation_EX2_C/advance_2d.f90 b/Tutorials/HeatEquation_EX2_C/advance_2d.f90 index cab4d56d7..10a7feef4 100644 --- a/Tutorials/HeatEquation_EX2_C/advance_2d.f90 +++ b/Tutorials/HeatEquation_EX2_C/advance_2d.f90 @@ -5,7 +5,7 @@ subroutine compute_flux(phi, ng_p, fluxx, fluxy, ng_f, lo, hi, & implicit none ! includes definitions found in BC_TYPES.H - include 'bc_types.fi' + include 'AMReX_bc_types.fi' integer lo(2),hi(2),domlo(2),domhi(2),bc(2,2),ng_p,ng_f double precision phi(lo(1)-ng_p:hi(1)+ng_p,lo(2)-ng_p:hi(2)+ng_p) diff --git a/Tutorials/HeatEquation_EX2_C/advance_3d.f90 b/Tutorials/HeatEquation_EX2_C/advance_3d.f90 index 6425563a6..567eaeb20 100644 --- a/Tutorials/HeatEquation_EX2_C/advance_3d.f90 +++ b/Tutorials/HeatEquation_EX2_C/advance_3d.f90 @@ -4,7 +4,7 @@ subroutine compute_flux(phi, ng_p, fluxx, fluxy, fluxz, ng_f, lo, hi, & implicit none ! includes definitions found in BC_TYPES.H - include 'bc_types.fi' + include 'AMReX_bc_types.fi' integer lo(3),hi(3),domlo(3),domhi(3),bc(3,2),ng_p,ng_f double precision phi(lo(1)-ng_p:hi(1)+ng_p,lo(2)-ng_p:hi(2)+ng_p,lo(3)-ng_p:hi(3)+ng_p) diff --git a/Tutorials/HeatEquation_EX2_C/main.cpp b/Tutorials/HeatEquation_EX2_C/main.cpp index 2bb56bc98..24acfe5b8 100644 --- a/Tutorials/HeatEquation_EX2_C/main.cpp +++ b/Tutorials/HeatEquation_EX2_C/main.cpp @@ -1,15 +1,15 @@ #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include "myfunc_F.H" -void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, +void advance (MultiFab& old_phi, MultiFab& new_phi, Array >& flux, Real time, Real dt, const Geometry& geom, PhysBCFunct& physbcf, BCRec& bcr) { @@ -22,7 +22,7 @@ void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, int Ncomp = old_phi.nComp(); int ng_p = old_phi.nGrow(); - int ng_f = flux[0].nGrow(); + int ng_f = flux[0]->nGrow(); const Real* dx = geom.CellSize(); @@ -39,10 +39,10 @@ void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, compute_flux(old_phi[mfi].dataPtr(), &ng_p, - flux[0][mfi].dataPtr(), - flux[1][mfi].dataPtr(), + (*flux[0])[mfi].dataPtr(), + (*flux[1])[mfi].dataPtr(), #if (BL_SPACEDIM == 3) - flux[2][mfi].dataPtr(), + (*flux[2])[mfi].dataPtr(), #endif &ng_f, bx.loVect(), bx.hiVect(), (geom.Domain()).loVect(), @@ -59,10 +59,10 @@ void advance (MultiFab& old_phi, MultiFab& new_phi, PArray& flux, update_phi(old_phi[mfi].dataPtr(), new_phi[mfi].dataPtr(), &ng_p, - flux[0][mfi].dataPtr(), - flux[1][mfi].dataPtr(), + (*flux[0])[mfi].dataPtr(), + (*flux[1])[mfi].dataPtr(), #if (BL_SPACEDIM == 3) - flux[2][mfi].dataPtr(), + (*flux[2])[mfi].dataPtr(), #endif &ng_f, bx.loVect(), bx.hiVect(), &dx[0] , &dt); } @@ -166,22 +166,22 @@ void main_main () // we allocate two phi multifabs; one will store the old state, the other the new // we swap the indices each time step to avoid copies of new into old - PArray phi(2, PArrayManage); - phi.set(0, new MultiFab(ba, Ncomp, Nghost)); - phi.set(1, new MultiFab(ba, Ncomp, Nghost)); + Array > phi(2); + phi[0].reset(new MultiFab(ba, Ncomp, Nghost)); + phi[1].reset(new MultiFab(ba, Ncomp, Nghost)); // Initialize both to zero (just because) - phi[0].setVal(0.0); - phi[1].setVal(0.0); + phi[0]->setVal(0.0); + phi[1]->setVal(0.0); // Initialize phi[init_index] by calling a Fortran routine. // MFIter = MultiFab Iterator int init_index = 0; - for ( MFIter mfi(phi[init_index]); mfi.isValid(); ++mfi ) + for ( MFIter mfi(*phi[init_index]); mfi.isValid(); ++mfi ) { const Box& bx = mfi.validbox(); - init_phi(phi[init_index][mfi].dataPtr(), + init_phi((*phi[init_index])[mfi].dataPtr(), bx.loVect(), bx.hiVect(), &Nghost, geom.CellSize(), geom.ProbLo(), geom.ProbHi()); } @@ -194,17 +194,17 @@ void main_main () { int n = 0; const std::string& pltfile = BoxLib::Concatenate("plt",n,5); - writePlotFile(pltfile, phi[init_index], geom, time); + writePlotFile(pltfile, *phi[init_index], geom, time); } // build the flux multifabs - PArray flux(BL_SPACEDIM, PArrayManage); + Array > flux(BL_SPACEDIM); for (int dir = 0; dir < BL_SPACEDIM; dir++) { // flux(dir) has one component, zero ghost cells, and is nodal in direction dir BoxArray edge_ba = ba; edge_ba.surroundingNodes(dir); - flux.set(dir, new MultiFab(edge_ba, 1, 0)); + flux[dir].reset(new MultiFab(edge_ba, 1, 0)); } int old_index = init_index; @@ -213,7 +213,7 @@ void main_main () int new_index = 1 - old_index; // new_phi = old_phi + dt * (something) - advance(phi[old_index], phi[new_index], flux, time, dt, geom, physbcf, bcr); + advance(*phi[old_index], *phi[new_index], flux, time, dt, geom, physbcf, bcr); time = time + dt; // Tell the I/O Processor to write out which step we're doing @@ -224,7 +224,7 @@ void main_main () if (plot_int > 0 && n%plot_int == 0) { const std::string& pltfile = BoxLib::Concatenate("plt",n,5); - writePlotFile(pltfile, phi[new_index], geom, time); + writePlotFile(pltfile, *phi[new_index], geom, time); } } diff --git a/Tutorials/HeatEquation_EX2_C/myfunc_F.H b/Tutorials/HeatEquation_EX2_C/myfunc_F.H index b914079fb..cf6c70e93 100644 --- a/Tutorials/HeatEquation_EX2_C/myfunc_F.H +++ b/Tutorials/HeatEquation_EX2_C/myfunc_F.H @@ -1,7 +1,7 @@ #ifndef MYFUNC_F_H__ #define MUFUNC_F_H__ -#include +#include extern "C" { diff --git a/Tutorials/HeatEquation_EX2_C/writePlotFile.H b/Tutorials/HeatEquation_EX2_C/writePlotFile.H index 62874b308..76c63a2b6 100644 --- a/Tutorials/HeatEquation_EX2_C/writePlotFile.H +++ b/Tutorials/HeatEquation_EX2_C/writePlotFile.H @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include void writePlotFile (const std::string& dir, diff --git a/Tutorials/HelloWorld_C/GNUmakefile b/Tutorials/HelloWorld_C/GNUmakefile index fb245771e..1d4c5ce8d 100644 --- a/Tutorials/HelloWorld_C/GNUmakefile +++ b/Tutorials/HelloWorld_C/GNUmakefile @@ -12,9 +12,9 @@ PRECISION = DOUBLE USE_MPI = FALSE USE_OMP = FALSE -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs include ./Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/HelloWorld_C/main.cpp b/Tutorials/HelloWorld_C/main.cpp index fe76ff4d8..1088a8177 100644 --- a/Tutorials/HelloWorld_C/main.cpp +++ b/Tutorials/HelloWorld_C/main.cpp @@ -1,8 +1,8 @@ #include -#include -#include -#include +#include +#include +#include // declare a fortran subroutine extern "C" diff --git a/Tutorials/HelloWorld_CF/GNUmakefile b/Tutorials/HelloWorld_CF/GNUmakefile index c6e2d6fd0..24d67bf9b 100644 --- a/Tutorials/HelloWorld_CF/GNUmakefile +++ b/Tutorials/HelloWorld_CF/GNUmakefile @@ -19,15 +19,15 @@ DIM = 3 EBASE = main include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package include $(BOXLIB_HOME)/Src/F_Interfaces/BaseLib/Make.package -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/F_Interfaces/BaseLib -VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib +VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/Base VPATH_LOCATIONS += $(BOXLIB_HOME)/Src/F_Interfaces/BaseLib vpath %.c . $(VPATH_LOCATIONS) @@ -41,5 +41,5 @@ vpath %.F90 . $(VPATH_LOCATIONS) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/MultiColor_C/GNUmakefile b/Tutorials/MultiColor_C/GNUmakefile index eef84e6dd..91e5f5476 100644 --- a/Tutorials/MultiColor_C/GNUmakefile +++ b/Tutorials/MultiColor_C/GNUmakefile @@ -10,16 +10,16 @@ USE_MPI=TRUE EBASE = main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CEXE_sources += $(EBASE).cpp include Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package all: $(executable) @echo SUCCESS -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/MultiColor_C/main.cpp b/Tutorials/MultiColor_C/main.cpp index 84c4c6b0b..d38343b2c 100644 --- a/Tutorials/MultiColor_C/main.cpp +++ b/Tutorials/MultiColor_C/main.cpp @@ -1,11 +1,11 @@ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace { int ncomp = 8; @@ -29,16 +29,16 @@ extern "C" } void setup_rhs(MultiFab& rhs, const Geometry& geom); -void setup_coeffs(MultiFab& alpha, PArray& beta, const Geometry& geom); +void setup_coeffs(MultiFab& alpha, const Array& beta, const Geometry& geom); void set_boundary(BndryData& bd, const MultiFab& rhs, int comp); void solve(MultiFab& soln, const MultiFab& rhs, - const MultiFab& alpha, const PArray& beta, + const MultiFab& alpha, const Array& beta, const Geometry& geom); void colored_solve(MultiFab& soln, const MultiFab& rhs, - const MultiFab& alpha, const PArray& beta, + const MultiFab& alpha, const Array& beta, const Geometry& geom); void single_component_solve(MultiFab& soln, const MultiFab& rhs, - const MultiFab& alpha, const PArray& beta, + const MultiFab& alpha, const Array& beta, const Geometry& geom); int main(int argc, char* argv[]) @@ -77,15 +77,15 @@ int main(int argc, char* argv[]) setup_rhs(rhs, geom); MultiFab alpha(ba, ncomp, 0); - PArray beta(BL_SPACEDIM, PArrayManage); + Array > beta(BL_SPACEDIM); for (int i = 0; i < BL_SPACEDIM; ++i) { - beta.set(i, new MultiFab(ba, ncomp, 0, Fab_allocate, IntVect::TheDimensionVector(i))); + beta[i].reset(new MultiFab(ba, ncomp, 0, Fab_allocate, IntVect::TheDimensionVector(i))); } - setup_coeffs(alpha, beta, geom); + setup_coeffs(alpha, BoxLib::GetArrOfPtrs(beta), geom); MultiFab soln(ba, ncomp, 0); - solve(soln, rhs, alpha, beta, geom); + solve(soln, rhs, alpha, BoxLib::GetArrOfPtrs(beta), geom); VisMF::Write(soln, "soln"); @@ -106,7 +106,7 @@ void setup_rhs(MultiFab& rhs, const Geometry& geom) } } -void setup_coeffs(MultiFab& alpha, PArray& beta, const Geometry& geom) +void setup_coeffs(MultiFab& alpha, const Array& beta, const Geometry& geom) { const Real* dx = geom.CellSize(); @@ -118,12 +118,12 @@ void setup_coeffs(MultiFab& alpha, PArray& beta, const Geometry& geom) for ( MFIter mfi(alpha); mfi.isValid(); ++mfi ) { - FArrayBox& betax = beta[0][mfi]; - FArrayBox& betay = beta[1][mfi]; + FArrayBox& betax = (*beta[0])[mfi]; + FArrayBox& betay = (*beta[1])[mfi]; fort_set_coef(betax.dataPtr(), betax.loVect(), betax.hiVect(), betay.dataPtr(), betay.loVect(), betay.hiVect(), - beta[0].nComp(), dx, sigma, w); + beta[0]->nComp(), dx, sigma, w); } } @@ -184,7 +184,7 @@ void set_boundary(BndryData& bd, const MultiFab& rhs, int comp) } void solve(MultiFab& soln, const MultiFab& rhs, - const MultiFab& alpha, const PArray& beta, const Geometry& geom) + const MultiFab& alpha, const Array& beta, const Geometry& geom) { int ncolors = ParallelDescriptor::NColors(); int cncomp = ncomp / ncolors; @@ -192,42 +192,43 @@ void solve(MultiFab& soln, const MultiFab& rhs, const BoxArray& ba = rhs.boxArray(); - PArray csoln(ncolors, PArrayManage); - PArray crhs(ncolors, PArrayManage); - PArray calpha(ncolors, PArrayManage); - Array > cbeta(ncolors); + Array > csoln(ncolors); + Array > crhs(ncolors); + Array > calpha(ncolors); + Array > > cbeta(ncolors); for (int i = 0; i < ncolors; ++i) { ParallelDescriptor::Color color = ParallelDescriptor::Color(i); // Build colored MFs. - csoln.set(i, new MultiFab(ba, cncomp, 0, color)); - crhs.set(i, new MultiFab(ba, cncomp, 0, color)); - calpha.set(i, new MultiFab(ba, cncomp, 0, color)); - cbeta[i].resize(BL_SPACEDIM, PArrayManage); + csoln[i].reset(new MultiFab(ba, cncomp, 0, color)); + crhs[i].reset(new MultiFab(ba, cncomp, 0, color)); + calpha[i].reset(new MultiFab(ba, cncomp, 0, color)); + cbeta[i].resize(BL_SPACEDIM); for (int j = 0; j < BL_SPACEDIM; ++j) { - cbeta[i].set(j, new MultiFab(beta[j].boxArray(), cncomp, 0, color)); + cbeta[i][j].reset(new MultiFab(beta[j]->boxArray(), cncomp, 0, color)); } // Parallel copy data into colored MFs. - crhs[i].copy(rhs, cncomp*i, 0, cncomp); - calpha[i].copy(alpha, cncomp*i, 0, cncomp); + crhs[i]->copy(rhs, cncomp*i, 0, cncomp); + calpha[i]->copy(alpha, cncomp*i, 0, cncomp); for (int j = 0; j < BL_SPACEDIM; ++j) { - cbeta[i][j].copy(beta[j], cncomp*i, 0, cncomp); + cbeta[i][j]->copy(*beta[j], cncomp*i, 0, cncomp); } } int icolor = ParallelDescriptor::SubCommColor().to_int(); - colored_solve(csoln[icolor], crhs[icolor], calpha[icolor], cbeta[icolor], geom); + colored_solve(*csoln[icolor], *crhs[icolor], *calpha[icolor], + BoxLib::GetArrOfPtrs(cbeta[icolor]), geom); // Copy solution back from colored MFs. for (int i = 0; i < ncolors; ++i) { - soln.copy(csoln[i], 0, cncomp*i, cncomp); + soln.copy(*csoln[i], 0, cncomp*i, cncomp); } } void colored_solve(MultiFab& soln, const MultiFab& rhs, - const MultiFab& alpha, const PArray& beta, + const MultiFab& alpha, const Array& beta, const Geometry& geom) { const BoxArray& ba = soln.boxArray(); @@ -243,19 +244,20 @@ void colored_solve(MultiFab& soln, const MultiFab& rhs, MultiFab ssoln(ba, 1, 1, dm); MultiFab srhs(ba, 1, 0, dm); MultiFab salpha(ba, 1, 0, dm); - PArray sbeta(BL_SPACEDIM, PArrayManage); + Array > sbeta(BL_SPACEDIM); for (int j = 0; j < BL_SPACEDIM; ++j) { - sbeta.set(j, new MultiFab(beta[j].boxArray(), 1, 0, dm)); + sbeta[j].reset(new MultiFab(beta[j]->boxArray(), 1, 0, dm)); } MultiFab::Copy(ssoln , soln , i, 0, 1, 0); MultiFab::Copy(srhs , rhs , i, 0, 1, 0); MultiFab::Copy(salpha, alpha, i, 0, 1, 0); for (int j = 0; j < BL_SPACEDIM; ++j) { - MultiFab::Copy(sbeta[j], beta[j], i, 0, 1, 0); + MultiFab::Copy(*sbeta[j], *beta[j], i, 0, 1, 0); } - single_component_solve(ssoln, srhs, salpha, sbeta, geom); + single_component_solve(ssoln, srhs, salpha, + BoxLib::GetArrOfPtrs(sbeta), geom); MultiFab::Copy(soln, ssoln, 0, i, 1, 0); } @@ -263,7 +265,7 @@ void colored_solve(MultiFab& soln, const MultiFab& rhs, } void single_component_solve(MultiFab& soln, const MultiFab& rhs, - const MultiFab& alpha, const PArray& beta, + const MultiFab& alpha, const Array& beta, const Geometry& geom) { const ParallelDescriptor::Color color = soln.color(); diff --git a/Tutorials/MultiFabTests_C/GNUmakefile b/Tutorials/MultiFabTests_C/GNUmakefile index 463c9aca1..4ff353312 100644 --- a/Tutorials/MultiFabTests_C/GNUmakefile +++ b/Tutorials/MultiFabTests_C/GNUmakefile @@ -17,17 +17,17 @@ EBASE = mfreadwrite EBASE = gridmovetest include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs +include $(BOXLIB_HOME)/Src/Boundary/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr -vpathdir += $(BOXLIB_HOME)/Src/C_BoundaryLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_AMRLib +vpathdir += $(BOXLIB_HOME)/Src/Boundary +vpathdir += $(BOXLIB_HOME)/Src/Base +vpathdir += $(BOXLIB_HOME)/Src/Amr vpath %.c : . $(vpathdir) vpath %.h : . $(vpathdir) @@ -39,4 +39,4 @@ vpath %.f90 : . $(vpathdir) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/MultiFabTests_C/GridMoveTest.cpp b/Tutorials/MultiFabTests_C/GridMoveTest.cpp index 64c61d04f..6c4893ca1 100644 --- a/Tutorials/MultiFabTests_C/GridMoveTest.cpp +++ b/Tutorials/MultiFabTests_C/GridMoveTest.cpp @@ -3,7 +3,7 @@ // -------------------------------------------------------------------------- // this file tests the performance for moving grids // -------------------------------------------------------------------------- -#include +#include #include #include @@ -17,10 +17,11 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef BL_USE_SETBUF #define pubsetbuf setbuf diff --git a/Tutorials/MultiFabTests_C/MultiFabFillBoundary.cpp b/Tutorials/MultiFabTests_C/MultiFabFillBoundary.cpp index dd04cf293..9373a1658 100644 --- a/Tutorials/MultiFabTests_C/MultiFabFillBoundary.cpp +++ b/Tutorials/MultiFabTests_C/MultiFabFillBoundary.cpp @@ -3,7 +3,7 @@ // -------------------------------------------------------------------------- // this file writes and reads multifabs. // -------------------------------------------------------------------------- -#include +#include #include #include @@ -17,10 +17,10 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #ifdef BL_USE_SETBUF #define pubsetbuf setbuf diff --git a/Tutorials/MultiFabTests_C/MultiFabReadWrite.cpp b/Tutorials/MultiFabTests_C/MultiFabReadWrite.cpp index ad6aca5df..856908d95 100644 --- a/Tutorials/MultiFabTests_C/MultiFabReadWrite.cpp +++ b/Tutorials/MultiFabTests_C/MultiFabReadWrite.cpp @@ -3,7 +3,7 @@ // -------------------------------------------------------------------------- // this file writes and reads multifabs. // -------------------------------------------------------------------------- -#include +#include #include #include @@ -17,10 +17,11 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef BL_USE_SETBUF #define pubsetbuf setbuf diff --git a/Tutorials/MultiFab_C_F/GNUmakefile b/Tutorials/MultiFab_C_F/GNUmakefile deleted file mode 100644 index a4de2ac3a..000000000 --- a/Tutorials/MultiFab_C_F/GNUmakefile +++ /dev/null @@ -1,42 +0,0 @@ -# BOXLIB_HOME defines the directory in which we will find all the BoxLib code -# If you set BOXLIB_HOME as an environment variable, this line will be ignored -BOXLIB_HOME ?= ../.. - -DEBUG = TRUE -USE_MPI = TRUE -USE_OMP = FALSE -PROFILE = FALSE -COMP = g++ -FCOMP = gfortran -DIM = 3 -PRECISION = DOUBLE -EBASE = main - -include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs - -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib - -include $(BOXLIB_HOME)/Src/F_BaseLib/FParallelMG.mak -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/F_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/F_BaseLib - -vpath %.c : . $(vpathdir) -vpath %.h : . $(vpathdir) -vpath %.cpp : . $(vpathdir) -vpath %.H : . $(vpathdir) -vpath %.F : . $(vpathdir) -vpath %.f : . $(vpathdir) -vpath %.f90 : . $(vpathdir) - -all: $(executable) - -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules - -#----------------------------------------------------------------------------- -# for debugging. To see the value of a Makefile variable, -# e.g. Fmlocs, simply do "make print-Fmlocs". This will -# print out the value. -print-%: ; @echo $* is $($*) diff --git a/Tutorials/MultiFab_C_F/Make.package b/Tutorials/MultiFab_C_F/Make.package deleted file mode 100644 index 39f5ccee4..000000000 --- a/Tutorials/MultiFab_C_F/Make.package +++ /dev/null @@ -1,2 +0,0 @@ -CEXE_sources += main.cpp -f90EXE_sources += ff.f90 diff --git a/Tutorials/MultiFab_C_F/ff.f90 b/Tutorials/MultiFab_C_F/ff.f90 deleted file mode 100644 index ec489ed84..000000000 --- a/Tutorials/MultiFab_C_F/ff.f90 +++ /dev/null @@ -1,81 +0,0 @@ -module ff_module - - implicit none - - public :: ff - -contains - - subroutine ff () bind(c, name='ff') - use multifab_module - use multifab_c_module - use bl_types - - integer :: ierr, nc, ng - double precision :: norm - type(multifab) :: mf - - if (parallel_IOProcessor()) then - print *, '' - print *, "In Fortran" - end if - - ! Assuming there is a mf "data" in multifab_c_module, - ! which has been shared by C++. - call get_mf_c (mf, "data", ierr) - if (ierr .eq. 0) then - if (parallel_IOProcessor()) then - print *, ' Successfully get data mf!' - end if - - nc = multifab_ncomp(mf) - ng = multifab_nghost(mf) - - if (parallel_IOProcessor()) then - print *, ' ncomp = ', nc - print *, ' nghost = ', ng - end if - - !----------------------------------------- - - call multifab_setval(mf, 1.d0, all=.true.) - - norm = norm_l1(mf, nc, 1, all=.true.) - - if (parallel_IOProcessor()) then - print *, " 1-norm of last component", norm - end if - - !----------------------------------------- - - call multifab_setval(mf, 3.d0, all=.false.) - - norm = norm_l1(mf, nc, 1, all=.true.) - - if (parallel_IOProcessor()) then - print *, " 1-norm of last component", norm - end if - - !----------------------------------------- - - call multifab_fill_boundary(mf) - - norm = norm_l1(mf, nc, 1, all=.true.) - - if (parallel_IOProcessor()) then - print *, " 1-norm of last component", norm - end if - - end if - - call get_mf_c (mf, "foo", ierr) - if (ierr .ne. 0) then - if (parallel_IOProcessor()) then - print *, ' Cannot get foo mf!' - end if - end if - - ! no need to destroy mf! - end subroutine ff - -end module ff_module diff --git a/Tutorials/MultiFab_C_F/main.cpp b/Tutorials/MultiFab_C_F/main.cpp deleted file mode 100644 index a48443f3e..000000000 --- a/Tutorials/MultiFab_C_F/main.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include - -#include -#include -#include - -extern "C" { - void ff (); -} - -int main(int argc, char* argv[]) -{ - BoxLib::Initialize(argc,argv); - - // define the lower and upper corner of a 3D domain - IntVect domain_lo(0,0,0); - IntVect domain_hi(7,7,7); - - // build a box for the domain - Box domain(domain_lo, domain_hi); - - // build a box array from the 64^3 domain box - BoxArray ba(domain); - // break the box array into 32^3 boxes - ba.maxSize(4); - - if (ParallelDescriptor::IOProcessor()) { - std::cout << "Number of boxes: " << ba.size() << std::endl; - } - - // This defines the physical size of the box. Right now the box is [-1,1] in each direction. - RealBox real_box; - for (int n = 0; n < BL_SPACEDIM; n++) { - real_box.setLo(n,-1.0); - real_box.setHi(n, 1.0); - } - - // This says we are using Cartesian coordinates - int coord = 0; - - // This sets the boundary conditions to be doubly or triply periodic - int is_per[BL_SPACEDIM]; - for (int i = 0; i < BL_SPACEDIM; i++) is_per[i] = 1; - - // This defines a Geometry object which is useful for writing the plotfiles - Geometry geom(domain, &real_box, coord, is_per); - - // build a multifab on the box array with 2 component, 1 ghost cells - int nc = 2, ng=1; - MultiFab mf(ba, nc, ng); - - const DistributionMapping& dmap = mf.DistributionMap(); - - MultiFab_C_to_F mfctof(geom, dmap, ba); - - mfctof.share(mf, "data"); - - ff(); // a Fortran function - - if (ParallelDescriptor::IOProcessor()) { - std::cout << "\n" << " In C++\n"; - std::cout << " " << "ncomp = " << mf.nComp() << "\n"; - std::cout << " " << "nghost = " << mf.nGrow() << "\n"; - } - - mf.setVal(1.0); - Real norm = mf.norm1(nc-1,ng); - if (ParallelDescriptor::IOProcessor()) { - std::cout << " " << "1-norm " << norm << "\n"; - } - - mf.setVal(3.0, 0); // not setting ghost cells - norm = mf.norm1(nc-1,ng); - if (ParallelDescriptor::IOProcessor()) { - std::cout << " " << "1-norm " << norm << "\n"; - } - - mf.FillBoundary(geom.periodicity()); - norm = mf.norm1(nc-1,ng); - if (ParallelDescriptor::IOProcessor()) { - std::cout << " " << "1-norm " << norm << "\n"; - std::cout << std::endl; - } - - BoxLib::Finalize(); -} - diff --git a/Tutorials/MultiGrid_C/COEF_2D.F90 b/Tutorials/MultiGrid_C/COEF_2D.F90 index 86c388fdb..49885a8d0 100644 --- a/Tutorials/MultiGrid_C/COEF_2D.F90 +++ b/Tutorials/MultiGrid_C/COEF_2D.F90 @@ -1,5 +1,5 @@ -#include -#include "LO_BCTYPES.H" +#include +#include "AMReX_LO_BCTYPES.H" subroutine comp_asol(asol, a_l1, a_l2, a_h1, a_h2, & diff --git a/Tutorials/MultiGrid_C/COEF_3D.F90 b/Tutorials/MultiGrid_C/COEF_3D.F90 index 8145e52d8..d23176e7e 100644 --- a/Tutorials/MultiGrid_C/COEF_3D.F90 +++ b/Tutorials/MultiGrid_C/COEF_3D.F90 @@ -1,5 +1,5 @@ -#include -#include "LO_BCTYPES.H" +#include +#include "AMReX_LO_BCTYPES.H" subroutine comp_asol(asol, a_l1, a_l2, a_l3, a_h1, a_h2, a_h3, & diff --git a/Tutorials/MultiGrid_C/COEF_F.H b/Tutorials/MultiGrid_C/COEF_F.H index c2ac9198c..c0ee7f065 100644 --- a/Tutorials/MultiGrid_C/COEF_F.H +++ b/Tutorials/MultiGrid_C/COEF_F.H @@ -1,5 +1,5 @@ -#include -#include +#include +#include extern "C" { diff --git a/Tutorials/MultiGrid_C/GNUmakefile b/Tutorials/MultiGrid_C/GNUmakefile index 103f14f9b..01e23564e 100644 --- a/Tutorials/MultiGrid_C/GNUmakefile +++ b/Tutorials/MultiGrid_C/GNUmakefile @@ -52,21 +52,21 @@ USE_OMP=FALSE EBASE = main -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs CEXE_sources += $(EBASE).cpp include Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG4/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -vpathdir += $(BOXLIB_HOME)/Src/C_BoundaryLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary +vpathdir += $(BOXLIB_HOME)/Src/Boundary -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +vpathdir += $(BOXLIB_HOME)/Src/Base INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG vpathdir += $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG @@ -127,4 +127,4 @@ vpath %.f90 : . $(VPATH_LOCATIONS) all: $(executable) @echo SUCCESS -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/MultiGrid_C/HypreABecLap/HypreABecLap.H b/Tutorials/MultiGrid_C/HypreABecLap/HypreABecLap.H index 2db96e623..c6f5abbf3 100644 --- a/Tutorials/MultiGrid_C/HypreABecLap/HypreABecLap.H +++ b/Tutorials/MultiGrid_C/HypreABecLap/HypreABecLap.H @@ -4,11 +4,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_3D.F b/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_3D.F index b40d4c4f6..6b58d436f 100644 --- a/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_3D.F +++ b/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_3D.F @@ -3,9 +3,9 @@ #define BL_LANG_FORT #endif -#include -#include "ArrayLim.H" -#include "LO_BCTYPES.H" +#include +#include "AMReX_ArrayLim.H" +#include "AMReX_LO_BCTYPES.H" #include "HypreABec_F.H" diff --git a/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_F.H b/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_F.H index 5c1ff3ba0..b25a17e07 100644 --- a/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_F.H +++ b/Tutorials/MultiGrid_C/HypreABecLap/HypreABec_F.H @@ -1,7 +1,7 @@ #ifndef _HYPREABEC_F_H_ #define _HYPREABEC_F_H_ -#include +#include #if defined(BL_LANG_FORT) @@ -57,7 +57,7 @@ #endif #endif -#include +#include extern "C" { void FORT_HPACOEF(Real* mat, Real* acoefs, ARLIM_P(alo), ARLIM_P(ahi), diff --git a/Tutorials/MultiGrid_C/RHS_2D.F90 b/Tutorials/MultiGrid_C/RHS_2D.F90 index 557af6d23..360c928d7 100644 --- a/Tutorials/MultiGrid_C/RHS_2D.F90 +++ b/Tutorials/MultiGrid_C/RHS_2D.F90 @@ -1,5 +1,5 @@ -#include -#include "LO_BCTYPES.H" +#include +#include "AMReX_LO_BCTYPES.H" subroutine set_rhs(rhs, r_l1, r_l2, r_h1, r_h2, & lo, hi, dx, a, b, sigma, w, ibnd) bind(C, name="set_rhs") diff --git a/Tutorials/MultiGrid_C/RHS_3D.F90 b/Tutorials/MultiGrid_C/RHS_3D.F90 index f00035325..3f623fb1c 100644 --- a/Tutorials/MultiGrid_C/RHS_3D.F90 +++ b/Tutorials/MultiGrid_C/RHS_3D.F90 @@ -1,5 +1,5 @@ -#include -#include "LO_BCTYPES.H" +#include +#include "AMReX_LO_BCTYPES.H" subroutine set_rhs(rhs, r_l1, r_l2, r_l3, r_h1, r_h2, r_h3, & diff --git a/Tutorials/MultiGrid_C/RHS_F.H b/Tutorials/MultiGrid_C/RHS_F.H index 61fd40ff1..3b76c8789 100644 --- a/Tutorials/MultiGrid_C/RHS_F.H +++ b/Tutorials/MultiGrid_C/RHS_F.H @@ -1,5 +1,5 @@ -#include -#include +#include +#include extern "C" { diff --git a/Tutorials/MultiGrid_C/main.cpp b/Tutorials/MultiGrid_C/main.cpp index 8d1468f23..d16d74e82 100644 --- a/Tutorials/MultiGrid_C/main.cpp +++ b/Tutorials/MultiGrid_C/main.cpp @@ -3,21 +3,22 @@ #include #include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef USE_F90_SOLVERS -#include +#include #endif #ifdef USEHYPRE @@ -61,33 +62,33 @@ int max_grid_size; int domain_boundary_condition; void compute_analyticSolution(MultiFab& anaSoln, const Array& offset); -void setup_coeffs(BoxArray& bs, MultiFab& alpha, PArray& beta, +void setup_coeffs(BoxArray& bs, MultiFab& alpha, const Array& beta, const Geometry& geom, MultiFab& beta_cc); void setup_coeffs4(BoxArray& bs, MultiFab& alpha, MultiFab& beta, const Geometry& geom); void setup_rhs(MultiFab& rhs, const Geometry& geom); void set_boundary(BndryData& bd, const MultiFab& rhs, int comp); void solve(MultiFab& soln, const MultiFab& anaSoln, MultiFab& gphi, - Real a, Real b, MultiFab& alpha, PArray& beta, MultiFab& beta_cc, + Real a, Real b, MultiFab& alpha, const Array& beta, MultiFab& beta_cc, MultiFab& rhs, const BoxArray& bs, const Geometry& geom, solver_t solver); void solve4(MultiFab& soln, const MultiFab& anaSoln, Real a, Real b, MultiFab& alpha, MultiFab& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom); void solve_with_Cpp(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, - PArray& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom); + const Array& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom); #ifdef USE_F90_SOLVERS void solve_with_F90(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, - PArray& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom); + const Array& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom); #endif #ifdef USEHYPRE void solve_with_hypre(MultiFab& soln, Real a, Real b, MultiFab& alpha, - PArray& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom); + const Array& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom); #endif #ifdef USEHPGMG -void solve_with_HPGMG(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, PArray& beta, +void solve_with_HPGMG(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, const Array& beta, MultiFab& beta_cc, MultiFab& rhs, const BoxArray& bs, const Geometry& geom, int n_cell); #endif @@ -247,10 +248,10 @@ int main(int argc, char* argv[]) // Set up the Helmholtz operator coefficients. MultiFab alpha(bs, Ncomp, 0); - PArray beta(BL_SPACEDIM, PArrayManage); + Array > beta(BL_SPACEDIM); for ( int n=0; n& offset) } } -void setup_coeffs(BoxArray& bs, MultiFab& alpha, PArray& beta, +void setup_coeffs(BoxArray& bs, MultiFab& alpha, const Array& beta, const Geometry& geom, MultiFab& cc_coef) { BL_PROFILE("setup_coeffs()"); @@ -611,7 +616,7 @@ void solve4(MultiFab& soln, const MultiFab& anaSoln, } void solve(MultiFab& soln, const MultiFab& anaSoln, MultiFab& gphi, - Real a, Real b, MultiFab& alpha, PArray& beta, MultiFab& beta_cc, + Real a, Real b, MultiFab& alpha, const Array& beta, MultiFab& beta_cc, MultiFab& rhs, const BoxArray& bs, const Geometry& geom, solver_t solver) { @@ -685,7 +690,7 @@ void solve(MultiFab& soln, const MultiFab& anaSoln, MultiFab& gphi, } void solve_with_Cpp(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, - PArray& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom) + const Array& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom) { BL_PROFILE("solve_with_Cpp()"); @@ -706,23 +711,24 @@ void solve_with_Cpp(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& al mg.solve(soln, rhs, tolerance_rel, tolerance_abs); - PArray grad_phi(BL_SPACEDIM, PArrayManage); - for (int n = 0; n < BL_SPACEDIM; ++n) - grad_phi.set(n, new MultiFab(BoxArray(soln.boxArray()).surroundingNodes(n), 1, 0)); + Array > grad_phi(BL_SPACEDIM); + for (int n = 0; n < BL_SPACEDIM; ++n) { + grad_phi[n].reset(new MultiFab(BoxArray(soln.boxArray()).surroundingNodes(n), 1, 0)); + } #if (BL_SPACEDIM == 2) - abec_operator.compFlux(grad_phi[0],grad_phi[1],soln); + abec_operator.compFlux(*grad_phi[0],*grad_phi[1],soln); #elif (BL_SPACEDIM == 3) - abec_operator.compFlux(grad_phi[0],grad_phi[1],grad_phi[2],soln); + abec_operator.compFlux(*grad_phi[0],*grad_phi[1],*grad_phi[2],soln); #endif // Average edge-centered gradients to cell centers. - BoxLib::average_face_to_cellcenter(gphi, grad_phi, geom); + BoxLib::average_face_to_cellcenter(gphi, BoxLib::GetArrOfConstPtrs(grad_phi), geom); } #ifdef USE_F90_SOLVERS void solve_with_F90(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, - PArray& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom) + const Array& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom) { BL_PROFILE("solve_with_F90()"); @@ -761,20 +767,21 @@ void solve_with_F90(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& al int need_grad_phi = 1; fmg.solve(soln, rhs, tolerance_rel, tolerance_abs, always_use_bnorm, need_grad_phi); - PArray grad_phi(BL_SPACEDIM, PArrayManage); - for (int n = 0; n < BL_SPACEDIM; ++n) - grad_phi.set(n, new MultiFab(BoxArray(soln.boxArray()).surroundingNodes(n), 1, 0)); + Array > grad_phi(BL_SPACEDIM); + for (int n = 0; n < BL_SPACEDIM; ++n) { + grad_phi[n].reset(new MultiFab(BoxArray(soln.boxArray()).surroundingNodes(n), 1, 0)); + } - fmg.get_fluxes(grad_phi); + fmg.get_fluxes(BoxLib::GetArrOfPtrs(grad_phi)); // Average edge-centered gradients to cell centers. - BoxLib::average_face_to_cellcenter(gphi, grad_phi, geom); + BoxLib::average_face_to_cellcenter(gphi, BoxLib::GetArrOfConstPtrs(grad_phi), geom); } #endif #ifdef USEHYPRE void solve_with_hypre(MultiFab& soln, Real a, Real b, MultiFab& alpha, - PArray& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom) + const Array& beta, MultiFab& rhs, const BoxArray& bs, const Geometry& geom) { BL_PROFILE("solve_with_hypre()"); BndryData bd(bs, 1, geom); @@ -790,7 +797,7 @@ void solve_with_hypre(MultiFab& soln, Real a, Real b, MultiFab& alpha, #endif #ifdef USEHPGMG -void solve_with_HPGMG(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, PArray& beta, +void solve_with_HPGMG(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& alpha, const Array& beta, MultiFab& beta_cc, MultiFab& rhs, const BoxArray& bs, const Geometry& geom, int n_cell) { BndryData bd(bs, 1, geom); @@ -917,9 +924,10 @@ void solve_with_HPGMG(MultiFab& soln, MultiFab& gphi, Real a, Real b, MultiFab& destroy_level(&level_h); //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PArray grad_phi(BL_SPACEDIM, PArrayManage); - for (int n = 0; n < BL_SPACEDIM; ++n) - grad_phi.set(n, new MultiFab(BoxArray(soln.boxArray()).surroundingNodes(n), 1, 0)); + Array > grad_phi(BL_SPACEDIM); + for (int n = 0; n < BL_SPACEDIM; ++n) { + grad_phi[n].reset(new MultiFab(BoxArray(soln.boxArray()).surroundingNodes(n), 1, 0)); + } #if (BL_SPACEDIM == 2) abec_operator.compFlux(grad_phi[0],grad_phi[1],soln); diff --git a/Tutorials/MultiGrid_C/writePlotFile.H b/Tutorials/MultiGrid_C/writePlotFile.H index 2387bb50e..c82b21394 100644 --- a/Tutorials/MultiGrid_C/writePlotFile.H +++ b/Tutorials/MultiGrid_C/writePlotFile.H @@ -2,10 +2,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include void writePlotFile (const std::string& dir, diff --git a/Tutorials/MultiGrid_C/writePlotFile.cpp b/Tutorials/MultiGrid_C/writePlotFile.cpp index ecbbbed94..9cf72f745 100644 --- a/Tutorials/MultiGrid_C/writePlotFile.cpp +++ b/Tutorials/MultiGrid_C/writePlotFile.cpp @@ -2,12 +2,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include void diff --git a/Tutorials/PGAS_HEAT/GNUmakefile b/Tutorials/PGAS_HEAT/GNUmakefile index 5d6f413b2..e7ef38537 100644 --- a/Tutorials/PGAS_HEAT/GNUmakefile +++ b/Tutorials/PGAS_HEAT/GNUmakefile @@ -14,8 +14,8 @@ EBASE = Heat include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/PGAS_HEAT/main.cpp b/Tutorials/PGAS_HEAT/main.cpp index 3f7d2a10c..75a23b6a5 100644 --- a/Tutorials/PGAS_HEAT/main.cpp +++ b/Tutorials/PGAS_HEAT/main.cpp @@ -1,11 +1,11 @@ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include @@ -164,11 +164,11 @@ main (int argc, char* argv[]) pp.query("ncomp", Ncomp); // Allocate space for the old_phi and new_phi -- we define old_phi and new_phi as - PArray < MultiFab > phis(2, PArrayManage); - phis.set(0, new MultiFab(bs, Ncomp, Nghost)); - phis.set(1, new MultiFab(bs, Ncomp, Nghost)); - MultiFab* old_phi = &phis[0]; - MultiFab* new_phi = &phis[1]; + Array > phis(2); + phis[0].reset(new MultiFab(bs, Ncomp, Nghost)); + phis[1].reset(new MultiFab(bs, Ncomp, Nghost)); + MultiFab* old_phi = phis[0].get(); + MultiFab* new_phi = phis[1].get(); // Initialize both to zero (just because) old_phi->setVal(0.0); @@ -264,7 +264,7 @@ main (int argc, char* argv[]) // // When MPI3 shared memory is used, the dtor of MultiFab calls MPI functions. - // Because the scope of PArray < MultiFab > phis is beyond the call to + // Because the scope of phis is beyond the call to // BoxLib::Finalize(), which in turn calls MPI_Finalize(), we destroy these // MultiFabs by hand now. phis.clear(); diff --git a/Tutorials/PGAS_HEAT/writePlotFile.H b/Tutorials/PGAS_HEAT/writePlotFile.H index 2387bb50e..c82b21394 100644 --- a/Tutorials/PGAS_HEAT/writePlotFile.H +++ b/Tutorials/PGAS_HEAT/writePlotFile.H @@ -2,10 +2,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include void writePlotFile (const std::string& dir, diff --git a/Tutorials/PGAS_HEAT/writePlotFile.cpp b/Tutorials/PGAS_HEAT/writePlotFile.cpp index 68a6e2602..ed37f22d7 100644 --- a/Tutorials/PGAS_HEAT/writePlotFile.cpp +++ b/Tutorials/PGAS_HEAT/writePlotFile.cpp @@ -2,12 +2,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include void diff --git a/Tutorials/PIC_C/GNUmakefile b/Tutorials/PIC_C/GNUmakefile index 5c0dcc32b..f38f5a2c5 100644 --- a/Tutorials/PIC_C/GNUmakefile +++ b/Tutorials/PIC_C/GNUmakefile @@ -30,15 +30,15 @@ HPGMG_USE_SUBCOMM = TRUE HPGMG_BOTTOM_SOLVER= BICGSTAB HPGMG_SMOOTHER = GSRB -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs include ./Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package -include $(BOXLIB_HOME)/Src/C_ParticleLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package +include $(BOXLIB_HOME)/Src/Particle/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_to_F_MG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/F_MG/FParallelMG.mak include $(BOXLIB_HOME)/Src/F_BaseLib/FParallelMG.mak -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/PIC_C/Make.package b/Tutorials/PIC_C/Make.package index 76f7dfa5e..abd1273f3 100644 --- a/Tutorials/PIC_C/Make.package +++ b/Tutorials/PIC_C/Make.package @@ -3,5 +3,4 @@ CEXE_sources += single_level.cpp CEXE_sources += two_level.cpp CEXE_sources += solve_for_accel.cpp CEXE_sources += solve_with_f90.cpp -CEXE_sources += solve_with_hpgmg.cpp diff --git a/Tutorials/PIC_C/main.cpp b/Tutorials/PIC_C/main.cpp index 2473f97c5..f35cc687f 100644 --- a/Tutorials/PIC_C/main.cpp +++ b/Tutorials/PIC_C/main.cpp @@ -1,16 +1,16 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include -#include "Particles.H" +#include "AMReX_Particles.H" // declare routines below void single_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool verbose); diff --git a/Tutorials/PIC_C/single_level.cpp b/Tutorials/PIC_C/single_level.cpp index a4cea54ed..bda3829bc 100644 --- a/Tutorials/PIC_C/single_level.cpp +++ b/Tutorials/PIC_C/single_level.cpp @@ -1,20 +1,24 @@ #include - -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include -#include "Particles.H" +#include "AMReX_Particles.H" // declare routines below -void solve_for_accel(PArray& rhs, PArray& phi, PArray& grad_phi, - const Array& geom, int base_level, int finest_level, Real offset); +void solve_for_accel(const Array& rhs, + const Array& phi, + const Array& grad_phi, + const Array& geom, + int base_level, int finest_level, Real offset); int single_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool verbose) { @@ -69,26 +73,21 @@ int single_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, // ******************************************************************************************** // build a multifab for the rhs on the box array with - PArray rhs; - PArray phi; - PArray grad_phi; + Array > rhs(nlevs); + Array > phi(nlevs); + Array > grad_phi(nlevs); Array dmap(nlevs); - rhs.resize(nlevs,PArrayManage); - phi.resize(nlevs,PArrayManage); - grad_phi.resize(nlevs,PArrayManage); - int lev = 0; + rhs [lev].reset(new MultiFab(ba[0],1 ,0)); + phi [lev].reset(new MultiFab(ba[0],1 ,1)); + grad_phi[lev].reset(new MultiFab(ba[0],BL_SPACEDIM,1)); - rhs.set (lev,new MultiFab(ba[0],1 ,0)); - phi.set (lev,new MultiFab(ba[0],1 ,1)); - grad_phi.set(lev,new MultiFab(ba[0],BL_SPACEDIM,1)); + rhs [lev]->setVal(0.0); + phi [lev]->setVal(0.0); + grad_phi[lev]->setVal(0.0); - rhs[lev].setVal(0.0); - phi[lev].setVal(0.0); - grad_phi[lev].setVal(0.0); - - dmap[lev] = rhs[lev].DistributionMap(); + dmap[lev] = rhs[lev]->DistributionMap(); // Define a new particle container to hold my particles. // This holds a charge as well as three velocity components, three acceleration components and three position components. @@ -99,7 +98,7 @@ int single_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, Array rr(nlevs-1); // Build a new particle container to hold my particles. - MyParticleContainer* MyPC = new MyParticleContainer(geom,dmap,ba,rr); + auto MyPC = std::unique_ptr(new MyParticleContainer(geom,dmap,ba,rr)); MyPC->SetVerbose(0); @@ -145,18 +144,17 @@ int single_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, int base_level = 0; int finest_level = 0; - PArray PartMF; - PartMF.resize(nlevs,PArrayManage); - PartMF.set(0,new MultiFab(ba[0],1,1)); - PartMF[0].setVal(0.0); + Array > PartMF(1); + PartMF[0].reset(new MultiFab(ba[0],1,1)); + PartMF[0]->setVal(0.0); strt_assd = ParallelDescriptor::second(); - MyPC->AssignDensitySingleLevel(0,PartMF[0],0,1,0); + MyPC->AssignDensitySingleLevel(0,*PartMF[0],0,1,0); end_assd = ParallelDescriptor::second() - strt_assd; - MultiFab::Add(rhs[0], PartMF[0], 0, 0, 1, 0); + MultiFab::Add(*rhs[0], *PartMF[0], 0, 0, 1, 0); // ************************************************************************** // Define this to be solve at level 0 only @@ -168,7 +166,10 @@ int single_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, strt_solve = ParallelDescriptor::second(); // Use multigrid to solve Lap(phi) = rhs with periodic boundary conditions (set above) - solve_for_accel(rhs,phi,grad_phi,geom,base_level,finest_level,offset); + solve_for_accel(BoxLib::GetArrOfPtrs(rhs), + BoxLib::GetArrOfPtrs(phi), + BoxLib::GetArrOfPtrs(grad_phi), + geom,base_level,finest_level,offset); end_solve = ParallelDescriptor::second() - strt_solve; @@ -178,15 +179,13 @@ int single_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, strt_mK = ParallelDescriptor::second(); - MyPC->moveKick(grad_phi[0],nlevs-1,dummy_dt,1.0,1.0,accel_comp); + MyPC->moveKick(*grad_phi[0],nlevs-1,dummy_dt,1.0,1.0,accel_comp); end_mK = ParallelDescriptor::second() - strt_mK; // Write out the positions, masses and accelerations of each particle. // if (verbose) MyPC->WriteAsciiFile("Particles_after_level0_solve"); - delete MyPC; - ParallelDescriptor::ReduceRealMax(end_init ,IOProc); ParallelDescriptor::ReduceRealMax(end_assd,IOProc); ParallelDescriptor::ReduceRealMax(end_solve,IOProc); diff --git a/Tutorials/PIC_C/solve_for_accel.cpp b/Tutorials/PIC_C/solve_for_accel.cpp index 0a04960bc..2fe8a06ee 100644 --- a/Tutorials/PIC_C/solve_for_accel.cpp +++ b/Tutorials/PIC_C/solve_for_accel.cpp @@ -1,38 +1,40 @@ #include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include -void solve_with_f90 (PArray& rhs, PArray& phi, Array< PArray >& grad_phi_edge, - const Array& geom, int base_level, int finest_level, Real tol, Real abs_tol); -#ifdef USEHPGMG -void solve_with_hpgmg(PArray& rhs, Array< PArray >& grad_phi_edge, const Array& geom, - int base_level, int finest_level, Real tol, Real abs_tol); -#endif +void solve_with_f90 (const Array& rhs, + const Array& phi, + const Array >& grad_phi_edge, + const Array& geom, int base_level, int finest_level, + Real tol, Real abs_tol); void -solve_for_accel(PArray& rhs, PArray& phi, PArray& grad_phi, +solve_for_accel(const Array& rhs, + const Array& phi, + const Array& grad_phi, const Array& geom, int base_level, int finest_level, Real offset) { - Real tol = 1.e-10; Real abs_tol = 1.e-14; - Array< PArray > grad_phi_edge; - grad_phi_edge.resize(rhs.size()); + Array< Array > > grad_phi_edge(rhs.size()); for (int lev = base_level; lev <= finest_level ; lev++) { - grad_phi_edge[lev].resize(BL_SPACEDIM, PArrayManage); - for (int n = 0; n < BL_SPACEDIM; ++n) - grad_phi_edge[lev].set(n, new MultiFab(BoxArray(rhs[lev].boxArray()).surroundingNodes(n), 1, 1)); + grad_phi_edge[lev].resize(BL_SPACEDIM); + for (int n = 0; n < BL_SPACEDIM; ++n) { + BoxArray ba = rhs[lev]->boxArray(); + grad_phi_edge[lev][n].reset(new MultiFab(ba.surroundingNodes(n), 1, 1)); + } } Real strt = ParallelDescriptor::second(); @@ -41,17 +43,17 @@ solve_for_accel(PArray& rhs, PArray& phi, PArray& // Make sure the RHS sums to 0 if fully periodic // *************************************************** for (int lev = base_level; lev <= finest_level; lev++) { - Real n0 = rhs[lev].norm0(); + Real n0 = rhs[lev]->norm0(); // if (ParallelDescriptor::IOProcessor()) // std::cout << "Max of rhs in solve_for_phi before correction at level " // << lev << " " << n0 << std::endl; } for (int lev = base_level; lev <= finest_level; lev++) - rhs[lev].plus(-offset, 0, 1, 0); + rhs[lev]->plus(-offset, 0, 1, 0); for (int lev = base_level; lev <= finest_level; lev++) { - Real n0 = rhs[lev].norm0(); + Real n0 = rhs[lev]->norm0(); // if (ParallelDescriptor::IOProcessor()) // std::cout << "Max of rhs in solve_for_phi after correction at level " // << lev << " " << n0 << std::endl; @@ -61,17 +63,16 @@ solve_for_accel(PArray& rhs, PArray& phi, PArray& // Solve for phi and return both phi and grad_phi_edge // *************************************************** -#ifdef USEHPGMG - solve_with_hpgmg(rhs,phi,grad_phi_edge,geom,base_level,finest_level,tol,abs_tol); -#else - solve_with_f90 (rhs,phi,grad_phi_edge,geom,base_level,finest_level,tol,abs_tol); -#endif + solve_with_f90 (rhs,phi,BoxLib::GetArrOfArrOfPtrs(grad_phi_edge), + geom,base_level,finest_level,tol,abs_tol); // Average edge-centered gradients to cell centers and fill the values in ghost cells. for (int lev = base_level; lev <= finest_level; lev++) { - BoxLib::average_face_to_cellcenter(grad_phi[lev], grad_phi_edge[lev], geom[lev]); - grad_phi[lev].FillBoundary(0,BL_SPACEDIM,geom[lev].periodicity()); + BoxLib::average_face_to_cellcenter(*grad_phi[lev], + BoxLib::GetArrOfConstPtrs(grad_phi_edge[lev]), + geom[lev]); + grad_phi[lev]->FillBoundary(0,BL_SPACEDIM,geom[lev].periodicity()); } // VisMF::Write(grad_phi[0],"GradPhi"); diff --git a/Tutorials/PIC_C/solve_with_f90.cpp b/Tutorials/PIC_C/solve_with_f90.cpp index 758cb2545..6e13ef606 100644 --- a/Tutorials/PIC_C/solve_with_f90.cpp +++ b/Tutorials/PIC_C/solve_with_f90.cpp @@ -1,15 +1,18 @@ #include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include void -solve_with_f90(PArray& rhs, PArray& phi, - Array< PArray >& grad_phi_edge, - const Array& geom, int base_level, int finest_level, Real tol, Real abs_tol) +solve_with_f90(const Array& rhs, + const Array& phi, + const Array< Array >& grad_phi_edge, + const Array& geom, int base_level, int finest_level, + Real tol, Real abs_tol) { int nlevs = finest_level - base_level + 1; @@ -28,13 +31,13 @@ solve_with_f90(PArray& rhs, PArray& phi, } // Have to do some packing because these arrays does not always start with base_level - PArray geom_p(nlevs); - PArray rhs_p(nlevs); - PArray phi_p(nlevs); + Array geom_p(nlevs); + Array rhs_p(nlevs); + Array phi_p(nlevs); for (int ilev = 0; ilev < nlevs; ++ilev) { - geom_p.set(ilev, &geom[ilev+base_level]); - rhs_p.set (ilev, &rhs[ilev+base_level]); - phi_p.set (ilev, &phi[ilev+base_level]); + geom_p[ilev] = geom[ilev+base_level]; + rhs_p[ilev] = rhs[ilev+base_level]; + phi_p[ilev] = phi[ilev+base_level]; } // Refinement ratio is hardwired to 2 here. @@ -44,9 +47,9 @@ solve_with_f90(PArray& rhs, PArray& phi, FMultiGrid fmg(geom_p, base_level, crse_ratio); if (base_level == 0) { - fmg.set_bc(mg_bc, phi[base_level]); + fmg.set_bc(mg_bc, *phi[base_level]); } else { - fmg.set_bc(mg_bc, phi[base_level-1], phi[base_level]); + fmg.set_bc(mg_bc, *phi[base_level-1], *phi[base_level]); } fmg.set_const_gravity_coeffs(); diff --git a/Tutorials/PIC_C/solve_with_hpgmg.cpp b/Tutorials/PIC_C/solve_with_hpgmg.cpp deleted file mode 100644 index 3c58e61f1..000000000 --- a/Tutorials/PIC_C/solve_with_hpgmg.cpp +++ /dev/null @@ -1,145 +0,0 @@ -#ifdef USEHPGMG -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -void set_boundary(BndryData& bd, MultiFab& rhs, const Real* dx); - -void -solve_with_hpgmg(MultiFab& rhs, - PArray& grad_phi, - const Geometry& geom, - int base_level, int finest_level, - Real tol, - Real abs_tol) -{ - const Real* dx = geom.CellSize(); - const Box& domain = geom.Domain(); - - MultiFab soln(rhs.boxArray(),1,1); - - BndryData bd(rhs.boxArray(), 1, geom); - set_boundary(bd, rhs, dx); - const int n_cell = domain.length(0); - - // Because HPGMG solves the MINUS Laplacian. Isn't this fun? - rhs.mult(-1.0, 0, 1, 0); - - // We'll get the max grid (box) size from the soln MultiFab already provided - // to us. Just pick the first valid Box we can find and measure its size. - // HPGMG requires the Boxes to be cubes, so if they're not then a sanity - // check in MultiFab::CreateHPGMGLevel() will catch it and quit. - MFIter mfi(soln); - while (!mfi.isValid()) ++mfi; - const Box& bx = mfi.validbox(); - const int max_grid_size = bx.length(0); - - const int my_rank = ParallelDescriptor::MyProc(); - const int num_ranks = ParallelDescriptor::NProcs(); - - Laplacian lap_operator(bd, dx[0]); - const Real a = 0.0; - const Real b = 1.0; - - const BoxArray& ba = rhs.boxArray(); - MultiFab alpha(ba, 1, 0, Fab_allocate); - MultiFab beta_cc(ba, 1, 1, Fab_allocate); - alpha.setVal(0.0); - beta_cc.setVal(1.0); - - const Real tolerance_abs = 0.0; - const Real tolerance_rel = 1.0e-10; - - const int domain_boundary_condition = BC_PERIODIC; - - int minCoarseDim; - if (domain_boundary_condition == BC_PERIODIC) - { - minCoarseDim = 2; // avoid problems with black box calculation of D^{-1} for poisson with periodic BC's on a 1^3 grid - } - else - { - minCoarseDim = 1; // assumes you can drop order on the boundaries - } - - level_type level_h; - mg_type MG_h; - - int numVectors = 12; - - MultiFab::CreateHPGMGLevel(&level_h, rhs, n_cell, max_grid_size, my_rank, num_ranks, domain_boundary_condition, numVectors, *dx); - MultiFab::SetupHPGMGCoefficients(a, b, alpha, beta_cc, &level_h); - MultiFab::ConvertToHPGMGLevel(rhs, n_cell, max_grid_size, &level_h, VECTOR_F); - - if (level_h.boundary_condition.type == BC_PERIODIC) - { - Real average_value_of_f = mean (&level_h, VECTOR_F); - if (average_value_of_f != 0.0) - { - if (ParallelDescriptor::IOProcessor()) - { - std::cerr << "WARNING: Periodic boundary conditions, but f does not sum to zero... mean(f)=" << average_value_of_f << std::endl; - } - shift_vector(&level_h,VECTOR_F,VECTOR_F,-average_value_of_f); - } - } - //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rebuild_operator(&level_h,NULL,a,b); // i.e. calculate Dinv and lambda_max - MGBuild(&MG_h,&level_h,a,b,minCoarseDim,ParallelDescriptor::Communicator()); // build the Multigrid Hierarchy - //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (ParallelDescriptor::IOProcessor()) - std::cout << std::endl << std::endl << "===== STARTING SOLVE =====" << std::endl << std::flush; - - MGResetTimers (&MG_h); - zero_vector (MG_h.levels[0], VECTOR_U); - #ifdef USE_FCYCLES - FMGSolve (&MG_h, 0, VECTOR_U, VECTOR_F, a, b, tolerance_abs, tolerance_rel); - #else - MGSolve (&MG_h, 0, VECTOR_U, VECTOR_F, a, b, tolerance_abs, tolerance_rel); - #endif /* USE_FCYCLES */ - -#if 0 - if (show_timings) - MGPrintTiming (&MG_h, 0); -#endif - - // Now convert solution from HPGMG back to rhs MultiFab. - MultiFab::ConvertFromHPGMGLevel(soln, &level_h, VECTOR_U); - - MGDestroy(&MG_h); // destroys all but the finest grid - destroy_level(&level_h); // destroys the finest grid - - soln.FillBoundary(geom.periodicity()); - - lap_operator.compFlux(grad_phi[0],grad_phi[1],grad_phi[2],soln); -} - -void -set_boundary(BndryData& bd, MultiFab& rhs, const Real* dx) -{ - for (int n=0; n - -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include -#include "Particles.H" +#include "AMReX_Particles.H" // declare routines below -void solve_for_accel(PArray& rhs, PArray& phi, PArray& grad_phi, - const Array& geom, int base_level, int finest_level, Real offset); +void solve_for_accel(const Array& rhs, + const Array& phi, + const Array& grad_phi, + const Array& geom, + int base_level, int finest_level, Real offset); void two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool verbose) @@ -122,27 +126,23 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v // ******************************************************************************************** // build a multifab for the rhs on the box array with - PArray rhs; - PArray phi; - PArray grad_phi; + Array > rhs(nlevs); + Array > phi(nlevs); + Array > grad_phi(nlevs); Array dmap(nlevs); - rhs.resize(nlevs,PArrayManage); - phi.resize(nlevs,PArrayManage); - grad_phi.resize(nlevs,PArrayManage); - for (int lev = 0; lev < nlevs; lev++) { // # component # ghost cells - rhs.set (lev,new MultiFab(ba[lev],1 ,0)); - phi.set (lev,new MultiFab(ba[lev],1 ,1)); - grad_phi.set(lev,new MultiFab(ba[lev],BL_SPACEDIM,1)); + rhs [lev].reset(new MultiFab(ba[lev],1 ,0)); + phi [lev].reset(new MultiFab(ba[lev],1 ,1)); + grad_phi[lev].reset(new MultiFab(ba[lev],BL_SPACEDIM,1)); - rhs[lev].setVal(0.0); - phi[lev].setVal(0.0); - grad_phi[lev].setVal(0.0); + rhs [lev]->setVal(0.0); + phi [lev]->setVal(0.0); + grad_phi[lev]->setVal(0.0); - dmap[lev] = rhs[lev].DistributionMap(); + dmap[lev] = rhs[lev]->DistributionMap(); } // Define a new particle container to hold my particles. @@ -150,7 +150,7 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v typedef ParticleContainer<1+2*BL_SPACEDIM> MyParticleContainer; // Build a new particle container to hold my particles. - MyParticleContainer* MyPC = new MyParticleContainer(geom,dmap,ba,rr); + auto MyPC = std::unique_ptr(new MyParticleContainer(geom,dmap,ba,rr)); MyPC->SetVerbose(0); @@ -203,18 +203,15 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v int base_level = 0; int finest_level = nlevs-1; - PArray PartMF; - PartMF.resize(nlevs,PArrayManage); - PartMF.set(0,new MultiFab(ba[0],1,1)); - PartMF[0].setVal(0.0); + Array > PartMF; MyPC->AssignDensity(0, false, PartMF, base_level, 1, finest_level); - MyPC->AssignDensitySingleLevel(0, PartMF[0],0,1,0); + MyPC->AssignDensitySingleLevel(0, *PartMF[0],0,1,0); for (int lev = finest_level - 1 - base_level; lev >= 0; lev--) - BoxLib::average_down(PartMF[lev+1],PartMF[lev],0,1,rr[lev]); + BoxLib::average_down(*PartMF[lev+1],*PartMF[lev],0,1,rr[lev]); for (int lev = 0; lev < nlevs; lev++) - MultiFab::Add(rhs[base_level+lev], PartMF[lev], 0, 0, 1, 0); + MultiFab::Add(*rhs[base_level+lev], *PartMF[lev], 0, 0, 1, 0); // ************************************************************************** // Define this to be solve at level 0 only @@ -226,14 +223,17 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v // Use multigrid to solve Lap(phi) = rhs with periodic boundary conditions (set above) if (ParallelDescriptor::IOProcessor()) std::cout << "Solving for phi at level 0 ... " << std::endl; - solve_for_accel(rhs,phi,grad_phi,geom,base_level,finest_level,offset); + solve_for_accel(BoxLib::GetArrOfPtrs(rhs), + BoxLib::GetArrOfPtrs(phi), + BoxLib::GetArrOfPtrs(grad_phi), + geom,base_level,finest_level,offset); if (ParallelDescriptor::IOProcessor()) std::cout << "Solved for phi at level 0 ... " << std::endl; // Fill the particle data with the acceleration at the particle location // Note that we are calling moveKick with accel_comp > BL_SPACEDIM // which means with dt = 0 we don't move the particle or set a velocity - MyPC->moveKick(grad_phi[0],nlevs-1,dummy_dt,1.0,1.0,accel_comp); + MyPC->moveKick(*grad_phi[0],nlevs-1,dummy_dt,1.0,1.0,accel_comp); // Write out the positions, masses and accelerations of each particle. MyPC->WriteAsciiFile("Particles_after_level0_solve"); @@ -251,7 +251,10 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v // Use multigrid to solve Lap(phi) = rhs with boundary conditions from level 0 if (ParallelDescriptor::IOProcessor()) std::cout << "Solving for phi at level 1 ... " << std::endl; - solve_for_accel(rhs,phi,grad_phi,geom,base_level,finest_level,offset); + solve_for_accel(BoxLib::GetArrOfPtrs(rhs), + BoxLib::GetArrOfPtrs(phi), + BoxLib::GetArrOfPtrs(grad_phi), + geom,base_level,finest_level,offset); if (ParallelDescriptor::IOProcessor()) std::cout << "Solved for phi at level 1 ... " << std::endl; @@ -259,7 +262,7 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v // Note that we are calling moveKick with accel_comp > BL_SPACEDIM // which means with dt = 0 we don't move the particle or set a velocity for (int lev = 0; lev < nlevs; lev++) - MyPC->moveKick(grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); + MyPC->moveKick(*grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); // Write out the positions, masses and accelerations of each particle. MyPC->WriteAsciiFile("Particles_after_level1_solve"); @@ -271,8 +274,8 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v // Reset everything to 0 for (int lev = 0; lev < nlevs; lev++) { - phi[lev].setVal(0.0); - grad_phi[lev].setVal(0.0); + phi[lev]->setVal(0.0); + grad_phi[lev]->setVal(0.0); } // Define this to be solve at multi-level solve @@ -288,7 +291,10 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v // Use multigrid to solve Lap(phi) = rhs with periodic boundary conditions (set above) if (ParallelDescriptor::IOProcessor()) std::cout << "Solving for phi at levels 0 and 1 ... " << std::endl; - solve_for_accel(rhs,phi,grad_phi,geom,base_level,finest_level,offset); + solve_for_accel(BoxLib::GetArrOfPtrs(rhs), + BoxLib::GetArrOfPtrs(phi), + BoxLib::GetArrOfPtrs(grad_phi), + geom,base_level,finest_level,offset); if (ParallelDescriptor::IOProcessor()) std::cout << "Solved for phi at levels 0 and 1 ... " << std::endl; @@ -296,12 +302,11 @@ two_level(int nlevs, int nx, int ny, int nz, int max_grid_size, int nppc, bool v // Note that we are calling moveKick with accel_comp > BL_SPACEDIM // which means with dt = 0 we don't move the particle or set a velocity for (int lev = 0; lev < nlevs; lev++) - MyPC->moveKick(grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); + MyPC->moveKick(*grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); // Write out the positions, masses and accelerations of each particle. MyPC->WriteAsciiFile("Particles_after_multilevel_solve"); } // end if (nlevs > 1) - delete MyPC; } diff --git a/Tutorials/README_C b/Tutorials/README_C index c65a2e0f5..02925017a 100644 --- a/Tutorials/README_C +++ b/Tutorials/README_C @@ -9,10 +9,10 @@ The following tutorials demonstrate how to use the C++ BoxLib: * `GettingStarted_C`: The BoxLib user's guide includes source code from this example. - This simply shows how to initialize BoxLib, create a domain decomposition, - build arrays of MultiFabs using the PArray class, - access data in a MultiFab, and fill interior/periodic boundaries. - This is then looped over using the MFIter and work is done on it in Fortran. + This simply shows how to initialize BoxLib, create a domain + decomposition, build arrays of MultiFabs, access data in a + MultiFab, and fill interior/periodic boundaries. This is then + looped over using the MFIter and work is done on it in Fortran. ! ************************************************************************************ HeatEquation_EX*_C: diff --git a/Tutorials/README_F b/Tutorials/README_F index 68926c37f..b70968c00 100644 --- a/Tutorials/README_F +++ b/Tutorials/README_F @@ -1,8 +1,3 @@ -! ************************************************************************************ -Chemotaxis_F -! ************************************************************************************ -This evolves the chemotaxis model as described in Tutorials/Chemotaxis_F/README -on a single level with multiple boxes using SDC time-stepping. ! ************************************************************************************ Exp_CNS_NoSpec_F diff --git a/Tutorials/Sidecar_EX1/DestMFTest.cpp b/Tutorials/Sidecar_EX1/DestMFTest.cpp index 31d1386da..1bc274f33 100644 --- a/Tutorials/Sidecar_EX1/DestMFTest.cpp +++ b/Tutorials/Sidecar_EX1/DestMFTest.cpp @@ -14,12 +14,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include int nComp(6), nGhost(2); diff --git a/Tutorials/Sidecar_EX1/GNUmakefile b/Tutorials/Sidecar_EX1/GNUmakefile index 54241fe31..79fe213ec 100644 --- a/Tutorials/Sidecar_EX1/GNUmakefile +++ b/Tutorials/Sidecar_EX1/GNUmakefile @@ -21,13 +21,13 @@ DO_IN_TRANSIT_ANALYSIS = TRUE ANALYSIS_DIR = $(BOXLIB_HOME)/Tutorials/Sidecar_EX1 include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs +include $(BOXLIB_HOME)/Src/Boundary/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BoundaryLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_BaseLib -INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/C_AMRLib +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Boundary +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Base +INCLUDE_LOCATIONS += $(BOXLIB_HOME)/Src/Amr ifeq ($(DO_IN_TRANSIT_ANALYSIS), TRUE) DEFINES += -DIN_TRANSIT @@ -35,9 +35,9 @@ ifeq ($(DO_IN_TRANSIT_ANALYSIS), TRUE) vpathdir += $(ANALYSIS_DIR) endif -vpathdir += $(BOXLIB_HOME)/Src/C_BoundaryLib -vpathdir += $(BOXLIB_HOME)/Src/C_BaseLib -vpathdir += $(BOXLIB_HOME)/Src/C_AMRLib +vpathdir += $(BOXLIB_HOME)/Src/Boundary +vpathdir += $(BOXLIB_HOME)/Src/Base +vpathdir += $(BOXLIB_HOME)/Src/Amr vpath %.c : . $(vpathdir) vpath %.h : . $(vpathdir) @@ -49,4 +49,4 @@ vpath %.f90 : . $(vpathdir) all: $(executable) -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/Sidecar_EX1/GridMoveTest.cpp b/Tutorials/Sidecar_EX1/GridMoveTest.cpp index c5da21bbf..e13a39157 100644 --- a/Tutorials/Sidecar_EX1/GridMoveTest.cpp +++ b/Tutorials/Sidecar_EX1/GridMoveTest.cpp @@ -11,14 +11,14 @@ #include #include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include + +#include #include // In this anonymous namespace we define the workflow which occurs when the diff --git a/Tutorials/Sidecar_EX1/InTransitAnalysis.cpp b/Tutorials/Sidecar_EX1/InTransitAnalysis.cpp index 447e99434..b7b9042e5 100644 --- a/Tutorials/Sidecar_EX1/InTransitAnalysis.cpp +++ b/Tutorials/Sidecar_EX1/InTransitAnalysis.cpp @@ -1,8 +1,8 @@ #include -#include -#include -#include +#include +#include +#include #include diff --git a/Tutorials/Sidecar_EX1/NSidecarsTest.cpp b/Tutorials/Sidecar_EX1/NSidecarsTest.cpp index a34ffbc7c..4644f8917 100644 --- a/Tutorials/Sidecar_EX1/NSidecarsTest.cpp +++ b/Tutorials/Sidecar_EX1/NSidecarsTest.cpp @@ -13,12 +13,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include int nComp(6), nGhost(2); diff --git a/Tutorials/Sidecar_EX1/SidecarResizeTest.cpp b/Tutorials/Sidecar_EX1/SidecarResizeTest.cpp index 198a7fa65..1fead6642 100644 --- a/Tutorials/Sidecar_EX1/SidecarResizeTest.cpp +++ b/Tutorials/Sidecar_EX1/SidecarResizeTest.cpp @@ -13,10 +13,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include namespace { diff --git a/Tutorials/Sidecar_EX1/TestRankSets.cpp b/Tutorials/Sidecar_EX1/TestRankSets.cpp index 1bbd9ed71..45937a028 100644 --- a/Tutorials/Sidecar_EX1/TestRankSets.cpp +++ b/Tutorials/Sidecar_EX1/TestRankSets.cpp @@ -4,9 +4,9 @@ // An example to test resizing with a disallowed rank set. // This test is supposed to fail. // -------------------------------------------------------------------------- -#include -#include -#include +#include +#include +#include // -------------------------------------------------------------------------- diff --git a/Tutorials/Tiling_C/GNUmakefile b/Tutorials/Tiling_C/GNUmakefile index 91db7c5f9..1e17652f4 100644 --- a/Tutorials/Tiling_C/GNUmakefile +++ b/Tutorials/Tiling_C/GNUmakefile @@ -14,7 +14,7 @@ EBASE = main include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/Tiling_C/main.cpp b/Tutorials/Tiling_C/main.cpp index 6cb4900df..47510630b 100644 --- a/Tutorials/Tiling_C/main.cpp +++ b/Tutorials/Tiling_C/main.cpp @@ -1,8 +1,8 @@ #include -#include -#include -#include +#include +#include +#include // declare a fortran subroutine extern "C" diff --git a/Tutorials/Tiling_Heat_C/GNUmakefile b/Tutorials/Tiling_Heat_C/GNUmakefile index f1c9399f9..15f62c62a 100644 --- a/Tutorials/Tiling_Heat_C/GNUmakefile +++ b/Tutorials/Tiling_Heat_C/GNUmakefile @@ -6,13 +6,13 @@ DEBUG = FALSE USE_MPI = FALSE USE_OMP = TRUE PROFILE = FALSE -COMP = Intel +COMP = gnu DIM = 3 PRECISION = DOUBLE EBASE = Heat include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/Tiling_Heat_C/main.cpp b/Tutorials/Tiling_Heat_C/main.cpp index ffd99a387..bd44cf18c 100644 --- a/Tutorials/Tiling_Heat_C/main.cpp +++ b/Tutorials/Tiling_Heat_C/main.cpp @@ -1,11 +1,11 @@ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include @@ -156,11 +156,11 @@ main (int argc, char* argv[]) pp.query("ncomp", Ncomp); // Allocate space for the old_phi and new_phi -- we define old_phi and new_phi as - PArray < MultiFab > phis(2, PArrayManage); - phis.set(0, new MultiFab(bs, Ncomp, Nghost)); - phis.set(1, new MultiFab(bs, Ncomp, Nghost)); - MultiFab* old_phi = &phis[0]; - MultiFab* new_phi = &phis[1]; + Array < std::unique_ptr > phis(2); + phis[0].reset(new MultiFab(bs, Ncomp, Nghost)); + phis[1].reset(new MultiFab(bs, Ncomp, Nghost)); + MultiFab* old_phi = phis[0].get(); + MultiFab* new_phi = phis[1].get(); // Initialize both to zero (just because) old_phi->setVal(0.0); diff --git a/Tutorials/Tiling_Heat_C/writePlotFile.H b/Tutorials/Tiling_Heat_C/writePlotFile.H index 2387bb50e..c82b21394 100644 --- a/Tutorials/Tiling_Heat_C/writePlotFile.H +++ b/Tutorials/Tiling_Heat_C/writePlotFile.H @@ -2,10 +2,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include void writePlotFile (const std::string& dir, diff --git a/Tutorials/Tiling_Heat_C/writePlotFile.cpp b/Tutorials/Tiling_Heat_C/writePlotFile.cpp index 68a6e2602..ed37f22d7 100644 --- a/Tutorials/Tiling_Heat_C/writePlotFile.cpp +++ b/Tutorials/Tiling_Heat_C/writePlotFile.cpp @@ -2,12 +2,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include void diff --git a/Tutorials/TwoGrid_PIC_C/GNUmakefile b/Tutorials/TwoGrid_PIC_C/GNUmakefile index da9b5357f..1001b4979 100644 --- a/Tutorials/TwoGrid_PIC_C/GNUmakefile +++ b/Tutorials/TwoGrid_PIC_C/GNUmakefile @@ -14,15 +14,15 @@ USE_MPI = TRUE USE_OMP = FALSE -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs include ./Make.package -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package -include $(BOXLIB_HOME)/Src/C_ParticleLib/Make.package -include $(BOXLIB_HOME)/Src/C_BoundaryLib/Make.package +include $(BOXLIB_HOME)/Src/Base/Make.package +include $(BOXLIB_HOME)/Src/Particle/Make.package +include $(BOXLIB_HOME)/Src/Boundary/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_to_F_MG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/C_CellMG/Make.package include $(BOXLIB_HOME)/Src/LinearSolvers/F_MG/FParallelMG.mak include $(BOXLIB_HOME)/Src/F_BaseLib/FParallelMG.mak -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/TwoGrid_PIC_C/main.cpp b/Tutorials/TwoGrid_PIC_C/main.cpp index 18fad9b13..2cc57c752 100644 --- a/Tutorials/TwoGrid_PIC_C/main.cpp +++ b/Tutorials/TwoGrid_PIC_C/main.cpp @@ -1,19 +1,21 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include -#include "Particles.H" +#include "AMReX_Particles.H" // declare routines below -void solve_for_accel(PArray& rhs, PArray& phi, PArray& grad_phi, +void solve_for_accel(const Array& rhs, + const Array& phi, + const Array& grad_phi, const Array& geom, int base_level, int finest_level, Real offset); Real getEfficiency (const DistributionMapping& dm, const Array& cost); @@ -127,27 +129,23 @@ int main(int argc, char* argv[]) // ******************************************************************************************** // build a multifab for the rhs on the box array with - PArray rhs; - PArray phi; - PArray grad_phi; + Array > rhs(nlevs); + Array > phi(nlevs); + Array > grad_phi(nlevs); Array dmap(nlevs); - rhs.resize(nlevs,PArrayManage); - phi.resize(nlevs,PArrayManage); - grad_phi.resize(nlevs,PArrayManage); - for (int lev = 0; lev < nlevs; lev++) { - // # component # ghost cells - rhs.set (lev,new MultiFab(ba[lev],1 ,0)); - phi.set (lev,new MultiFab(ba[lev],1 ,1)); - grad_phi.set(lev,new MultiFab(ba[lev],BL_SPACEDIM,1)); + // # component # ghost cells + rhs [lev].reset(new MultiFab(ba[lev],1 ,0)); + phi [lev].reset(new MultiFab(ba[lev],1 ,1)); + grad_phi[lev].reset(new MultiFab(ba[lev],BL_SPACEDIM,1)); - rhs[lev].setVal(0.0); - phi[lev].setVal(0.0); - grad_phi[lev].setVal(0.0); + rhs[lev]->setVal(0.0); + phi[lev]->setVal(0.0); + grad_phi[lev]->setVal(0.0); - dmap[lev] = rhs[lev].DistributionMap(); + dmap[lev] = rhs[lev]->DistributionMap(); } // Define a new particle container to hold my particles. @@ -155,7 +153,7 @@ int main(int argc, char* argv[]) typedef ParticleContainer<1+2*BL_SPACEDIM> MyParticleContainer; // Build a new particle container to hold my particles. - MyParticleContainer* MyPC = new MyParticleContainer(geom,dmap,ba,rr); + auto MyPC = std::unique_ptr(new MyParticleContainer(geom,dmap,ba,rr)); MyPC->SetVerbose(0); // This allows us to write the gravitational acceleration into these components @@ -286,19 +284,18 @@ int main(int argc, char* argv[]) int base_level = 0; int finest_level = nlevs-1; - PArray PartMF; - PartMF.resize(nlevs,PArrayManage); - PartMF.set(0,new MultiFab(ba[0],1,1)); - PartMF[0].setVal(0.0); + Array > PartMF(nlevs); + PartMF[0].reset(new MultiFab(ba[0],1,1)); + PartMF[0]->setVal(0.0); // MyPC->AssignDensity(0, PartMF, false, base_level, 1, finest_level); - MyPC->AssignDensitySingleLevel(0, PartMF[0], 0, 1, 0); + MyPC->AssignDensitySingleLevel(0, *PartMF[0], 0, 1, 0); for (int lev = finest_level - 1 - base_level; lev >= 0; lev--) - BoxLib::average_down(PartMF[lev+1],PartMF[lev],0,1,rr[lev]); + BoxLib::average_down(*PartMF[lev+1],*PartMF[lev],0,1,rr[lev]); for (int lev = 0; lev < nlevs; lev++) - MultiFab::Add(rhs[base_level+lev], PartMF[lev], 0, 0, 1, 0); + MultiFab::Add(*rhs[base_level+lev], *PartMF[lev], 0, 0, 1, 0); // ************************************************************************** // Define this to be solve at level 0 only @@ -310,12 +307,15 @@ int main(int argc, char* argv[]) // Use multigrid to solve Lap(phi) = rhs with periodic boundary conditions (set above) if (ParallelDescriptor::IOProcessor()) std::cout << "Solving for phi at level 0 ... " << std::endl; - solve_for_accel(rhs,phi,grad_phi,geom,base_level,finest_level,offset); + solve_for_accel(BoxLib::GetArrOfPtrs(rhs), + BoxLib::GetArrOfPtrs(phi), + BoxLib::GetArrOfPtrs(grad_phi), + geom,base_level,finest_level,offset); // Fill the particle data with the acceleration at the particle location // Note that we are calling moveKick with accel_comp > BL_SPACEDIM // which means with dt = 0 we don't move the particle or set a velocity - MyPC->moveKick(grad_phi[0],nlevs-1,dummy_dt,1.0,1.0,accel_comp); + MyPC->moveKick(*grad_phi[0],nlevs-1,dummy_dt,1.0,1.0,accel_comp); // Write out the positions, masses and accelerations of each particle. MyPC->WriteAsciiFile("Particles_after_level0_solve"); @@ -333,7 +333,10 @@ int main(int argc, char* argv[]) // Use multigrid to solve Lap(phi) = rhs with boundary conditions from level 0 if (ParallelDescriptor::IOProcessor()) std::cout << "Solving for phi at level 1 ... " << std::endl; - solve_for_accel(rhs,phi,grad_phi,geom,base_level,finest_level,offset); + solve_for_accel(BoxLib::GetArrOfPtrs(rhs), + BoxLib::GetArrOfPtrs(phi), + BoxLib::GetArrOfPtrs(grad_phi), + geom,base_level,finest_level,offset); if (ParallelDescriptor::IOProcessor()) std::cout << "Solved for phi at level 1 ... " << std::endl; @@ -341,7 +344,7 @@ int main(int argc, char* argv[]) // Note that we are calling moveKick with accel_comp > BL_SPACEDIM // which means with dt = 0 we don't move the particle or set a velocity for (int lev = 0; lev < nlevs; lev++) - MyPC->moveKick(grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); + MyPC->moveKick(*grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); // Write out the positions, masses and accelerations of each particle. MyPC->WriteAsciiFile("Particles_after_level1_solve"); @@ -353,8 +356,8 @@ int main(int argc, char* argv[]) // Reset everything to 0 for (int lev = 0; lev < nlevs; lev++) { - phi[lev].setVal(0.0); - grad_phi[lev].setVal(0.0); + phi[lev]->setVal(0.0); + grad_phi[lev]->setVal(0.0); } // Define this to be solve at multi-level solve @@ -368,21 +371,22 @@ int main(int argc, char* argv[]) MyPC->AssignDensity(0, false, rhs, base_level,1,finest_level); // Use multigrid to solve Lap(phi) = rhs with periodic boundary conditions (set above) - solve_for_accel(rhs,phi,grad_phi,geom,base_level,finest_level,offset); + solve_for_accel(BoxLib::GetArrOfPtrs(rhs), + BoxLib::GetArrOfPtrs(phi), + BoxLib::GetArrOfPtrs(grad_phi), + geom,base_level,finest_level,offset); // Fill the particle data with the acceleration at the particle location // Note that we are calling moveKick with accel_comp > BL_SPACEDIM // which means with dt = 0 we don't move the particle or set a velocity for (int lev = 0; lev < nlevs; lev++) - MyPC->moveKick(grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); + MyPC->moveKick(*grad_phi[lev],lev,dummy_dt,1.0,1.0,accel_comp); // Write out the positions, masses and accelerations of each particle. MyPC->WriteAsciiFile("Particles_after_multilevel_solve"); } // end if (nlevs > 1) - delete MyPC; - BoxLib::Finalize(); } diff --git a/Tutorials/TwoGrid_PIC_C/solve_for_accel.cpp b/Tutorials/TwoGrid_PIC_C/solve_for_accel.cpp index 0801055dc..2375b8d47 100644 --- a/Tutorials/TwoGrid_PIC_C/solve_for_accel.cpp +++ b/Tutorials/TwoGrid_PIC_C/solve_for_accel.cpp @@ -1,50 +1,53 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include -void solve_with_f90 (PArray& rhs, PArray& phi, Array< PArray >& grad_phi_edge, +void solve_with_f90 (const Array& rhs, + const Array& phi, + const Array< Array >& grad_phi_edge, const Array& geom, int base_level, int finest_level, Real tol, Real abs_tol); void -solve_for_accel(PArray& rhs, PArray& phi, PArray& grad_phi, +solve_for_accel(const Array& rhs, + const Array& phi, + const Array& grad_phi, const Array& geom, int base_level, int finest_level, Real offset) { Real tol = 1.e-10; Real abs_tol = 1.e-14; - Array< PArray > grad_phi_edge; - grad_phi_edge.resize(rhs.size()); + Array< Array > > grad_phi_edge(rhs.size()); for (int lev = base_level; lev <= finest_level ; lev++) { - grad_phi_edge[lev].resize(BL_SPACEDIM, PArrayManage); + grad_phi_edge[lev].resize(BL_SPACEDIM); for (int n = 0; n < BL_SPACEDIM; ++n) - grad_phi_edge[lev].set(n, new MultiFab(BoxArray(rhs[lev].boxArray()).surroundingNodes(n), 1, 1)); + grad_phi_edge[lev][n].reset(new MultiFab(BoxArray(rhs[lev]->boxArray()).surroundingNodes(n), 1, 1)); } // *************************************************** // Make sure the RHS sums to 0 if fully periodic // *************************************************** for (int lev = base_level; lev <= finest_level; lev++) { - Real n0 = rhs[lev].norm0(); + Real n0 = rhs[lev]->norm0(); if (ParallelDescriptor::IOProcessor()) std::cout << "Max of rhs in solve_for_phi before correction at level " << lev << " " << n0 << std::endl; } for (int lev = base_level; lev <= finest_level; lev++) - rhs[lev].plus(-offset, 0, 1, 0); + rhs[lev]->plus(-offset, 0, 1, 0); for (int lev = base_level; lev <= finest_level; lev++) { - Real n0 = rhs[lev].norm0(); + Real n0 = rhs[lev]->norm0(); if (ParallelDescriptor::IOProcessor()) std::cout << "Max of rhs in solve_for_phi after correction at level " << lev << " " << n0 << std::endl; @@ -54,13 +57,16 @@ solve_for_accel(PArray& rhs, PArray& phi, PArray& // Solve for phi and return both phi and grad_phi_edge // *************************************************** - solve_with_f90 (rhs,phi,grad_phi_edge,geom,base_level,finest_level,tol,abs_tol); + solve_with_f90(rhs,phi,BoxLib::GetArrOfArrOfPtrs(grad_phi_edge), + geom,base_level,finest_level,tol,abs_tol); // Average edge-centered gradients to cell centers and fill the values in ghost cells. for (int lev = base_level; lev <= finest_level; lev++) { - BoxLib::average_face_to_cellcenter(grad_phi[lev], grad_phi_edge[lev], geom[lev]); - grad_phi[lev].FillBoundary(0,BL_SPACEDIM,geom[lev].periodicity()); + BoxLib::average_face_to_cellcenter(*grad_phi[lev], + BoxLib::GetArrOfConstPtrs(grad_phi_edge[lev]), + geom[lev]); + grad_phi[lev]->FillBoundary(0,BL_SPACEDIM,geom[lev].periodicity()); } // VisMF::Write(grad_phi[0],"GradPhi"); diff --git a/Tutorials/TwoGrid_PIC_C/solve_with_f90.cpp b/Tutorials/TwoGrid_PIC_C/solve_with_f90.cpp index 3d2134d0f..ab33be03d 100644 --- a/Tutorials/TwoGrid_PIC_C/solve_with_f90.cpp +++ b/Tutorials/TwoGrid_PIC_C/solve_with_f90.cpp @@ -1,14 +1,15 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include void -solve_with_f90(PArray& rhs, PArray& phi, - Array< PArray >& grad_phi_edge, +solve_with_f90(const Array& rhs, + const Array& phi, + const Array< Array >& grad_phi_edge, const Array& geom, int base_level, int finest_level, Real tol, Real abs_tol) { int nlevs = finest_level - base_level + 1; @@ -28,13 +29,13 @@ solve_with_f90(PArray& rhs, PArray& phi, } // Have to do some packing because these arrays does not always start with base_level - PArray geom_p(nlevs); - PArray rhs_p(nlevs); - PArray phi_p(nlevs); + Array geom_p(nlevs); + Array rhs_p(nlevs); + Array phi_p(nlevs); for (int ilev = 0; ilev < nlevs; ++ilev) { - geom_p.set(ilev, &geom[ilev+base_level]); - rhs_p.set (ilev, &rhs[ilev+base_level]); - phi_p.set (ilev, &phi[ilev+base_level]); + geom_p[ilev] = geom[ilev+base_level]; + rhs_p [ilev] = rhs[ilev+base_level]; + phi_p [ilev] = phi[ilev+base_level]; } // Refinement ratio is hardwired to 2 here. @@ -44,9 +45,9 @@ solve_with_f90(PArray& rhs, PArray& phi, FMultiGrid fmg(geom_p, base_level, crse_ratio); if (base_level == 0) { - fmg.set_bc(mg_bc, phi[base_level]); + fmg.set_bc(mg_bc, *phi[base_level]); } else { - fmg.set_bc(mg_bc, phi[base_level-1], phi[base_level]); + fmg.set_bc(mg_bc, *phi[base_level-1], *phi[base_level]); } fmg.set_const_gravity_coeffs(); diff --git a/Tutorials/TwoGrid_PIC_C/split_boxes.cpp b/Tutorials/TwoGrid_PIC_C/split_boxes.cpp index 7a4f1a48a..ff8279965 100644 --- a/Tutorials/TwoGrid_PIC_C/split_boxes.cpp +++ b/Tutorials/TwoGrid_PIC_C/split_boxes.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include void splitBoxes (BoxArray& ba, Array& newcost, const Array& cost_in, int heavy_grid_size) diff --git a/Tutorials/WaveEquation_C/GNUmakefile b/Tutorials/WaveEquation_C/GNUmakefile index 9a140e391..ac09899a5 100644 --- a/Tutorials/WaveEquation_C/GNUmakefile +++ b/Tutorials/WaveEquation_C/GNUmakefile @@ -12,7 +12,7 @@ PRECISION = DOUBLE EBASE = main include ./Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.defs -include $(BOXLIB_HOME)/Src/C_BaseLib/Make.package +include $(BOXLIB_HOME)/Tools/GNUMake/Make.defs +include $(BOXLIB_HOME)/Src/Base/Make.package -include $(BOXLIB_HOME)/Tools/C_mk/Make.rules +include $(BOXLIB_HOME)/Tools/GNUMake/Make.rules diff --git a/Tutorials/WaveEquation_C/main.cpp b/Tutorials/WaveEquation_C/main.cpp index 8e916d485..b9862d3cc 100644 --- a/Tutorials/WaveEquation_C/main.cpp +++ b/Tutorials/WaveEquation_C/main.cpp @@ -1,15 +1,15 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include extern "C" { diff --git a/Tutorials/WaveEquation_C/writePlotFile.H b/Tutorials/WaveEquation_C/writePlotFile.H index 2387bb50e..c82b21394 100644 --- a/Tutorials/WaveEquation_C/writePlotFile.H +++ b/Tutorials/WaveEquation_C/writePlotFile.H @@ -2,10 +2,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include void writePlotFile (const std::string& dir, diff --git a/Tutorials/WaveEquation_C/writePlotFile.cpp b/Tutorials/WaveEquation_C/writePlotFile.cpp index ecbbbed94..9cf72f745 100644 --- a/Tutorials/WaveEquation_C/writePlotFile.cpp +++ b/Tutorials/WaveEquation_C/writePlotFile.cpp @@ -2,12 +2,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include void