Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Nektar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
50
Merge Requests
50
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nektar
Nektar
Commits
93956964
Commit
93956964
authored
Apr 01, 2013
by
Dave Moxey
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/2d-baseflow-stability' of localhost:nektar
parents
4b248f75
4357b12c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
51 deletions
+52
-51
solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.cpp
...IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.cpp
+28
-29
solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.cpp
...NavierStokesSolver/AdvectionTerms/LinearisedAdvection.cpp
+24
-22
No files found.
solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.cpp
View file @
93956964
...
...
@@ -479,49 +479,48 @@ namespace Nektar
{
for
(
int
i
=
0
;
i
<
FieldDef
.
size
();
++
i
)
{
if
(
m_session
->
DefinesSolverInfo
(
"HOMOGENEOUS"
)
&&
(
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"HOMOGENEOUS1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"Homo1D"
))
if
((
m_session
->
DefinesSolverInfo
(
"HOMOGENEOUS"
)
&&
(
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"HOMOGENEOUS1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"Homo1D"
))
&&
nvar
==
4
)
{
// w-component must be ignored and set to zero.
if
(
j
!=
nvar
-
2
)
if
(
j
!=
nvar
-
2
)
{
// p component (it is 4th variable of the 3D and corresponds 3nd variable of 2D)
if
(
j
==
nvar
-
1
)
{
s
=
2
;
}
else
{
s
=
j
;
}
s
=
(
j
==
nvar
-
1
)
?
2
:
j
;
//extraction of the 2D
m_base
[
j
]
->
ExtractDataToCoeffs
(
FieldDef
[
i
],
FieldData
[
i
],
FieldDef
[
i
]
->
m_fields
[
s
],
m_base
[
j
]
->
UpdateCoeffs
());
//Put zero on higher modes
int
ncplane
=
(
m_base
[
0
]
->
GetNcoeffs
())
/
m_npointsZ
;
if
(
m_npointsZ
>
2
)
{
Vmath
::
Zero
(
ncplane
*
(
m_npointsZ
-
2
),
&
m_base
[
j
]
->
UpdateCoeffs
()[
2
*
ncplane
],
1
);
}
m_base
[
j
]
->
ExtractDataToCoeffs
(
FieldDef
[
i
],
FieldData
[
i
],
FieldDef
[
i
]
->
m_fields
[
s
],
m_base
[
j
]
->
UpdateCoeffs
());
}
// Put zero on higher modes
int
ncplane
=
(
m_base
[
0
]
->
GetNcoeffs
())
/
m_npointsZ
;
if
(
m_npointsZ
>
2
)
{
Vmath
::
Zero
(
ncplane
*
(
m_npointsZ
-
2
),
&
m_base
[
j
]
->
UpdateCoeffs
()[
2
*
ncplane
],
1
);
}
}
//2D cases
//2D cases
and Homogeneous1D Base Flows
else
{
bool
flag
=
FieldDef
[
i
]
->
m_fields
[
j
]
==
m_session
->
GetVariable
(
j
);
bool
flag
=
FieldDef
[
i
]
->
m_fields
[
j
]
==
m_session
->
GetVariable
(
j
);
ASSERTL1
(
flag
,
(
std
::
string
(
"Order of "
)
+
pInfile
+
std
::
string
(
" data and that defined in "
"m_boundaryconditions differs"
)).
c_str
());
m_base
[
j
]
->
ExtractDataToCoeffs
(
FieldDef
[
i
],
FieldData
[
i
],
FieldDef
[
i
]
->
m_fields
[
j
],
m_base
[
j
]
->
UpdateCoeffs
());
m_base
[
j
]
->
ExtractDataToCoeffs
(
FieldDef
[
i
],
FieldData
[
i
],
FieldDef
[
i
]
->
m_fields
[
j
],
m_base
[
j
]
->
UpdateCoeffs
());
}
}
...
...
solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.cpp
View file @
93956964
...
...
@@ -482,41 +482,43 @@ namespace Nektar
{
for
(
int
i
=
0
;
i
<
FieldDef
.
size
();
++
i
)
{
if
((
m_session
->
DefinesSolverInfo
(
"HOMOGENEOUS"
)
&&
(
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"HOMOGENEOUS1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"Homo1D"
))
&&
nvar
==
3
)
// Load a 2D base flow into a 3D Homogeneous session
if
((
m_session
->
DefinesSolverInfo
(
"HOMOGENEOUS"
)
&&
(
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"HOMOGENEOUS1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"1D"
||
m_session
->
GetSolverInfo
(
"HOMOGENEOUS"
)
==
"Homo1D"
))
&&
nvar
==
4
)
{
// w-component must be ignored and set to zero.
if
(
j
!=
nvar
-
2
)
if
(
j
!=
nvar
-
2
)
{
// p component (it is 4th variable of the 3D and corresponds 3nd variable of 2D)
if
(
j
==
nvar
-
1
)
{
s
=
2
;
}
else
{
s
=
j
;
}
s
=
(
j
==
nvar
-
1
)
?
2
:
j
;
//extraction of the 2D
m_base
[
j
]
->
ExtractDataToCoeffs
(
FieldDef
[
i
],
FieldData
[
i
],
FieldDef
[
i
]
->
m_fields
[
s
],
m_base
[
j
]
->
UpdateCoeffs
());
m_base
[
j
]
->
ExtractDataToCoeffs
(
FieldDef
[
i
],
FieldData
[
i
],
FieldDef
[
i
]
->
m_fields
[
s
],
m_base
[
j
]
->
UpdateCoeffs
());
}
//Put zero on higher modes
int
ncplane
=
(
m_base
[
0
]
->
GetNcoeffs
())
/
m_npointsZ
;
if
(
m_npointsZ
>
2
)
int
ncplane
=
(
m_base
[
0
]
->
GetNcoeffs
())
/
m_npointsZ
;
if
(
m_npointsZ
>
2
)
{
Vmath
::
Zero
(
ncplane
*
(
m_npointsZ
-
2
),
&
m_base
[
j
]
->
UpdateCoeffs
()[
2
*
ncplane
],
1
);
Vmath
::
Zero
(
ncplane
*
(
m_npointsZ
-
2
),
&
m_base
[
j
]
->
UpdateCoeffs
()[
2
*
ncplane
],
1
);
}
}
//2D cases and Homogeneous1D Base Flows
//
2D cases and Homogeneous1D Base Flows
else
{
bool
flag
=
FieldDef
[
i
]
->
m_fields
[
j
]
==
m_session
->
GetVariable
(
j
);
bool
flag
=
FieldDef
[
i
]
->
m_fields
[
j
]
==
m_session
->
GetVariable
(
j
);
ASSERTL1
(
flag
,
(
std
::
string
(
"Order of "
)
+
pInfile
+
std
::
string
(
" data and that defined in "
"m_boundaryconditions differs"
)).
c_str
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment