Hi all,
I have this code with 3 files: MaterialPoint.jl for module MaterialPoint as follows
module MaterialPoint
using LinearAlgebra
export mpmMaterialPoint_2D_Classic,createMaterialDomain_Circle
mutable struct mpmMaterialPoint_2D_Classic
end
function createMaterialDomain_Circle(fCenter::Array{Float64}, fRadius::Float64, fOffset::Float64)
end
end
And file Grid.jl implements the module Grid as
module Grid
using MaterialPoint
struct mpmGrid
end
function getAdjacentGridPoints(thisMaterialPoint::mpmMaterialPoint_2D_Classic,
thisGrid::mpmGrid)
end
export getAdjacentGridPoints
export mpmGrid
end
And the final file, Main.jl, uses modules Grid and MaterialPoint:
push!(LOAD_PATH,"/Users/vingu/Dropbox/JuliaCodes/Classic_2D_2Disk/")
using Printf
using Grid
using MaterialPoint
using Basis
function mpmMain()
thisGrid = Grid.mpmGrid(1.0, 1.0, 21, 21)
thisMaterialDomain_01 = MaterialPoint.createMaterialDomain_Circle([0.2; 0.2], 0.2, fOffset)
thisAdjacentGridPoints = getAdjacentGridPoints(thisMaterialPoint, thisGrid)
end
My question is: why I had to write Grid.mpmGrid(1.0, 1.0, 21, 21), not mpmGrid(1.0, 1.0, 21, 21) as I exported mpmGrid???
Note that thisAdjacentGridPoints = getAdjacentGridPoints(thisMaterialPoint, thisGrid) works fine without explicitly using Grid.getAdjacent…
Thanks,
P