ISAAR.MSolve.Logging/TotalLoadsDisplacementsPerIncrementLog.cs
/// <summary>
/// This also writes to the output file.
/// </summary>
/// <param name="totalDisplacements">
/// The total displacements (start till current iteration of current increment) of the subdomain.
/// </param>
/// <param name="totalInternalForces">
/// The total internal right hand side forces (start till current iteration of current increment) of the subdomain.
/// </param>
This also writes to the output file.
This also writes to the output file .
public void LogTotalDataForIncrement(int incrementNumber, int currentIterationNumber, double errorNorm,
            IVectorView totalDisplacements, IVectorView totalInternalForces)
        {
            double displacement, force;
            bool isFreeDof = subdomain.FreeDofOrdering.FreeDofs.TryGetValue(monitorNode, monitorDof, out int subdomainDofIdx); 
            if (isFreeDof)
            {
                displacement = totalDisplacements[subdomainDofIdx];
                force = totalInternalForces[subdomainDofIdx];
            }
            else
            {
                currentTotalDisplacement += subdomain.Constraints[monitorNode, monitorDof];
                displacement = currentTotalDisplacement;
                force = forceCalculator.CalculateForceAt(monitorNode, monitorDof, totalDisplacements); 
            }
            using (var writer = new StreamWriter(outputFile, true)) 
            {
                writer.Write($"{incrementNumber}, {currentIterationNumber}, {errorNorm}");
                writer.WriteLine($", {displacement}, {force}");
            }
        }
public void LogTotalDataForIncrement ( int incrementNumber , int currentIterationNumber , double errorNorm , IVectorView totalDisplacements , IVectorView totalInternalForces ) { double displacement , force ; bool isFreeDof = subdomain . FreeDofOrdering . FreeDofs . TryGetValue ( monitorNode , monitorDof , out int subdomainDofIdx ) ; if ( isFreeDof ) { displacement = totalDisplacements [ subdomainDofIdx ] ; force = totalInternalForces [ subdomainDofIdx ] ; } else { currentTotalDisplacement += subdomain . Constraints [ monitorNode , monitorDof ] ; displacement = currentTotalDisplacement ; force = forceCalculator . CalculateForceAt ( monitorNode , monitorDof , totalDisplacements ) ; } using ( var writer = new StreamWriter ( outputFile , true ) ) { writer . Write ( $" { incrementNumber } ,  { currentIterationNumber } ,  { errorNorm } " ) ; writer . WriteLine ( $" ,  { displacement } ,  { force } " ) ; } }
This also writes to the output file.
This also writes to the output file .
//TODO: Should this be cached? //TODO: find out exactly what happens with the sign // If all subdomains use the same file, then we need to open it in append mode.  //TODO: Also that will not work in parallel for many subdomains. // append mode to continue from previous increment
incrementNumber
int
<not_specific>
currentIterationNumber
int
<not_specific>
errorNorm
double
<not_specific>
totalDisplacements
IVectorView
The total displacements (start till current iteration of current increment) of the subdomain.
The total displacements ( start till current iteration of current increment ) of the subdomain .
totalInternalForces
IVectorView
The total internal right hand side forces (start till current iteration of current increment) of the subdomain.
The total internal right hand side forces ( start till current iteration of current increment ) of the subdomain .