unspecified extra 't' in 'Output File Name'

Numerical methods and mathematical models of Elmer
Post Reply
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

unspecified extra 't' in 'Output File Name'

Post by Wil »

Hello,

Am I right that until no (or several month ago) the specification of "Output File Name = File "case"" in the following .sif file produced result files like "case_0001.vtu" but now I get a result file called "case_t0001.vtu".

Was this changed or did I change/oversee something?
Thanks in advance,
Wil

Code: Select all

Check Keywords Warn

Header
  Mesh DB "."
End

Solver 1
  Bubbles = Logical False
  Calculate Electric Energy = Logical False
  Calculate Electric Field = Logical False
  Calculate Surface Charge = Logical False
  Displace mesh = Logical False
  Equation = String "Stat Elec Solver"
  Exec Solver = String "Always"
  Linear System Abort Not Converged = Logical False
  Linear System Convergence Tolerance = Real 1e-08
  Linear System Iterative Method = String "BiCGStab"
  Linear System Max Iterations = Integer 500
  Linear System Precondition Recompute = Integer 1
  Linear System Preconditioning = String "ILU0"
  Linear System Residual Output = Integer 1
  Linear System Solver = String "Iterative"
  Optimize Bandwidth = Logical True
  Procedure = File "StatElecSolve" "StatElecSolver"
  Stabilize = Logical True
  Steady State Convergence Tolerance = Real 1e-05
  Variable = String "Potential"
  Variable DOFs = Integer 1
End

Simulation 
  BDF Order = Integer 1
  Coordinate Mapping(3) = Integer 1 2 3
  Coordinate System = String "Cartesian 3D"
  Output Intervals = Integer 1
  Simulation Type = String "Steady state"
  Steady State Max Iterations = Integer 1
  Steady State Min Iterations = Integer 0
  Timestepping Method = String "BDF"
  Use Mesh Names = Logical True
End

Constants 
  Permittivity Of Vacuum = Real 8.8542e-15
End

Body 1
  Equation = Integer 1
  Material = Integer 1
  Name = String "Solid1"
End

Material 1
  Relative Permittivity = Real 1.0
End

Equation 1
  Active Solvers(2) = Integer 1 2
End

Solver 2
  Equation = String "ResultOutput"
  Exec Solver = String "After simulation"
  Output File Name = File "case"
  Procedure = File "ResultOutputSolve" "ResultOutputSolver"
  Vtu Format = Logical True
End
Here the output on the ubuntu linux command line.

Code: Select all

