mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Remove unnecessary wrapper code
This commit is contained in:
parent
bdac2854ce
commit
a65ea4cce8
2 changed files with 27 additions and 53 deletions
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef OPENMC_TALLIES_FILTER_ENERGY_H
|
||||
#define OPENMC_TALLIES_FILTER_ENERGY_H
|
||||
|
||||
//#include <cstdint>
|
||||
//#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "openmc/tallies/filter.h"
|
||||
|
|
|
|||
|
|
@ -22,14 +22,11 @@ module tally_filter_cpp
|
|||
contains
|
||||
procedure :: n_bins_cpp
|
||||
procedure :: from_xml_cpp_inner
|
||||
procedure :: get_all_bins_cpp_inner
|
||||
procedure :: to_statepoint_cpp_inner
|
||||
procedure :: text_label_cpp_inner
|
||||
procedure :: initialize_cpp_inner
|
||||
procedure :: from_xml => from_xml_cpp_default
|
||||
procedure :: get_all_bins => get_all_bins_cpp_default
|
||||
procedure :: to_statepoint => to_statepoint_cpp_default
|
||||
procedure :: text_label => text_label_cpp_default
|
||||
procedure :: get_all_bins => get_all_bins_cpp
|
||||
procedure :: to_statepoint => to_statepoint_cpp
|
||||
procedure :: text_label => text_label_cpp
|
||||
procedure :: initialize => initialize_cpp_default
|
||||
end type CppTallyFilter
|
||||
|
||||
|
|
@ -110,7 +107,25 @@ contains
|
|||
call filter_from_xml(this % ptr, node % ptr)
|
||||
end subroutine from_xml_cpp_inner
|
||||
|
||||
subroutine get_all_bins_cpp_inner(this, p, estimator, match)
|
||||
subroutine initialize_cpp_inner(this)
|
||||
class(CppTallyFilter), intent(inout) :: this
|
||||
interface
|
||||
subroutine filter_initialize(filt) bind(C)
|
||||
import C_PTR
|
||||
type(C_PTR), value :: filt
|
||||
end subroutine filter_initialize
|
||||
end interface
|
||||
call filter_initialize(this % ptr)
|
||||
end subroutine initialize_cpp_inner
|
||||
|
||||
subroutine from_xml_cpp_default(this, node)
|
||||
class(CppTallyFilter), intent(inout) :: this
|
||||
type(XMLNode), intent(in) :: node
|
||||
call this % from_xml_cpp_inner(node)
|
||||
this % n_bins = this % n_bins_cpp()
|
||||
end subroutine from_xml_cpp_default
|
||||
|
||||
subroutine get_all_bins_cpp(this, p, estimator, match)
|
||||
class(CppTallyFilter), intent(in) :: this
|
||||
type(Particle), intent(in) :: p
|
||||
integer, intent(in) :: estimator
|
||||
|
|
@ -125,9 +140,9 @@ contains
|
|||
end subroutine filter_get_all_bins
|
||||
end interface
|
||||
call filter_get_all_bins(this % ptr, p, estimator, match % ptr)
|
||||
end subroutine get_all_bins_cpp_inner
|
||||
end subroutine get_all_bins_cpp
|
||||
|
||||
subroutine to_statepoint_cpp_inner(this, filter_group)
|
||||
subroutine to_statepoint_cpp(this, filter_group)
|
||||
class(CppTallyFilter), intent(in) :: this
|
||||
integer(HID_T), intent(in) :: filter_group
|
||||
interface
|
||||
|
|
@ -138,9 +153,9 @@ contains
|
|||
end subroutine filter_to_statepoint
|
||||
end interface
|
||||
call filter_to_statepoint(this % ptr, filter_group)
|
||||
end subroutine to_statepoint_cpp_inner
|
||||
end subroutine to_statepoint_cpp
|
||||
|
||||
function text_label_cpp_inner(this, bin) result(label)
|
||||
function text_label_cpp(this, bin) result(label)
|
||||
class(CppTallyFilter), intent(in) :: this
|
||||
integer, intent(in) :: bin
|
||||
character(MAX_LINE_LEN) :: label
|
||||
|
|
@ -160,46 +175,7 @@ contains
|
|||
if (label_(i) == C_NULL_CHAR) exit
|
||||
label(i:i) = label_(i)
|
||||
end do
|
||||
end function text_label_cpp_inner
|
||||
|
||||
subroutine initialize_cpp_inner(this)
|
||||
class(CppTallyFilter), intent(inout) :: this
|
||||
interface
|
||||
subroutine filter_initialize(filt) bind(C)
|
||||
import C_PTR
|
||||
type(C_PTR), value :: filt
|
||||
end subroutine filter_initialize
|
||||
end interface
|
||||
call filter_initialize(this % ptr)
|
||||
end subroutine initialize_cpp_inner
|
||||
|
||||
subroutine from_xml_cpp_default(this, node)
|
||||
class(CppTallyFilter), intent(inout) :: this
|
||||
type(XMLNode), intent(in) :: node
|
||||
call this % from_xml_cpp_inner(node)
|
||||
this % n_bins = this % n_bins_cpp()
|
||||
end subroutine from_xml_cpp_default
|
||||
|
||||
subroutine get_all_bins_cpp_default(this, p, estimator, match)
|
||||
class(CppTallyFilter), intent(in) :: this
|
||||
type(Particle), intent(in) :: p
|
||||
integer, intent(in) :: estimator
|
||||
type(TallyFilterMatch), intent(inout) :: match
|
||||
call this % get_all_bins_cpp_inner(p, estimator, match)
|
||||
end subroutine get_all_bins_cpp_default
|
||||
|
||||
subroutine to_statepoint_cpp_default(this, filter_group)
|
||||
class(CppTallyFilter), intent(in) :: this
|
||||
integer(HID_T), intent(in) :: filter_group
|
||||
call this % to_statepoint_cpp_inner(filter_group)
|
||||
end subroutine to_statepoint_cpp_default
|
||||
|
||||
function text_label_cpp_default(this, bin) result(label)
|
||||
class(CppTallyFilter), intent(in) :: this
|
||||
integer, intent(in) :: bin
|
||||
character(MAX_LINE_LEN) :: label
|
||||
label = this % text_label_cpp_inner(bin)
|
||||
end function text_label_cpp_default
|
||||
end function text_label_cpp
|
||||
|
||||
subroutine initialize_cpp_default(this)
|
||||
class(CppTallyFilter), intent(inout) :: this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue