Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nektar
Nektar
Commits
269c6d19
Commit
269c6d19
authored
Jan 19, 2016
by
Kilian Lackhove
Browse files
APE: Fwd and Bwd transform sourceterms and basefields after evaluating them
parent
5251ae34
Changes
1
Hide whitespace changes
Inline
Side-by-side
solvers/APESolver/EquationSystems/APE.cpp
View file @
269c6d19
...
...
@@ -85,10 +85,19 @@ void APE::v_InitObject()
// Initialize basefield
EvaluateFunction
(
m_basefield_names
,
m_basefield
,
"Baseflow"
,
m_time
);
Array
<
OneD
,
NekDouble
>
tmpC
(
GetNcoeffs
());
for
(
int
i
=
0
;
i
<
m_spacedim
+
2
;
++
i
)
{
m_fields
[
0
]
->
FwdTrans
(
m_basefield
[
i
],
tmpC
);
m_fields
[
0
]
->
BwdTrans
(
tmpC
,
m_basefield
[
i
]);
}
// Initialize the sourceterm
m_sourceTerms
=
Array
<
OneD
,
NekDouble
>
(
GetTotPoints
());
m_sourceTerms
=
Array
<
OneD
,
NekDouble
>
(
GetTotPoints
(),
0.0
);
EvaluateFunction
(
"S"
,
m_sourceTerms
,
"Source"
,
m_time
);
m_fields
[
0
]
->
FwdTrans
(
m_sourceTerms
,
tmpC
);
m_fields
[
0
]
->
BwdTrans
(
tmpC
,
m_sourceTerms
);
// Do not forwards transform initial condition
m_homoInitialFwd
=
false
;
...
...
@@ -228,6 +237,17 @@ bool APE::v_PostIntegrate(int step)
EvaluateFunction
(
m_basefield_names
,
m_basefield
,
"Baseflow"
,
m_time
);
EvaluateFunction
(
"S"
,
m_sourceTerms
,
"Source"
,
m_time
);
Array
<
OneD
,
NekDouble
>
tmpC
(
GetNcoeffs
());
m_fields
[
0
]
->
FwdTrans
(
m_sourceTerms
,
tmpC
);
m_fields
[
0
]
->
BwdTrans
(
tmpC
,
m_sourceTerms
);
for
(
int
i
=
0
;
i
<
m_spacedim
+
2
;
++
i
)
{
m_fields
[
0
]
->
FwdTrans
(
m_basefield
[
i
],
tmpC
);
m_fields
[
0
]
->
BwdTrans
(
tmpC
,
m_basefield
[
i
]);
}
return
UnsteadySystem
::
v_PostIntegrate
(
step
);
}
...
...
Write
Preview
Supports
Markdown
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