Exodus.jl Methods

Public methods

Base.closeMethod
close(exo::ExodusDatabase)

Used to close and ExodusDatabase.

source
Base.copyMethod
copy(
    exo::ExodusDatabase,
    new_file_name::String;
    mesh_only_flag
)

Used to copy an ExodusDatabase. As of right now this is the best way to create a new ExodusDatabase for output. Not all of the put methods have been wrapped and properly tested. This one has though.

source
Exodus.copy_meshMethod
copy_mesh(file_name::String, new_file_name::String)

Simpler copy method to only copy a mesh for output later on

source
Exodus.exodiffMethod
exodiff(
    ex_1::String,
    ex_2::String,
    cli_args::Vector{String}
) -> Bool
source
Exodus.exodiffMethod
exodiff(ex_1::String, ex_2::String; command_file) -> Bool

Return true if the two files pass the exodiff test. Otherwise it returns false

source
Exodus.read_block_id_mapMethod
read_block_id_map(
    exo::ExodusDatabase{M, I, B, F},
    block_id
) -> Any

TODO do this one later... it depends on a few things

TODO fix this to not use void_int... use a proper type

source
Exodus.read_blocksMethod
read_blocks(
    exo::ExodusDatabase,
    block_ids::Union{Vector{<:Integer}, var"#s128"} where var"#s128"<:Integer
) -> Any

Helper method for initializing blocks.

TODO: change name to readelementblocks

source
Exodus.read_coordinatesMethod
read_coordinates(exo::ExodusDatabase) -> Matrix

Method to read coordinates. Returns a matrix that is ndim x nnodes.

source
Exodus.read_id_mapMethod
read_id_map(
    exo::ExodusDatabase{M, I, B, F},
    type::Type{MAP<:Exodus.AbstractExodusMap}
) -> Any
source
Exodus.read_idsMethod
read_ids(
    exo::ExodusDatabase{M, I, B, F},
    _::Type{S<:Exodus.AbstractExodusSet}
) -> Any
source
Exodus.read_mapMethod
read_map(exo::ExodusDatabase{M, I, B, F}) -> Any

TODO change to not use void_int

source
Exodus.read_nameMethod
read_name(
    exo::ExodusDatabase,
    _::Type{S<:Exodus.AbstractExodusSet},
    id::Integer
) -> String
source
Exodus.read_nameMethod
read_name(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable},
    var_index::Integer
) -> String

General method to read the name of a variable in index var_index for a given variable type V.

Examples: julia> readname(exo, ElementVariable, 1) "stressxx"

julia> readname(exo, GlobalVariable, 2) "reactionforce"

julia> readname(exo, NodalVariable, 1) "displx"

julia> readname(exo, NodeSetVariable, 1) "nsetdispl_x"

julia> read_name(exo, SideSetVariable, 1) "pressure"

source
Exodus.read_namesMethod
read_names(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable}
) -> Vector{String}

General method to read the names of variables for a given variable type V.

Examples: julia> readnames(exo, ElementVariable) "stressxx" "stressyy" "stresszz" "stressxy" "stressyz" "stress_zx"

julia> readnames(exo, GlobalVariable) "globaldispl" "reaction_force"

julia> readnames(exo, NodalVariable) "displx" "disply" "displz"

julia> readname(exo, NodeSetVariable) "nsetdisplx" "nsetdisply" "nsetdispl_z"

julia> read_name(exo, SideSetVariable) "pressure"

source
Exodus.read_number_of_variablesMethod
read_number_of_variables(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable}
) -> Int32

General method to read the number of variables for a given variable type V.

Examples: julia> readnumberof_variables(exo, ElementVariable) 6

julia> readnumberof_variables(exo, GlobalVariable) 5

julia> readnumberof_variables(exo, NodalVariable) 3

julia> readnumberof_variables(exo, NodeSetVariable) 3

julia> readnumberof_variables(exo, SideSetVariable) 6

source
Exodus.read_setMethod
read_set(
    exo::ExodusDatabase,
    type::Type{S<:Exodus.AbstractExodusSet},
    set_id
) -> Any
source
Exodus.read_setsMethod
read_sets(
    exo::ExodusDatabase{M, I, B, F},
    type::Type{S<:Exodus.AbstractExodusSet}
) -> Any
source
Exodus.read_timeMethod
read_time(exo::ExodusDatabase, time_step::Integer) -> Any

TODO figure out how to make this not use a vector of length 1 - either a ref or a ptr

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase,
    t::Type{GlobalVariable},
    timestep::Integer
) -> Vector