SolverElmer_manual_execution$ ElmerSolver case.sif 
ELMER SOLVER (v 8.4) STARTED AT: 2020/01/24 20:29:45
ParCommInit:  Initialize #PEs:            1
MAIN: 
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Version: 8.4 (Rev: unknown, Compiled: 2020-01-22)
MAIN:  Running one task without MPI parallelization.
MAIN:  Running with just one thread per task.
MAIN:  HYPRE library linked in.
MAIN:  MUMPS library linked in.
MAIN: =============================================================
MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
LoadInputFile: Scanning input file: case.sif
LoadInputFile: Loading input file: case.sif
Loading user function library: [StatElecSolve]...[StatElecSolver_Init0]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init0]
LoadMesh: Starting
ElmerAsciiMesh: Performing step: 1
LoadMesh: Base mesh name: .
LoadMesh: Reading header info from file: ./mesh.header
InitializeMesh: Number of nodes in mesh: 1157
InitializeMesh: Number of bulk elements in mesh: 585
InitializeMesh: Number of boundary elements in mesh: 379
InitializeMesh: Initial number of max element nodes: 10
ElmerAsciiMesh: Performing step: 2
LoadMesh: Reading nodes from file: ./mesh.nodes
LoadMesh: Performing coordinate mapping
SetMeshDimension: Dimension of mesh is: 3
SetMeshDimension: Max dimension of mesh is: 3
ElmerAsciiMesh: Performing step: 3
LoadMesh: Reading bulk elements from file: ./mesh.elements
ElmerAsciiMesh: Performing step: 4
LoadMesh: Reading boundary elements from file: ./mesh.boundary
LoadMesh: Performing node mapping
ReadTargetNames: Reading names info from file: ./mesh.names
WARNING:: ReadTargetNames: Could not map name to Body nor BC: bnry2
LoadMesh: Remapping bodies
LoadMesh: Minimum initial body index: 1
LoadMesh: Maximum initial body index: 1
LoadMesh: Remapping boundaries
LoadMesh: Minimum initial boundary index: 2
LoadMesh: Maximum initial boundary index: 2
ElmerAsciiMesh: Performing step: 5
ElmerAsciiMesh: Performing step: 6
LoadMesh: Loading mesh done
LoadMesh: Preparing mesh done
LoadMesh: Elapsed REAL time:     0.0069 (s)
MeshStabParams: Computing stabilization parameters
MeshStabParams: Elapsed REAL time:     0.1832 (s)
MAIN: -------------------------------------
AddSolvers: Setting up 2 solvers
AddSolvers: Setting up solver 1: stat elec solver
AddEquationBasics: Using procedure: StatElecSolve StatElecSolver
AddEquationBasics: Setting up solver: stat elec solver
Loading user function library: [StatElecSolve]...[StatElecSolver_Init]
Loading user function library: [StatElecSolve]...[StatElecSolver_bulk]
Loading user function library: [StatElecSolve]...[StatElecSolver]
AddEquationBasics: Creating standard variable: potential
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: stat elec solver...done.
OptimizeBandwidth: Half bandwidth without optimization: 1145
OptimizeBandwidth: 
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth: Half bandwidth after optimization: 415
OptimizeBandwidth: ---------------------------------------------------------
AddSolvers: Setting up solver 2: resultoutput
AddEquationBasics: Using procedure: ResultOutputSolve ResultOutputSolver
AddEquationBasics: Setting up solver: resultoutput
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_bulk]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
AddMeshCoordinatesAndTime: Setting mesh coordinates and time
SetInitialConditions: Setting up initial conditions (if any)
MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: stat elec solver
StatElecSolve: -------------------------------------
StatElecSolve: STATELEC SOLVER:
StatElecSolve: -------------------------------------
DefaultStart: Starting solver: stat elec solver
StatElecSolve: Starting Assembly...
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
EnforceDirichletConditions: No Dirichlet conditions to enforce, exiting!
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
StatElecSolve:  Assembly (s)          :   7.4670999999999932E-002
DefaultSolve: Solving linear system with default routines
SolveSystem: Solving linear system
SolveLinearSystem: Assuming real valued linear system
SolveSystem: Solution trivially zero!
StatElecSolve:  Solve (s)             :   1.0199999999993548E-004
StatElecSolve:  Result Norm   :    0.0000000000000000
StatElecSolve:  Relative Change :    0.0000000000000000
StatElecSolve: 
DefaultFinish: Finished solver: stat elec solver
Loading user function library: [StatElecSolve]...[StatElecSolver_post]
ComputeNorm: Computing norm of solution
ComputeChange: SS (ITER=1) (NRM,RELC): (  0.0000000      0.0000000     ) :: stat elec solver
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: resultoutput
ResultOutputSolver: -------------------------------------
ResultOutputSolve: Saving with prefix: case
ResultOutputSolver: Working on mesh: .
ResultOutputSolver: Dimension of mesh is: 3
ResultOutputSolver: Creating list for saving - if not present
CreateListForSaving: Field Variables for Saving
CreateListForSaving: Scalar Field 1: potential
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format
VtuOutputSolver: Saving results in VTK XML format with prefix: case
VtuOutputSolver: Saving number of partitions: 1
SolverOutputDirectory: Creating directory: .
VtuOutputSolver: Full filename base is: ./case
VtuOutputSolver: Number of active elements 964 out of 964
VtuOutputSolver: Number of geometry nodes 1157 out of 1157
VtuOutputSolver: Total number of geometry nodes to save:    1157
VtuOutputSolver: Total number of dof nodes to save:    1157
VtuOutputSolver: Total number of elements to save:     964
VtuOutputSolver: Writing the vtu file: ./case_t0001.vtu
AscBinWriteInit: Initializing buffered ascii/binary writing
AscBinWriteInit: Writing in binary
AscBinWriteInit: Writing in double precision
AscBinWriteInit: Writing to unit number: 58
AscBinWriteInit: Size of buffer is: 1157
VtuOutputSolver: Writing nodal fields
VtuOutputSolver: Saving variable: potential
VtuOutputSolver: Number of nodal fields written: 1
VtuOutputSolver: Writing elemental fields
VtuOutputSolver: Number of elemental fields written: 0
VtuOutputSolver: Writing coordinates for each used node
VtuOutputSolver: Writing the elemental connectivity data
VtuOutputSolver: Writing nodal fields
VtuOutputSolver: Saving variable: potential
VtuOutputSolver: Writing elemental fields
AscBinWriteFree: Terminating buffered ascii/binary writing
VtuOutputSolver: All done for now
ResultOutputSolver: -------------------------------------
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_post]
ReloadInputFile: Realoading input file
LoadInputFile: Loading input file:
ElmerSolver: *** Elmer Solver: ALL DONE ***
ElmerSolver: The end
SOLVER TOTAL TIME(CPU,REAL):         0.61        0.50
ELMER SOLVER FINISHED AT: 2020/01/24 20:29:45
Attachments
model.zip
complete model
(102.05 KiB) Downloaded 223 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: unspecified extra 't' in 'Output File Name'

