Commit 66c8153e authored by Andreas Zilian's avatar Andreas Zilian
Browse files

Clean up formatting.

parent 294d5325
......@@ -55,26 +55,22 @@ classdef MgGeoArea4LineEllipsoidalVoid < mgen.MgGeoArea4Line
%% ---------------------------------------------------------------------
function gnv = makeGridNodes(self, gridnodes)
%cla; clf;
%fig = figure(1); subplot('Position',[0.05 0.05 0.90 0.90]); axis equal; hold on;
gnv = gridnodes;
for kk = 1:4
if self.geoLines(kk).getNumTargetGridNodes() - 1 ==0
warning('increase the number of nodes in the %d line',kk)
if self.geoLines(kk).getNumTargetGridNodes() - 1 == 0
warning('increase the number of nodes in the %d line', kk);
end
end
dim0 = self.geoLines(1).getNumTargetGridNodes() - 1;
assert(dim0>0);
dim1 = self.geoLines(2).getNumTargetGridNodes() - 1;
assert(dim1>0);
dim2 = self.geoLines(3).getNumTargetGridNodes() - 1;
assert(dim2>0);
dim3 = self.geoLines(4).getNumTargetGridNodes() - 1;
assert(dim3>0);
assert(dim3>0);
dim = self.nrings*(dim0 + dim1 + dim2 + dim3);
segments = self.nrings - 1;
run_id = 1 + length(gridnodes);
......@@ -121,13 +117,14 @@ classdef MgGeoArea4LineEllipsoidalVoid < mgen.MgGeoArea4Line
if self.normFunction.vals(1)>self.normFunction.vals(2)
self.normFunction.vals=sort(self.normFunction.vals)
end
scale = self.normFunction.eval( mm/segments );
if isnan(scale)
warning('normFunction can not eval %d/%d',mm,segments)
if isnan(scale)
warning('normFunction can not eval %d/%d',mm,segments);
end
for gline = self.geoLines % loop over the four GeoLines
for gline = self.geoLines % loop over the four GeoLines
for ii = 1:gline.getNumTargetGridNodes - 1 % loop over GridNodes - 1
......@@ -156,12 +153,12 @@ classdef MgGeoArea4LineEllipsoidalVoid < mgen.MgGeoArea4Line
end
end
end
% defensive programming: check if ringNodes is filled.
assert(~isempty(self.ringNodes))
% defensive programming: check if ringNodes is filled.
assert(~isempty(self.ringNodes));
% make sure the ring nodes represent a closed line in terms of node connectivity
self.ringNodes(end+1) = self.ringNodes(1);
% sort in existing nodes
for gline = self.geoLines
for ii = 1:gline.getNumTargetGridNodes - 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment