Data Manager - Functions
Index
PeriLab.Data_Manager._get_fieldPeriLab.Data_Manager.add_active_modelPeriLab.Data_Manager.check_propertyPeriLab.Data_Manager.fem_activePeriLab.Data_Manager.get_accuracy_orderPeriLab.Data_Manager.get_active_modelsPeriLab.Data_Manager.get_all_blocksPeriLab.Data_Manager.get_all_field_keysPeriLab.Data_Manager.get_all_positionsPeriLab.Data_Manager.get_aniso_crit_valuesPeriLab.Data_Manager.get_bc_free_dofPeriLab.Data_Manager.get_block_id_listPeriLab.Data_Manager.get_block_name_listPeriLab.Data_Manager.get_bond_damagePeriLab.Data_Manager.get_cancelPeriLab.Data_Manager.get_commPeriLab.Data_Manager.get_contact_overlap_mapPeriLab.Data_Manager.get_coupling_dictPeriLab.Data_Manager.get_coupling_fe_nodesPeriLab.Data_Manager.get_crit_values_matrixPeriLab.Data_Manager.get_current_timePeriLab.Data_Manager.get_damagePeriLab.Data_Manager.get_dofPeriLab.Data_Manager.get_element_rotationPeriLab.Data_Manager.get_fieldPeriLab.Data_Manager.get_field_if_existsPeriLab.Data_Manager.get_field_typePeriLab.Data_Manager.get_filtered_nlistPeriLab.Data_Manager.get_inverse_nlistPeriLab.Data_Manager.get_iterationPeriLab.Data_Manager.get_local_nodesPeriLab.Data_Manager.get_local_synch_fieldsPeriLab.Data_Manager.get_max_rankPeriLab.Data_Manager.get_max_stepPeriLab.Data_Manager.get_mpi_activePeriLab.Data_Manager.get_nlistPeriLab.Data_Manager.get_nnodesPeriLab.Data_Manager.get_nnsetsPeriLab.Data_Manager.get_nsetsPeriLab.Data_Manager.get_num_elementsPeriLab.Data_Manager.get_num_responderPeriLab.Data_Manager.get_output_frequencyPeriLab.Data_Manager.get_overlap_mapPeriLab.Data_Manager.get_pre_calculation_orderPeriLab.Data_Manager.get_propertiesPeriLab.Data_Manager.get_propertyPeriLab.Data_Manager.get_rankPeriLab.Data_Manager.get_rotationPeriLab.Data_Manager.get_silentPeriLab.Data_Manager.get_stepPeriLab.Data_Manager.get_synch_fieldsPeriLab.Data_Manager.get_verbosePeriLab.Data_Manager.has_keyPeriLab.Data_Manager.init_propertiesPeriLab.Data_Manager.initialize_dataPeriLab.Data_Manager.loc_to_globPeriLab.Data_Manager.remove_active_modelPeriLab.Data_Manager.set_NP1_to_NPeriLab.Data_Manager.set_accuracy_orderPeriLab.Data_Manager.set_aniso_crit_valuesPeriLab.Data_Manager.set_bc_free_dofPeriLab.Data_Manager.set_block_id_listPeriLab.Data_Manager.set_block_name_listPeriLab.Data_Manager.set_cancelPeriLab.Data_Manager.set_commPeriLab.Data_Manager.set_contact_overlap_mapPeriLab.Data_Manager.set_coupling_dictPeriLab.Data_Manager.set_coupling_fe_nodesPeriLab.Data_Manager.set_crit_values_matrixPeriLab.Data_Manager.set_current_timePeriLab.Data_Manager.set_distributionPeriLab.Data_Manager.set_dofPeriLab.Data_Manager.set_element_rotationPeriLab.Data_Manager.set_femPeriLab.Data_Manager.set_glob_to_locPeriLab.Data_Manager.set_inverse_nlistPeriLab.Data_Manager.set_iterationPeriLab.Data_Manager.set_local_synchPeriLab.Data_Manager.set_max_rankPeriLab.Data_Manager.set_max_stepPeriLab.Data_Manager.set_nnodesPeriLab.Data_Manager.set_nnsetsPeriLab.Data_Manager.set_nsetPeriLab.Data_Manager.set_num_controllerPeriLab.Data_Manager.set_num_responderPeriLab.Data_Manager.set_output_frequencyPeriLab.Data_Manager.set_overlap_mapPeriLab.Data_Manager.set_pre_calculation_orderPeriLab.Data_Manager.set_propertiesPeriLab.Data_Manager.set_propertiesPeriLab.Data_Manager.set_propertyPeriLab.Data_Manager.set_rankPeriLab.Data_Manager.set_rotationPeriLab.Data_Manager.set_silentPeriLab.Data_Manager.set_stepPeriLab.Data_Manager.set_synchPeriLab.Data_Manager.set_verbosePeriLab.Data_Manager.switch_NP1_to_NPeriLab.Data_Manager.synch_manager
Data_Manager
PeriLab.Data_Manager._get_field — Method
_get_field(name::String)Returns the field with the given name.
Arguments
name::String: The name of the field.
Returns
field::Field: The field with the given name.
PeriLab.Data_Manager.add_active_model — Function
add_active_model(key::String, module_name::Module)Add the main modules to an OrderedDict which are active.
Arguments
key::String: Name of the model.active_module::Module: Module of the active models.
PeriLab.Data_Manager.check_property — Method
check_property(block_id::Int64, property::String)Checks if the specified property exists for the given block_id.
Arguments
block_id::Int64: The ID of the block.property::String: The name of the property to check.
Returns
Bool:trueif the property exists,falseotherwise.
PeriLab.Data_Manager.fem_active — Method
fem_active()
Returns if FEM is active (true) or not (false).
PeriLab.Data_Manager.get_accuracy_order — Method
get_accuracy_order()Returns the accuracy order for the "bond associated correspondence" implementation.
Arguments
value::Int64: The value of the accuracy_order.
PeriLab.Data_Manager.get_active_models — Function
get_active_models()Returns a list active model modules.
PeriLab.Data_Manager.get_all_blocks — Method
get_all_blocks()Gives back a global list of all block, initially. Is reduced to the outer (not free) surfaces of the contact blocks.
PeriLab.Data_Manager.get_all_field_keys — Method
get_all_field_keys()Returns a list of all field keys.
PeriLab.Data_Manager.get_all_positions — Method
get_all_positions()Gives back a global list of current positions, initially. Is reduced to the outer (not free) surfaces of the contact blocks.
PeriLab.Data_Manager.get_aniso_crit_values — Method
get_aniso_crit_values()Retrieves the critical values matrix.
PeriLab.Data_Manager.get_bc_free_dof — Method
get_bc_free_dof()Get all dof without displacment boundary conditions.
Returns
Vector{Tuple{Int64, Int64}}: The point and dof without boundary condition.
PeriLab.Data_Manager.get_block_id_list — Method
get_block_id_list()Returns a list of all block IDs.
PeriLab.Data_Manager.get_block_name_list — Method
get_block_name_list()Returns a list of all block IDs.
PeriLab.Data_Manager.get_bond_damage — Method
get_bond_damage(time::String)Get the bond damage
Arguments
time::String: The time of the field.
Returns
damage::Field: The bond damage field.
PeriLab.Data_Manager.get_cancel — Method
get_cancel()This function returns the cancel flag.
Returns
cancel::Bool: The value of thecancelvariable.
PeriLab.Data_Manager.get_comm — Method
get_comm()Get the MPI communicator
PeriLab.Data_Manager.get_contact_overlap_map — Method
get_contact_overlap_map()Get the contact overlap map
PeriLab.Data_Manager.get_coupling_dict — Method
get_coupling_dict()Get the PD - FE coupling dict
PeriLab.Data_Manager.get_coupling_fe_nodes — Method
get_coupling_fe_nodes()Get the FE nodes involved in the coupling
PeriLab.Data_Manager.get_crit_values_matrix — Method
get_crit_values_matrix()Retrieves the critical values matrix.
PeriLab.Data_Manager.get_current_time — Method
get_current_time()Get the current time of the simulation.
Returns
Float64: The current time of the simulation.
PeriLab.Data_Manager.get_damage — Method
get_damage(time::String) -> NodeScalarField{Float64}Get the damage values for a specific time.
Arguments
time::String: The time identifier for the damage field.
Returns
NodeScalarField{Float64}: The damage values as a vector of floating-point numbers.
Examples
damage_values = get_damage("NP1")
println(damage_values) # [1.5, 2.3, 0.8, ...]PeriLab.Data_Manager.get_dof — Method
get_dof()Retrieves the degree of freedom (dof) value.
Returns
dof(integer): The current degree of freedom value.
Example:
get_dof() # returns the current degree of freedomPeriLab.Data_Manager.get_element_rotation — Method
get_element_rotation()This function returns the element_rotation flag.
Returns
element_rotation::Bool: The value of theelement_rotationvariable.
PeriLab.Data_Manager.get_field — Function
get_field(name::String, time::String)Returns the field with the given name and time.
Arguments
name::String: The name of the field.time::String: The time of the field.
Returns
field::Field: The field with the given name and time.
PeriLab.Data_Manager.get_field_if_exists — Function
get_field_if_exists(name::String, time::String)Returns the field with the given name if it exists.
Arguments
name::String: The name of the field.time::String: The time of the field.
Returns
field::Field: The field with the given name and time.
PeriLab.Data_Manager.get_field_type — Function
get_field_type()Get the type of a field
Returns
get_field_type(string): returns the type of a field
PeriLab.Data_Manager.get_filtered_nlist — Method
get_filtered_nlist()Get the neighborhood list.
PeriLab.Data_Manager.get_inverse_nlist — Method
get_inverse_nlist()Get the inverse of the neighborhood list.
PeriLab.Data_Manager.get_iteration — Method
get_step()Get the iteration of the simulation.
Returns
Int64: The iteration of the simulation.
PeriLab.Data_Manager.get_local_nodes — Method
get_local_nodes()Determines the local node numbering.
Returns
get_local_nodes(array): returns local nodes.
Example:
get_local_nodes() # returns local nodes or if they do not exist at the core an empty arrayPeriLab.Data_Manager.get_local_synch_fields — Method
get_local_synch_fields(model::String)
model - class of models; before computation of these models the synchronisation occurs
Get the fields to synchronizePeriLab.Data_Manager.get_max_rank — Method
get_max_rank()This function returns the maximal rank of MPI the max_rank.
Returns
max_rank::Number: The value of themax_rankvariable.
Example
rank = get_max_rank()PeriLab.Data_Manager.get_max_step — Method
get_max_step()Get the max_step of the simulation.
Returns
Int64: The max_step of the simulation.
PeriLab.Data_Manager.get_mpi_active — Method
get_mpi_active()This function returns if MPI is active.
Returns
mpi_active::Bool
Example
rank = get_mpi_active()PeriLab.Data_Manager.get_nlist — Method
get_nlist()Get the neighborhood list.
PeriLab.Data_Manager.get_nnodes — Method
get_nnodes()Retrieves the number of nodes.
Returns
num_controller::Int64: The current number of nodes.
Example:
get_nnodes() # returns the current number of controler nodes. The neighbors are not includedPeriLab.Data_Manager.get_nnsets — Method
get_nnsets()Get the number of node sets.
Returns
nnsets::Int: The number of node sets.
PeriLab.Data_Manager.get_nsets — Method
get_nsets()Get the node sets
Returns
nsets::Dict{String,Vector{Int64}}: The node sets dictionary.
PeriLab.Data_Manager.get_num_elements — Method
get_num_elements()Get the the number of finite elements
Returns
get_num_elements::Int64: The number of finite elements
PeriLab.Data_Manager.get_num_responder — Method
get_num_responder()Get the the number of responder nodes
Returns
num_responder::Int64: The number of responder nodes
PeriLab.Data_Manager.get_output_frequency — Method
get_output_frequency()This function returns the output_frequency variable.
Returns
output_frequency::Any: The value of theoutput_frequencyvariable.
PeriLab.Data_Manager.get_overlap_map — Method
get_overlap_map()Get the overlap map
PeriLab.Data_Manager.get_pre_calculation_order — Method
get_pre_calculation_order()return the order of the pre calculation.
PeriLab.Data_Manager.get_properties — Method
get_properties(block_id::Int64, property::String)This function retrieves the value of a specified property for a given block_id if it exists in the properties dictionary.
Arguments
block_id::Int64: The identifier of the block for which to retrieve the property.property::String: The dictionary entrycontaining the properties for the blocks.
Returns
property_value::Any: The value associated with the specifiedpropertyfor the givenblock_id.Dict(): An empty dictionary if the specifiedpropertydoes not exist for the givenblock_id.
Example
block_properties = Dict(
1 => Dict("color" => "red", "size" => 10),
2 => Dict("color" => "blue", "height" => 20)
)
# Retrieve the 'color' property for block 1
color_value = get_properties(1, "color") # Returns "red"
# Try to retrieve a non-existent property for block 2
non_existent_value = get_properties(2, "width") # Returns an empty dictionaryPeriLab.Data_Manager.get_property — Method
get_property(block_id::Int64, property::String, value_name::String)This function retrieves a specific value_name associated with a specified property for a given block_id if it exists in the properties dictionary.
Arguments
block_id::Int64: The identifier of the block for which to retrieve the property.property::String: The String property type (e.g. Material model) for the blocks.value_name::String: The name of the value within the specifiedproperty.
Returns
value::Any: The value associated with the specifiedvalue_namewithin thepropertyfor the givenblock_id.nothing: If the specifiedblock_id,property, orvalue_namedoes not exist in the dictionary.
PeriLab.Data_Manager.get_rank — Method
get_rank()This function returns the rank of the core.
Returns
rank::Any: The value of therankvariable.
Example
current_rank = get_rank()PeriLab.Data_Manager.get_rotation — Method
get_rotation()This function returns the rotation flag.
Returns
rotation::Bool: The value of therotationvariable.
PeriLab.Data_Manager.get_silent — Method
get_silent()This function returns the silent flag.
Returns
silent::Bool: The value of thesilentvariable.
PeriLab.Data_Manager.get_step — Method
get_step()Get the step of the simulation.
Returns
Int64: The step of the simulation.
PeriLab.Data_Manager.get_synch_fields — Method
get_synch_fields()Get the fields to synchronize
PeriLab.Data_Manager.get_verbose — Method
get_verbose()This function returns the verbose flag.
Returns
verbose::Bool: The value of theverbosevariable.
PeriLab.Data_Manager.has_key — Method
has_key(field_name::String)::BoolControl if a key exists.
PeriLab.Data_Manager.init_properties — Method
init_properties()This function initializes the properties dictionary. Order of dictionary defines, in which order the models are called later on.
Returns
keys(properties[1]): The keys of the properties dictionary in defined order for the Model_Factory.jl.
PeriLab.Data_Manager.initialize_data — Method
initialize_data()Initialize all parameter in the Data_Manager and sets them to the default values.
PeriLab.Data_Manager.loc_to_glob — Method
loc_to_glob(range::UnitRange{Int64})Converts the local index to the global index.
Arguments
range::Union{UnitRange{Int64}, Vector{Int64}}: The range of the local index.
Example:
loc_to_glob(1:10) # converts the local index to the global indexPeriLab.Data_Manager.remove_active_model — Method
remove_active_model(module_name::Module)Removes main modules from OrderedDict.
Arguments
key::String: Key of the entry.
PeriLab.Data_Manager.set_NP1_to_N — Method
set_NP1_to_N(name::String, type::Type)Sets the NP1toN dataset
Arguments
name::String: The name of the field.type::Type The field type
PeriLab.Data_Manager.set_accuracy_order — Method
set_accuracy_order(value::Int64)Sets the accuracy order for the "bond associated correspondence" implementation.
Arguments
value::Int64: The value of the accuracy_order.
PeriLab.Data_Manager.set_aniso_crit_values — Method
setanisocritvalues(critvalues::Dict{Int64,Any})
Sets the anisotropic critical values globally.
Arguments
crit_values::Dict{Int64,Any}: The critical values.
PeriLab.Data_Manager.set_bc_free_dof — Method
set_bc_free_dof(values::Vector{Tuple{Int64, Int64}})Set all dof without displacment boundary conditions.
Returns
PeriLab.Data_Manager.set_block_id_list — Method
set_block_id_list(blocks_id_list::Vector{Int64})Sets the block list globally.
Arguments
blocks_id_list::Vector{Int64}: The block list.
PeriLab.Data_Manager.set_block_name_list — Method
set_block_name_list(blocks_name_list::Vector{String})Sets the block list globally.
Arguments
blocks_name_list::Vector{String}: The block list.
PeriLab.Data_Manager.set_cancel — Method
set_cancel(value::Int64)Sets the cancel flag.
Arguments
value::Bool: The cancel flag.
PeriLab.Data_Manager.set_comm — Method
set_comm(comm::MPI.Comm)Set the MPI communicator
Arguments
comm::MPI.Comm: MPI communicator
PeriLab.Data_Manager.set_contact_overlap_map — Method
set_contact_overlap_map(topo)Sets the contact overlap map globally.
Arguments
topo: The overlap map.
PeriLab.Data_Manager.set_coupling_dict — Method
set_coupling_dict(coupling_dict::Dict{Int64,Int64})Sets the FE - PD couplings. PD nodes -> FE Elements.
Arguments
coupling_dict::Dict{Int64,Int64}: The coupling dictionary.
PeriLab.Data_Manager.set_coupling_fe_nodes — Method
set_coupling_fe_nodes()Get the FE nodes involved in the coupling
PeriLab.Data_Manager.set_crit_values_matrix — Method
set_crit_values_matrix(crit_values::Array{Float64,3})Sets the critical values matrix globally.
Arguments
crit_values::Array{Float64,3}: The critical values matrix.
PeriLab.Data_Manager.set_current_time — Method
set_current_time(time::Float64)Set the current time of the simulation.
Arguments
time::Float64: The current time of the simulation.
PeriLab.Data_Manager.set_distribution — Method
set_distribution(values::Vector{Int64})Sets the distribution globally.
Arguments
values::Vector{Int64}: The distribution.
PeriLab.Data_Manager.set_dof — Method
set_dof(n::Int64)Sets the degree of freedom (dof) value globally.
Arguments
n::Int64: The value to set as the degree of freedom.
Example:
set_dof(3) # sets the degree of freedom to 3PeriLab.Data_Manager.set_element_rotation — Method
set_element_rotation(value::Int64)Sets the element_rotation flag.
Arguments
value::Bool: The element_rotation flag.
PeriLab.Data_Manager.set_fem — Method
set_fem(value::Bool)Activates and deactivates the FEM option in PeriLab
Arguments
value::Bool: The value to set FEM active (true) or not (false).
Example:
set_fem(true) # sets the fem_option to truePeriLab.Data_Manager.set_glob_to_loc — Method
set_glob_to_loc(dict::Dict{Int64,Int64})Sets the global-to-local mapping dict globally.
Arguments
dict(array): The dict representing the global-to-local mapping.
Example:
set_glob_to_loc([1, 3, 5]) # sets the global-to-local mapping dictPeriLab.Data_Manager.set_inverse_nlist — Method
set_inverse_nlist(inv_nlist::Vector{Dict{Int64,Int64}})Sets the inverse nlist globally.
Arguments
inv_nlist::Vector{Dict{Int64,Int64}}: The inverse nlist.
PeriLab.Data_Manager.set_iteration — Method
set_iteration(iteration::Int64)Set the iteration of the simulation.
Arguments
iteration::Int64: The iteration of the simulation.
PeriLab.Data_Manager.set_local_synch — Function
set_local_synch(model, name, download_from_cores, upload_to_cores, dof=0)Sets the synchronization dictionary locally during the model update process. Should be used carefully, to avoid unessary communication.
Arguments
name::String: The name of the field.download_from_cores::Bool: Whether to download the field from the cores.upload_to_cores::Bool: Whether to upload the field to the cores.
PeriLab.Data_Manager.set_max_rank — Method
set_max_rank(value::Int64)Sets the maximum rank globally.
Arguments
value::Int64: The value to set as the maximum rank.
PeriLab.Data_Manager.set_max_step — Method
set_max_step(max_step::Int64)Set the max_step of the simulation.
Arguments
max_step::Int64: The max_step of the simulation.
PeriLab.Data_Manager.set_nnodes — Method
set_nnodes()Sets the number all nodes of one core globally.
Arguments
Example: ```
PeriLab.Data_Manager.set_nnsets — Method
set_nnsets(n::Int64)Set the number of node sets.
Arguments
n::Int64: The number of node sets to be set.
PeriLab.Data_Manager.set_nset — Method
set_nset(name, nodes)Set the nodes associated with a named node set.
Arguments
name::String: The name of the node set.nodes::Vector{Int}: The node indices associated with the node set.
PeriLab.Data_Manager.set_num_controller — Method
set_num_controller(n::Int64)Sets the number of controller nodes globally. For one core the number of nodes is equal to the number of controller nodes.
Arguments
n::Int64: The value to set as the number of nodes.
Example:
set_num_controller(10) # sets the number of nodes to 10PeriLab.Data_Manager.set_num_responder — Method
set_num_responder(n::Int64)Sets the number of responder nodes globally. For one core the number of responder is zero. responder hold the information of the neighbors, of one node, but are not evaluated.
Arguments
n::Int64: The value to set as the number of nodes.
Example:
set_num_responder(10) # sets the number of responder nodes to 10PeriLab.Data_Manager.set_output_frequency — Method
set_output_frequency(value)Sets the output frequency globally.
Arguments
value: The value to set as the output frequency.
PeriLab.Data_Manager.set_overlap_map — Method
set_overlap_map(topo)Sets the overlap map globally.
Arguments
topo: The overlap map.
PeriLab.Data_Manager.set_pre_calculation_order — Method
set_pre_calculation_order(values::Vector{String})Sets the order of the pre calculation options globally.
Arguments
values::Vector{String}: The order of models.
PeriLab.Data_Manager.set_properties — Method
set_properties(block_id, property, values)Sets the values of a specified property for a given block_id.
Arguments
block_id::Int64: The identifier of the block for which to set the property.property::String: The name of the property.values::Any: The values to set for the specifiedproperty.
PeriLab.Data_Manager.set_properties — Method
set_properties(property, values)Sets the values of a specified property for a all blocks. E.g. for FEM, because it corresponds not to a block yet,
Arguments
property::String: The name of the property.values::Any: The values to set for the specifiedproperty.
PeriLab.Data_Manager.set_property — Method
set_property(block_id, property, value_name, value)Sets the value of a specified property for a given block_id.
Arguments
block_id::Int64: The identifier of the block for which to set the property.property::String: The name of the property.value_name::String: The name of the value within the specifiedproperty.value::Any: The value to set for the specifiedvalue_name.
PeriLab.Data_Manager.set_rank — Method
set_rank(value::Int64)Sets the rank globally.
Arguments
value::Int64: The value to set as the rank.
PeriLab.Data_Manager.set_rotation — Method
set_rotation(value::Int64)Sets the rotation flag.
Arguments
value::Bool: The rotation flag.
PeriLab.Data_Manager.set_silent — Method
set_silent(value::Bool)Sets the silent flag.
Arguments
value::Bool: The silent flag.
PeriLab.Data_Manager.set_step — Method
set_step(step::Int64)Set the step of the simulation.
Arguments
step::Int64: The step of the simulation.
PeriLab.Data_Manager.set_synch — Function
set_synch(name, download_from_cores, upload_to_cores)Sets the synchronization dictionary globally.
Arguments
name::String: The name of the field.download_from_cores::Bool: Whether to download the field from the cores.upload_to_cores::Bool: Whether to upload the field to the cores.
PeriLab.Data_Manager.set_verbose — Method
set_verbose(value::Bool)Sets the verbose flag.
Arguments
value::Bool: The verbose flag.
PeriLab.Data_Manager.switch_NP1_to_N — Method
switch_NP1_to_N()Switches the fields from NP1 to N. This is more efficient than copying the data from one field the other.
PeriLab.Data_Manager.synch_manager — Method
synch_manager(synchronise_field, direction::String)Synchronises the fields.
Arguments
synchronise_field: The function to synchronise the field.direction::String: The direction of the synchronisation.