Post by kevinarden »

The same is true for me, but I am not sure when it changed. I get the nightly updates.

Kevin
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

Re: unspecified extra 't' in 'Output File Name'

Post by Wil »

I would need to know if it was changed on purpose and if it will change again (or often).
This is important because the result files are currently read automatically into FreeCAD (see https://forum.freecadweb.org/viewtopic.php?f=18&t=42732). If it was on purpose and it stays this way then I would change it in our input scripts.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: unspecified extra 't' in 'Output File Name'

Post by raback »

Hi

This was really on purpose. However, I don't know if it was a good idea?

Over the time the complexity of VTU output had increased and when adding new functionality I made the effort to collect the naming convention to one routine that can add the name of the piece, the partition, and the timestep. The same routine can be used for the .vtu, .pvtu and .pvd files.

Look at line 456 onward in:
https://github.com/ElmerCSC/elmerfem/bl ... Solver.F90

The main changes here were to 1) allow saving by pieces if requested, 2) include total number of processes. The idea with the "t" is just to give the user an idea to what the numbering is related to while 1) and 2) really offer new functionality.

For 1) see:
viewtopic.php?f=9&t=6934

If there is good reason I could take it back. Or add some "legacy" flag (that is passively there for the parallel stuff) to enforce the old naming convention. Definately it will not be changed any time soon, if not this time. The change is already included in the ElmerGUI as well.

Opinions?

-Peter
Wil
Posts: 72
Joined: 10 Jan 2014, 13:26
Antispam: Yes
Location: Austria

Re: unspecified extra 't' in 'Output File Name'

Post by Wil »

raback wrote: 27 Jan 2020, 13:02 The idea with the "t" is just to give the user an idea to what the numbering is related to while 1) and 2) really offer new functionality.
Nice. New functionality is good.
raback wrote: 27 Jan 2020, 13:02 If there is good reason I could take it back.
No, there is no reason to take it back.

Thanks for clarification. So we simply will search for both cases "case_t0001.vtu" and "case_0001.vtu".
BR
Wil
Post Reply