newBinForNucleation

PURPOSE ^

remove nucleation handling to solver structure

SYNOPSIS ^

function solverState = newBinForNucleation(solverState, pbeDefinition,optionStruct)

DESCRIPTION ^

 remove nucleation handling to solver structure

 THIS FUNCTION IS NO USER FUNCTION.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function solverState = newBinForNucleation(solverState, pbeDefinition, ...
0002     optionStruct)
0003 % remove nucleation handling to solver structure
0004 %
0005 % THIS FUNCTION IS NO USER FUNCTION.
0006 
0007 % The elk-library: convex geometry applied to crystallization modeling.
0008 %   Copyright (C) 2012 Alexander Reinhold
0009 %
0010 % This program is free software: you can redistribute it and/or modify it
0011 %   under the terms of the GNU General Public License as published by the
0012 %   Free Software Foundation, either version 3 of the License, or (at your
0013 %   option) any later version.
0014 %
0015 % This program is distributed in the hope that it will be useful, but
0016 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0017 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0018 %   General Public License for more details.
0019 %
0020 % You should have received a copy of the GNU General Public License along
0021 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0022 
0023 if solverState.flagNucleation
0024    
0025     % overwrites old boundary with old pivot (now inactive)
0026     solverState.hcMatrix(:, 2) = solverState.hcMatrix(:, 2);
0027     solverState.numberVector(2) = solverState.numberVector(1);
0028     solverState.indexVector(2) = -1;
0029     
0030     % overwrite old pivot with new boundary
0031     solverState.hcMatrix(:, 1) = pbeDefinition.nucleationSize;
0032     solverState.numberVector(1) = 0;
0033     solverState.indexVector(1) = 0;
0034     
0035     % add new nucleation pivot
0036     solverState.hcMatrix = [pbeDefinition.nucleationSize ...
0037                             solverState.hcMatrix];
0038     solverState.numberVector = [0 solverState.numberVector];
0039     solverState.indexVector = [-2 solverState.indexVector];
0040     
0041     [hcMatrixDump upVector] = ensureProperDecData(...
0042         pbeDefinition.nucleationSize(1:pbeDefinition.nDecCoordinate, 1), ...
0043         1, pbeDefinition);
0044     solverState.upVector = [upVector, solverState.upVector];
0045     
0046     %! Dev: the below lines should be obsolete by the above lines
0047 %     solverState.upVector = [computePartitionIndexDec(pbeDefinition.dec, ...
0048 %         pbeDefinition.nucleationSize(1:pbeDefinition.nDecCoordinate, :), [], 1) ...
0049 %         solverState.upVector];
0050 %
0051 %     solverState.upVector = computeUpVector(pbeDefinition, ...
0052 %         pbeDefinition.nucleationSize(1:pbeDefinition.nDecCoordinate, :), ...
0053 %         optionStruct);
0054 %     solverState.upVector = [computePartitionIndexDec(pbeDefinition.dec, ...
0055 %           pbeDefinition.nucleationSize(1:pbeDefinition.nDecCoordinate, :), [], 1) ...
0056 %         solverState.upVector];
0057     %/
0058 
0059     if solverState.flagDensity
0060         error('density not yet supported')
0061     end
0062 else
0063     error('elk:solver:generalError', ['new bin for nucleation phenomena ' ...
0064         ' shall be added while it not presend']);
0065 end
0066 
0067 end

Generated on Sat 18-Jul-2015 16:45:31 by m2html © 2005