10 #define CPULSSOLVER_H_ 13 #define _USE_MATH_DEFINES 22 #define _scalar_flux_xyz(r,e,x) (_scalar_flux_xyz[(r)*_num_groups*3 + (x)*_num_groups + (e)]) 26 #define _reduced_sources_xyz(r,e,x) (_reduced_sources_xyz[(r)*_num_groups*3 + (x)*_num_groups + (e)]) 30 #define _stabilizing_flux_xyz(r,e,x) (_stabilizing_flux_xyz[(r)*_num_groups*3 + (e)*3 + (x)]) 33 #define _fixed_sources_xyz(r,e,i) (_fixed_sources_xyz[(r)*_num_groups + (e)][i]) 88 double source_y,
double source_z);
90 double source_y,
double source_z);
98 FP_PRECISION* fsr_flux,
99 FP_PRECISION* fsr_flux_x,
100 FP_PRECISION* fsr_flux_y,
101 FP_PRECISION* fsr_flux_z,
103 FP_PRECISION direction[3]);
105 FP_PRECISION* fsr_flux);
This a subclass of the Solver class for multi-core CPUs using OpenMP multi-threading.
Definition: CPUSolver.h:54
FP_PRECISION getFluxByCoords(LocalCoords *coords, int group)
Get the flux at a specific point in the geometry.
Definition: CPULSSolver.cpp:1035
void checkLimitXS(int iteration)
Checks to see if limited XS should be reset.
Definition: CPULSSolver.cpp:1015
Represents a Cell inside of a Universe.
Definition: Cell.h:56
The LocalCoords represents a set of local coordinates on some level of nested Universes making up the...
Definition: LocalCoords.h:46
void tallyLSScalarFlux(segment *curr_segment, int azim_index, int polar_index, FP_PRECISION *fsr_flux, FP_PRECISION *fsr_flux_x, FP_PRECISION *fsr_flux_y, FP_PRECISION *fsr_flux_z, float *track_flux, FP_PRECISION direction[3])
Computes the contribution to the LSR scalar flux from a Track segment.
Definition: CPULSSolver.cpp:505
void setFixedSourceMomentByFSR(long fsr_id, int group, double source_x, double source_y, double source_z)
Assign fixed source moments for a FSR and energy group.
Definition: CPULSSolver.cpp:276
void stabilizeFlux()
Adjusts the scalar flux for transport stabilization.
Definition: CPULSSolver.cpp:925
void computeStabilizingFlux()
Computes the stabilizing flux for transport stabilization.
Definition: CPULSSolver.cpp:841
double normalizeFluxes()
Normalizes all FSR scalar fluxes and Track boundary angular fluxes to the total fission source (times...
Definition: CPULSSolver.cpp:325
void initializeCmfd()
Initializes a Cmfd object for acceleration prior to source iteration.
Definition: CPULSSolver.cpp:1089
void addSourceToScalarFlux()
Add the source term contribution in the transport equation to the FSR scalar flux.
Definition: CPULSSolver.cpp:744
The TrackGenerator is dedicated to generating and storing Tracks which cyclically wrap across the Geo...
Definition: TrackGenerator.h:36
CPULSSolver(TrackGenerator *track_generator=NULL)
Constructor initializes array pointers for fluxes and sources.
Definition: CPULSSolver.cpp:11
This a subclass of the CPUSolver class for using the linear source approximation. ...
Definition: CPULSSolver.h:40
void flattenFSRFluxes(FP_PRECISION value)
Set the scalar flux constants for each FSR and energy group to some value and the scalar flux moments...
Definition: CPULSSolver.cpp:306
void initializeFSRs()
Initializes the FSR constant linear source component, volumes and Materials array.
Definition: CPULSSolver.cpp:136
void initializeFixedSources()
Initializes the arrays for the fixed source and its moments.
Definition: CPULSSolver.cpp:154
void computeFSRSources(int iteration)
Computes the total source (fission, scattering, fixed) in each FSR.
Definition: CPULSSolver.cpp:349
FP_PRECISION * _FSR_source_constants
Definition: CPULSSolver.h:48
bool _stabilize_moments
Definition: CPULSSolver.h:69
A segment represents a line segment within a single flat source region along a track.
Definition: Track.h:27
double * _FSR_lin_exp_matrix
Definition: CPULSSolver.h:45
FP_PRECISION * getSourceConstantsBuffer()
Returns a memory buffer to the constant part (constant between MOC iterations) of the linear source...
Definition: CPULSSolver.cpp:1163
void accumulateLinearFluxContribution(long fsr_id, FP_PRECISION weight, FP_PRECISION *fsr_flux)
Move from buffers to global arrays the contributions of one (or several for per-stack solving) segmen...
Definition: CPULSSolver.cpp:710
virtual ~CPULSSolver()
Destructor deletes array for linear fluxes, sources and constants. CPUSolver parent class destructor ...
Definition: CPULSSolver.cpp:30
#define track_flux(p, e)
Definition: Cmfd.h:45
void initializeExpEvaluators()
Initializes new ExpEvaluator objects to compute exponentials.
Definition: CPULSSolver.cpp:1100
void setFixedSourceMomentsByCell(Cell *cell, int group, double source_x, double source_y, double source_z)
Assign fixed source moments for a Cell and energy group.
Definition: CPULSSolver.cpp:239
void initializeLinearSourceConstants()
Initialize linear source constant component and matrix coefficients.
Definition: CPULSSolver.cpp:1111
bool _fixed_source_moments_on
Definition: CPULSSolver.h:72
void initializeFluxArrays()
Allocates memory for boundary and scalar fluxes.
Definition: CPULSSolver.cpp:55
FP_PRECISION * _scalar_flux_xyz
Definition: CPULSSolver.h:51
std::map< std::pair< int, int >, std::vector< double > > _fix_src_xyz_FSR_map
Definition: CPULSSolver.h:63
FP_PRECISION * _reduced_sources_xyz
Definition: CPULSSolver.h:54
void initializeSourceArrays()
Allocates memory for FSR source arrays.
Definition: CPULSSolver.cpp:96
FP_PRECISION * _stabilizing_flux_xyz
Definition: CPULSSolver.h:57
std::map< std::pair< Cell *, int >, std::vector< double > > _fix_src_xyz_cell_map
Definition: CPULSSolver.h:66
std::vector< std::vector< double > > _fixed_sources_xyz
Definition: CPULSSolver.h:60
double * getLinearExpansionCoeffsBuffer()
Returns a memory buffer to the linear source expansion coefficent matrix.
Definition: CPULSSolver.cpp:1152