mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Various fixes for Intel compiler (still fails at link time)
This commit is contained in:
parent
9a772539bf
commit
a91fa8bc70
4 changed files with 31 additions and 29 deletions
|
|
@ -12,19 +12,6 @@
|
|||
|
||||
namespace openmc {
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int32_t n_filters;
|
||||
|
||||
class FilterMatch;
|
||||
extern std::vector<FilterMatch> filter_matches;
|
||||
#pragma omp threadprivate(filter_matches)
|
||||
|
||||
class Filter;
|
||||
extern std::vector<Filter*> tally_filters;
|
||||
|
||||
//==============================================================================
|
||||
//! Stores bins and weights for filtered tally events.
|
||||
//==============================================================================
|
||||
|
|
@ -36,6 +23,10 @@ public:
|
|||
std::vector<double> weights_;
|
||||
};
|
||||
|
||||
// Without an explicit instantiation of vector<FilterMatch>, the Intel compiler
|
||||
// will complain about the threadprivate directive on filter_matches
|
||||
template class std::vector<FilterMatch>;
|
||||
|
||||
//==============================================================================
|
||||
//! Modifies tally score events.
|
||||
//==============================================================================
|
||||
|
|
@ -76,6 +67,17 @@ public:
|
|||
int n_bins_;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Global variables
|
||||
//==============================================================================
|
||||
|
||||
extern "C" int32_t n_filters;
|
||||
|
||||
extern std::vector<FilterMatch> filter_matches;
|
||||
#pragma omp threadprivate(filter_matches)
|
||||
|
||||
extern std::vector<Filter*> tally_filters;
|
||||
|
||||
//==============================================================================
|
||||
|
||||
extern "C" void free_memory_tally_c();
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ void RegularMesh::bins_crossed(const Particle* p, std::vector<int>& bins,
|
|||
// The track exits this cell. Determine the distance to the closest mesh
|
||||
// surface.
|
||||
xt::xtensor<double, 1> d = xt::zeros<double>({n});
|
||||
for (int j = 0; j < n; ++j) {
|
||||
for (j = 0; j < n; ++j) {
|
||||
if (std::fabs(u[j]) < FP_PRECISION) {
|
||||
d(j) = INFTY;
|
||||
} else if (u[j] > 0) {
|
||||
|
|
|
|||
|
|
@ -140,21 +140,21 @@ module mesh_header
|
|||
|
||||
pure function mesh_get_bin(ptr, xyz) result(bin) bind(C)
|
||||
import C_PTR, C_DOUBLE, C_INT
|
||||
type(C_PTR), value :: ptr
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
real(C_DOUBLE), intent(in) :: xyz(*)
|
||||
integer(C_INT) :: bin
|
||||
end function
|
||||
|
||||
pure function mesh_get_bin_from_indices(ptr, ijk) result(bin) bind(C)
|
||||
import C_PTR, C_INT
|
||||
type(C_PTR), value :: ptr
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
integer(C_INT), intent(in) :: ijk(*)
|
||||
integer(C_INT) :: bin
|
||||
end function
|
||||
|
||||
pure subroutine mesh_get_indices(ptr, xyz, ijk, in_mesh) bind(C)
|
||||
import C_PTR, C_DOUBLE, C_INT, C_BOOL
|
||||
type(C_PTR), value :: ptr
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
real(C_DOUBLE), intent(in) :: xyz(*)
|
||||
integer(C_INT), intent(out) :: ijk(*)
|
||||
logical(C_BOOL), intent(out) :: in_mesh
|
||||
|
|
@ -162,8 +162,8 @@ module mesh_header
|
|||
|
||||
pure subroutine mesh_get_indices_from_bin(ptr, bin, ijk) bind(C)
|
||||
import C_PTR, C_INT
|
||||
type(C_PTR), value :: ptr
|
||||
integer(C_INT), value :: bin
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
integer(C_INT), intent(in), value :: bin
|
||||
integer(C_INT), intent(out) :: ijk(*)
|
||||
end subroutine
|
||||
|
||||
|
|
|
|||
|
|
@ -74,22 +74,22 @@ module reaction_header
|
|||
|
||||
pure function reaction_product_decay_rate(ptr, product) result(rate) bind(C)
|
||||
import C_PTR, C_INT, C_DOUBLE
|
||||
type(C_PTR), value :: ptr
|
||||
integer(C_INT), value :: product
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
integer(C_INT), intent(in), value :: product
|
||||
real(C_DOUBLE) :: rate
|
||||
end function
|
||||
|
||||
pure function reaction_product_emission_mode(ptr, product) result(m) bind(C)
|
||||
import C_PTR, C_INT
|
||||
type(C_PTR), value :: ptr
|
||||
integer(C_INT), value :: product
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
integer(C_INT), intent(in), value :: product
|
||||
integer(C_INT) :: m
|
||||
end function
|
||||
|
||||
pure function reaction_product_particle(ptr, product) result(particle) bind(C)
|
||||
import C_PTR, C_INT
|
||||
type(C_PTR), value :: ptr
|
||||
integer(C_INT), value :: product
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
integer(C_INT), intent(in), value :: product
|
||||
integer(C_INT) :: particle
|
||||
end function
|
||||
|
||||
|
|
@ -104,15 +104,15 @@ module reaction_header
|
|||
|
||||
pure function reaction_product_yield(ptr, product, E) result(val) bind(C)
|
||||
import C_PTR, C_INT, C_DOUBLE
|
||||
type(C_PTR), value :: ptr
|
||||
integer(C_INT), value :: product
|
||||
real(C_DOUBLE), value :: E
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
integer(C_INT), intent(in), value :: product
|
||||
real(C_DOUBLE), intent(in), value :: E
|
||||
real(C_DOUBLE) :: val
|
||||
end function
|
||||
|
||||
pure function reaction_products_size(ptr) result(sz) bind(C)
|
||||
import C_PTR, C_INT
|
||||
type(C_PTR), value :: ptr
|
||||
type(C_PTR), intent(in), value :: ptr
|
||||
integer(C_INT) :: sz
|
||||
end function
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue