Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
fracture-flow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
benchmarks
fracture-flow
Commits
618ccd51
Commit
618ccd51
authored
7 years ago
by
Bernd Flemisch
Browse files
Options
Downloads
Patches
Plain Diff
generalize error scripts to take an arbitrary matrix permeability
parent
f59ef8aa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/compute_1d_error.m
+5
-2
5 additions, 2 deletions
scripts/compute_1d_error.m
scripts/compute_2d_error.m
+5
-2
5 additions, 2 deletions
scripts/compute_2d_error.m
with
10 additions
and
4 deletions
scripts/compute_1d_error.m
+
5
−
2
View file @
618ccd51
function
[
totalRelativeFractureError
]
=
compute_1d_error
(
coarseFile
,
referenceFile
)
function
[
totalRelativeFractureError
]
=
compute_1d_error
(
coarseFile
,
referenceFile
,
kmat
)
%compute1dError Evaluates the norm in each of the fractures
%compute1dError Evaluates the norm in each of the fractures
%
%
% The coarse file must contain a nFractures x 1 cell array with fracXAndP for
% The coarse file must contain a nFractures x 1 cell array with fracXAndP for
...
@@ -11,7 +11,10 @@ load(referenceFile,'p','t','x','k')
...
@@ -11,7 +11,10 @@ load(referenceFile,'p','t','x','k')
load
(
coarseFile
,
'fracXAndPCell'
)
load
(
coarseFile
,
'fracXAndPCell'
)
maxp
=
max
(
p
);
maxp
=
max
(
p
);
minp
=
min
(
p
);
minp
=
min
(
p
);
matrixIndices
=
find
(
k
==
1
);
if
nargin
==
2
kmat
=
1
;
end
matrixIndices
=
find
(
k
==
kmat
);
t
(
matrixIndices
)
=
[];
t
(
matrixIndices
)
=
[];
p
(
matrixIndices
)
=
[];
p
(
matrixIndices
)
=
[];
...
...
This diff is collapsed.
Click to expand it.
scripts/compute_2d_error.m
+
5
−
2
View file @
618ccd51
function
[
relativeMatrixError
]
=
compute_2d_error
(
coarseFile
,
referenceFile
)
function
[
relativeMatrixError
]
=
compute_2d_error
(
coarseFile
,
referenceFile
,
kmat
)
%compute_2d_error Evaluates the norm in the entire matrix
%compute_2d_error Evaluates the norm in the entire matrix
% Detailed explanation goes here
% Detailed explanation goes here
load
(
coarseFile
,
'T'
,
'P'
,
'Points'
)
load
(
coarseFile
,
'T'
,
'P'
,
'Points'
)
...
@@ -12,7 +12,10 @@ load(referenceFile,'t','p','x','k','domainarea')
...
@@ -12,7 +12,10 @@ load(referenceFile,'t','p','x','k','domainarea')
points
=
x
;
points
=
x
;
deltaP
=
max
(
p
)
-
min
(
p
);
deltaP
=
max
(
p
)
-
min
(
p
);
fracIndices
=
find
(
k
~=
1
);
if
nargin
==
2
kmat
=
1
;
end
fracIndices
=
find
(
k
~=
kmat
);
t
(
fracIndices
)
=
[];
t
(
fracIndices
)
=
[];
p
(
fracIndices
)
=
[];
p
(
fracIndices
)
=
[];
nCells
=
length
(
t
);
nCells
=
length
(
t
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment