Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dartflo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dechamps Paul
dartflo
Commits
517cee45
Commit
517cee45
authored
2 years ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
Changed eigen matrix initialization
parent
cbb05061
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#5980
canceled
2 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dart/src/wTimeSolver.cpp
+8
-7
8 additions, 7 deletions
dart/src/wTimeSolver.cpp
dart/src/wViscFluxes.cpp
+3
-3
3 additions, 3 deletions
dart/src/wViscFluxes.cpp
dart/src/wViscFluxes.h
+3
-3
3 additions, 3 deletions
dart/src/wViscFluxes.h
with
14 additions
and
13 deletions
dart/src/wTimeSolver.cpp
+
8
−
7
View file @
517cee45
...
...
@@ -82,17 +82,18 @@ int TimeSolver::Integration(size_t iPoint, BLRegion *bl)
double
CFL
=
CFL0
;
unsigned
int
itFrozenJac
=
itFrozenJac0
;
double
timeStep
=
SetTimeStep
(
CFL
,
dx
,
bl
->
invBnd
->
GetVt
(
iPoint
));
Matrix
<
double
,
5
,
5
>
IMatrix
;
IMatrix
=
Matrix
<
double
,
5
,
5
>::
Identity
()
/
timeStep
;
//MatrixXd IMatrix(5,5);
MatrixXd
IMatrix
(
5
,
5
);
IMatrix
=
MatrixXd
::
Identity
(
5
,
5
)
/
timeStep
;
/* Initial system residuals */
Vector
<
double
,
5
>
SysRes
=
SysMatrix
->
ComputeFluxes
(
iPoint
,
bl
);
Vector
Xd
SysRes
=
SysMatrix
->
ComputeFluxes
(
iPoint
,
bl
);
double
normSysRes0
=
SysRes
.
norm
();
double
normSysRes
=
normSysRes0
;
Matrix
<
double
,
5
,
5
>
JacMatrix
;
Vector
<
double
,
5
>
slnIncr
;
Matrix
Xd
JacMatrix
(
5
,
5
)
;
Vector
Xd
slnIncr
(
5
)
;
nErrors
=
0
;
// Number of errors encountered
unsigned
int
innerIters
=
0
;
// Inner (non-linear) iterations
...
...
@@ -127,7 +128,7 @@ int TimeSolver::Integration(size_t iPoint, BLRegion *bl)
SysRes
=
SysMatrix
->
ComputeFluxes
(
iPoint
,
bl
);
CFL
=
1.0
;
timeStep
=
SetTimeStep
(
CFL
,
dx
,
bl
->
invBnd
->
GetVt
(
iPoint
));
IMatrix
=
Matrix
<
double
,
5
,
5
>
::
Identity
()
/
timeStep
;
IMatrix
=
Matrix
Xd
::
Identity
(
5
,
5
)
/
timeStep
;
normSysRes
=
(
SysRes
+
slnIncr
/
timeStep
).
norm
();
itFrozenJac
=
1
;
std
::
cout
<<
"normSysRes is nan "
<<
std
::
endl
;
...
...
@@ -143,7 +144,7 @@ int TimeSolver::Integration(size_t iPoint, BLRegion *bl)
CFL
=
std
::
max
(
CFL0
*
pow
(
normSysRes0
/
normSysRes
,
0.7
),
0.1
);
timeStep
=
SetTimeStep
(
CFL
,
dx
,
bl
->
invBnd
->
GetVt
(
iPoint
));
IMatrix
=
Matrix
<
double
,
5
,
5
>
::
Identity
()
/
timeStep
;
IMatrix
=
Matrix
Xd
::
Identity
(
5
,
5
)
/
timeStep
;
innerIters
++
;
}
// End while (innerIters < maxIt)
...
...
This diff is collapsed.
Click to expand it.
dart/src/wViscFluxes.cpp
+
3
−
3
View file @
517cee45
...
...
@@ -23,7 +23,7 @@ ViscFluxes::~ViscFluxes()
std
::
cout
<<
"~ViscFluxes()
\n
"
;
}
// end ~ViscFluxes
Vector
<
double
,
5
>
ViscFluxes
::
ComputeFluxes
(
size_t
iPoint
,
BLRegion
*
bl
)
Vector
Xd
ViscFluxes
::
ComputeFluxes
(
size_t
iPoint
,
BLRegion
*
bl
)
{
unsigned
int
nVar
=
bl
->
GetnVar
();
std
::
vector
<
double
>
u
(
nVar
,
0.
);
...
...
@@ -34,7 +34,7 @@ Vector<double, 5> ViscFluxes::ComputeFluxes(size_t iPoint, BLRegion *bl)
return
BLlaws
(
iPoint
,
bl
,
u
);
}
Matrix
<
double
,
5
,
5
>
ViscFluxes
::
ComputeJacobian
(
size_t
iPoint
,
BLRegion
*
bl
,
Vector
<
double
,
5
>
&
sysRes
,
double
eps
)
Matrix
Xd
ViscFluxes
::
ComputeJacobian
(
size_t
iPoint
,
BLRegion
*
bl
,
Vector
Xd
&
sysRes
,
double
eps
)
{
unsigned
int
nVar
=
bl
->
GetnVar
();
...
...
@@ -58,7 +58,7 @@ Matrix<double, 5, 5> ViscFluxes::ComputeJacobian(size_t iPoint, BLRegion *bl, Ve
return
JacMatrix
;
}
Vector
<
double
,
5
>
ViscFluxes
::
BLlaws
(
size_t
iPoint
,
BLRegion
*
bl
,
std
::
vector
<
double
>
u
)
Vector
Xd
ViscFluxes
::
BLlaws
(
size_t
iPoint
,
BLRegion
*
bl
,
std
::
vector
<
double
>
u
)
{
unsigned
int
nVar
=
bl
->
GetnVar
();
...
...
This diff is collapsed.
Click to expand it.
dart/src/wViscFluxes.h
+
3
−
3
View file @
517cee45
...
...
@@ -18,11 +18,11 @@ private:
public:
ViscFluxes
(
double
_Re
);
~
ViscFluxes
();
Eigen
::
Vector
<
double
,
5
>
ComputeFluxes
(
size_t
iPoint
,
BLRegion
*
bl
);
Eigen
::
Matrix
<
double
,
5
,
5
>
ComputeJacobian
(
size_t
iPoint
,
BLRegion
*
bl
,
Eigen
::
Vector
<
double
,
5
>
&
sysRes
,
double
eps
);
Eigen
::
Vector
Xd
ComputeFluxes
(
size_t
iPoint
,
BLRegion
*
bl
);
Eigen
::
Matrix
Xd
ComputeJacobian
(
size_t
iPoint
,
BLRegion
*
bl
,
Eigen
::
Vector
Xd
&
sysRes
,
double
eps
);
private:
Eigen
::
Vector
<
double
,
5
>
BLlaws
(
size_t
iPoint
,
BLRegion
*
bl
,
std
::
vector
<
double
>
u
);
Eigen
::
Vector
Xd
BLlaws
(
size_t
iPoint
,
BLRegion
*
bl
,
std
::
vector
<
double
>
u
);
double
AmplificationRoutine
(
double
hk
,
double
ret
,
double
theta
)
const
;
};
}
// namespace dart
...
...
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