aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/MultiParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2020-11-22 15:14:17 -0800
committerGravatar GitHub <noreply@github.com> 2020-11-22 15:14:17 -0800
commit95251950c86378675dbca15e64bdc98949b603cc (patch)
tree0d0f034b714eae66b569dcd30346afe0d5793cec /Source/Particles/MultiParticleContainer.cpp
parent72cebe5af26b6f13034e258bec1f67c3b5c9c680 (diff)
downloadWarpX-95251950c86378675dbca15e64bdc98949b603cc.tar.gz
WarpX-95251950c86378675dbca15e64bdc98949b603cc.tar.zst
WarpX-95251950c86378675dbca15e64bdc98949b603cc.zip
CI: Windows (#1521)
* CI: Windows Add an MSVC build to CI. * Windows: _USE_MATH_DEFINES Fix: ``` error C2065: 'M_PI': undeclared identifier ``` * Windows: no unistd.h fix: ``` fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory ``` * Injector: Trivially Copyable only GPU Only strictly required when we memcopy to accelerator devices. * Flex: never-interactive We don't use the interactive mode, so we can save some performance and address: ``` Parser\wp_parser.lex.cpp(1503,40): error C3861: 'isatty': identifier not found ``` Alternatively, we can include `<io.h>` on Windows. * MSVC: Vector<Long> != Vector<long> Fix return and assignment issues with `amrex::Long` != `long` in `amrex::Vector`. ``` Particles\MultiParticleContainer.cpp(438,13): error C2440: 'return': cannot convert from 'const amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>' Particles\MultiParticleContainer.cpp(452,94): error C2440: 'initializing': cannot convert from 'amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>' Particles\MultiParticleContainer.cpp(459,60): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types Particles\WarpXParticleContainer.cpp(782,51): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types ``` * Windows CI: Parallel Build
Diffstat (limited to 'Source/Particles/MultiParticleContainer.cpp')
-rw-r--r--Source/Particles/MultiParticleContainer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index cc274655d..2b1f310b0 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -429,7 +429,7 @@ MultiParticleContainer::ApplyBoundaryConditions ()
}
}
-Vector<long>
+Vector<Long>
MultiParticleContainer::GetZeroParticlesInGrid (const int lev) const
{
WarpX& warpx = WarpX::GetInstance();
@@ -438,18 +438,18 @@ MultiParticleContainer::GetZeroParticlesInGrid (const int lev) const
return r;
}
-Vector<long>
+Vector<Long>
MultiParticleContainer::NumberOfParticlesInGrid (int lev) const
{
if (allcontainers.size() == 0)
{
- const Vector<long> r = GetZeroParticlesInGrid(lev);
+ const Vector<Long> r = GetZeroParticlesInGrid(lev);
return r;
}
else
{
const bool only_valid=true, only_local=true;
- Vector<long> r = allcontainers[0]->NumberOfParticlesInGrid(lev,only_valid,only_local);
+ Vector<Long> r = allcontainers[0]->NumberOfParticlesInGrid(lev,only_valid,only_local);
for (unsigned i = 1, n = allcontainers.size(); i < n; ++i) {
const auto& ri = allcontainers[i]->NumberOfParticlesInGrid(lev,only_valid,only_local);
for (unsigned j=0, m=ri.size(); j<m; ++j) {