Skip to content

Commit 3f712a4

Browse files
authored
Merge pull request #12 from YEZ0226/recordMem
增加可选择计算内存消耗的功能,部分代码涉及MoM_Basics
2 parents bc67c51 + e99b3fc commit 3f712a4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/DirectAlgorithm.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function getImpedanceMatrix(geosInfo::Vector{ST}, nbf::Integer) where {ST<:Surfa
2222
end
2323
end
2424

25-
memory["全矩阵"] = Base.summarysize(Zmat)
25+
SimulationParams.recordMem && begin memory["全矩阵"] = Base.summarysize(Zmat) end
2626

2727
return Zmat
2828
end
@@ -33,7 +33,7 @@ function getImpedanceMatrix(geosInfo::Vector{VT}, nbf::Integer) where {VT<:Volum
3333
Zmat = impedancemat4VIE(geosInfo, nbf, VSBFTypes.vbfType)
3434
end
3535

36-
memory["全矩阵"] = Base.summarysize(Zmat)
36+
SimulationParams.recordMem && begin memory["全矩阵"] = Base.summarysize(Zmat) end
3737

3838
return Zmat
3939
end
@@ -48,7 +48,7 @@ function getImpedanceMatrix(geosInfo::Vector{VT}, nbf::Integer) where {VT<:Abstr
4848
end
4949
end
5050

51-
memory["全矩阵"] = Base.summarysize(Zmat)
51+
SimulationParams.recordMem && begin memory["全矩阵"] = Base.summarysize(Zmat) end
5252

5353
return Zmat
5454
end

src/MLFMA/MLMFAIterators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function MLMFAIterator(Znear, octree::OctreeInfo{FT, LT},
6666

6767
Zopt = MLMFAIterator{Complex{FT}, Vector}(octree, Znear, vsCellsInfo, bfsInfo, aggSBF, disaggSBF, ZI)
6868

69-
record_memorys(Zopt)
69+
SimulationParams.recordMem && begin record_memorys(Zopt) end
7070

7171
return Zopt
7272

0 commit comments

Comments
 (0)