public ResultsContainer SolveWithoutGather(OmegaModel model, TensorCache tensors = null) { if (tensors == null) { SolvePrivate(model, null, tensors); } else { SolvePrivate(model, tensors.gtAtoA, tensors); } return(GatherSolutionLocally()); }
private void SolvePrivate(OmegaModel model, GreenTensor aToA, TensorCache tensors = null) { Logger.WriteStatus("Starting Cartesian MT Forward solver..."); using (Profiler?.StartAuto(ProfilerEvent.ForwardSolving)) { SetModel(model, tensors); if (aToA == null) { CalculateGreenTensor(); } else { SetNewGreenTensor(aToA); } SolverPolarizationX(); SolverPolarizationY(); } }
protected void SetModel(OmegaModel model, TensorCache tensors = null) { if (IsParallel) { Mpi.CheckNumberOfProcesses(model.LateralDimensions); } Model = model; if (_aToOCalculator == null) { _aToOCalculator = new AtoOCalculator(this); } if (_fgmresSolver == null) { _fgmresSolver = new AnomalyCurrentFgmresSolver(this); } if (_convolutionOperator == null) { _convolutionOperator = new ConvolutionOperator(this); } if (tensors == null) { _aToOCalculator.CleanGreenTensors(); if (!StoreAtoA) { _greenTensorAtoA?.Dispose(); _greenTensorAtoA = null; } } else { _aToOCalculator.SetTensors(tensors.eGreenTensors, tensors.hGreenTensors); SetNewGreenTensor(tensors.gtAtoA); } }