Wrapper method for global variables around the main readvalues method readvalues(exo::ExodusDatabase, t::Type{GlobalVariable}, timestep::Integer) = read_values(exo, t, timestep, 1, 1)

Example: read_values(exo, GlobalVariable, 1)

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase,
    t::Type{NodalVariable},
    timestep::Integer,
    index::Integer
) -> Any

Wrapper method for nodal variables

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase,
    t::Type{NodalVariable},
    timestep::Integer,
    name::String
) -> Any

Wrapper method for nodal variables

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase,
    t::Type{NodalVectorVariable},
    timestep::Integer,
    base_name::String
) -> Any

Wrapper method for nodal vector variables

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase,
    _::Type{V<:Union{ElementVariable, NodalVariable, NodeSetVariable, SideSetVariable}},
    time_step::Integer,
    id::Integer,
    var_name::String
) -> Any
source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase,
    _::Type{V<:Union{ElementVariable, NodeSetVariable, SideSetVariable}},
    time_step::Integer,
    set_name::String,
    var_name::String
) -> Any
source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase{M, I, B, F},
    _::Type{V<:ElementVariable},
    timestep::Integer,
    id::Integer,
    var_index::Integer
) -> Any

Method to read element variables

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase{M, I, B, F},
    _::Type{V<:GlobalVariable},
    timestep::Integer,
    id::Integer,
    var_index::Integer
) -> Vector

Method to read global variables

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase{M, I, B, F},
    _::Type{V<:NodalVariable},
    timestep::Integer,
    id::Integer,
    var_index::Integer
) -> Any

Method to read nodal variables

source
Exodus.read_valuesMethod
read_values(
    exo::ExodusDatabase{M, I, B, F},
    _::Type{V<:Union{NodeSetVariable, SideSetVariable}},
    timestep::Integer,
    id::Integer,
    var_index::Integer
) -> Any

Method to read nodeset/sideset variables

source
Exodus.write_blockMethod
write_block(exo::ExodusDatabase, block::Block)

WARNING: currently does not support edges, faces and attributes

source
Exodus.write_blockMethod
write_block(
    exo::ExodusDatabase,
    block_id::Integer,
    elem_type::String,
    conn::Array{I<:Integer, 2}
)
source
Exodus.write_coordinatesMethod
write_coordinates(
    exo::ExodusDatabase,
    coords::Union{Array{F<:AbstractFloat, 1}, Array{F<:AbstractFloat, 2}}
)

Method to write coordinates

source
Exodus.write_id_mapMethod
write_id_map(
    exo::ExodusDatabase{M, I, B, F},
    type::Type{MAP<:Exodus.AbstractExodusMap},
    map::Array{M, 1}
)
source
Exodus.write_nameMethod
write_name(
    exo::ExodusDatabase{M, I, B, F},
    set::Exodus.AbstractExodusSet,
    name::String
)
source
Exodus.write_nameMethod
write_name(
    exo::ExodusDatabase{M, I, B, F},
    _::Type{S<:Exodus.AbstractExodusSet},
    set_id::Integer,
    name::String
)
source
Exodus.write_nameMethod
write_name(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable},
    var_index::Integer,
    var_name::String
)
source
Exodus.write_namesMethod
write_names(
    exo::ExodusDatabase,
    _::Type{S<:Exodus.AbstractExodusSet},
    names::Vector{String}
)

WARNING: this methods likely does not have good safe guards

source
Exodus.write_namesMethod
write_names(
    exo::ExodusDatabase,
    type::Type{V<:Exodus.AbstractExodusVariable},
    var_names::Vector{String}
)
source
Exodus.write_number_of_variablesMethod
write_number_of_variables(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable},
    num_vars::Integer
)

General method to write the number of variables for a given variable type V.

Examples: julia> writenumberof_variables(exo, ElementVariable, 6)

julia> writenumberof_variables(exo, GlobalVariable, 5)

julia> writenumberof_variables(exo, NodalVariable, 3)

julia> writenumberof_variables(exo, NodeSetVariable, 3)

julia> writenumberof_variables(exo, SideSetVariable, 6)

source
Exodus.write_setMethod
write_set(
    exo::ExodusDatabase{M, I, B, F},
    set::Exodus.AbstractExodusSet
)

Typing ensures we don't write a set with non-matching types to the exodus file.

source
Exodus.write_timeMethod
write_time(
    exo::ExodusDatabase,
    time_step::Integer,
    time_value::AbstractFloat
)
source
Exodus.write_valuesMethod
write_values(
    exo::ExodusDatabase,
    t::Type{GlobalVariable},
    timestep::Integer,
    var_values::Vector{<:AbstractFloat}
)

Wrapper method for global variables around the main writevalues method writevalues( exo::ExodusDatabase, t::Type{GlobalVariable}, timestep::Integer, varvalues::Vector{<:AbstractFloat} ) = writevalues(exo, t, timestep, 1, 1, var_values)

Note: you need to first run writenumberof_variables(exo, GlobalVariable, n) where n is the number of variables.

Example: writenumberofvariables(exo, GlobalVariable, 5) writevalues(exo, GlobalVariable, 1, [10.0, 20.0, 30.0, 40.0, 50.0])

source
Exodus.write_valuesMethod
write_values(
    exo::ExodusDatabase,
    t::Type{NodalVariable},
    timestep::Integer,
    var_index::Integer,
    var_values::Vector{<:AbstractFloat}
)

Wrapper for writing nodal variables by index number

source
Exodus.write_valuesMethod
write_values(
    exo::ExodusDatabase,
    t::Type{NodalVariable},
    timestep::Integer,
    var_name::String,
    var_values::Vector{<:AbstractFloat}
)

Wrapper method for nodal variables

source
Exodus.write_valuesMethod
write_values(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable},
    timestep::Integer,
    id::Integer,
    var_index::Integer,
    var_values::Vector{<:AbstractFloat}
)
source
Exodus.write_valuesMethod
write_values(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable},
    timestep::Integer,
    id::Integer,
    var_name::String,
    var_value::Vector{<:AbstractFloat}
)
source
Exodus.write_valuesMethod
write_values(
    exo::ExodusDatabase,
    _::Type{V<:Exodus.AbstractExodusVariable},
    time_step::Integer,
    set_name::String,
    var_name::String,
    var_value::Vector{<:AbstractFloat}
)
source

Private methods

Exodus.collect_global_to_colorFunction

For collecting globaltocolor

collect_global_to_color(
    file_name::String,
    n_procs::Int64
) -> Vector{Int64}
collect_global_to_color(
    file_name::String,
    n_procs::Int64,
    n_dofs::Int64
) -> Vector{Int64}
source
Exodus.exodus_error_checkMethod
exodus_error_check(
    exo::Int32,
    error_code::Integer,
    method_name::String
)

Generic error handling method.

Arguments

  • error_code::T: error code, usually negative means something went bad
  • method_name::String: method name that called this
source
Exodus.read_blocks!Method
read_blocks!(
    blocks::Array{B<:Block, 1},
    exo::ExodusDatabase,
    block_ids::Array{I<:Integer, 1}
)

TODO: change name to readelementblocks!

source
Exodus.read_num_mapMethod
read_num_map(
    exo::ExodusDatabase{M, I, B, F},
    type::Type{MAP<:Exodus.AbstractExodusMap}
) -> Vector
source
Exodus.read_partial_coordinatesMethod
read_partial_coordinates(
    exo::ExodusDatabase,
    start_node_num::Integer,
    n_nodes::Integer
) -> Matrix

Method to read a partial set of coordinates that are contiguous. Returns a matrix that is ndim x nnodes

source
Exodus.read_partial_coordinates_componentMethod
read_partial_coordinates_component(
    exo::ExodusDatabase,
    start_node_num::Integer,
    n_nodes::Integer,
    component::Integer
) -> Vector

Method to read a specific component of a partial set of coordinates that are contiguous. Returns a vector of length n_nodes TODO change to not use Cvoid

source
Exodus.read_set_parametersMethod
read_set_parameters(
    exo::ExodusDatabase{M, I, B, F},
    set_id::Integer,
    _::Type{S<:Union{NodeSet, SideSet}}
) -> Tuple{Any, Any}
source
Exodus.read_sets!Method
read_sets!(
    sets::Array{T<:Exodus.AbstractExodusSet, 1},
    exo::ExodusDatabase,
    ids::Array{I, 1}
)
source
Exodus.write_initialization!Method
write_initialization!(exoid::Int32, init::Initialization)

Used to set up a exodus database in write mode

The ccall signatures should reall be B (bulk int type of exo) instead of Clonglong

source
Exodus.write_partial_coordinatesMethod
write_partial_coordinates(
    exo::ExodusDatabase,
    start_node_num::Integer,
    coords::Union{Array{F<:AbstractFloat, 1}, Array{F<:AbstractFloat, 2}}
)
source
Exodus.write_set_parametersMethod
write_set_parameters(
    exo::ExodusDatabase{M, I, B, F},
    set::Exodus.AbstractExodusSet
)

WARNING: currently doesn't support distance factors

source