Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
code
pugs
Commits
049a4dd4
Commit
049a4dd4
authored
2 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Replug entropic time step computing
parent
a8bbab01
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/language/modules/SchemeModule.cpp
+41
-2
41 additions, 2 deletions
src/language/modules/SchemeModule.cpp
src/scheme/AcousticSolver.cpp
+539
-259
539 additions, 259 deletions
src/scheme/AcousticSolver.cpp
src/scheme/AcousticSolver.hpp
+22
-1
22 additions, 1 deletion
src/scheme/AcousticSolver.hpp
with
602 additions
and
262 deletions
src/language/modules/SchemeModule.cpp
+
41
−
2
View file @
049a4dd4
...
@@ -288,6 +288,43 @@ SchemeModule::SchemeModule()
...
@@ -288,6 +288,43 @@ SchemeModule::SchemeModule()
));
));
this
->
_addBuiltinFunction
(
"acoustic_rho_dt"
,
std
::
function
(
[](
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur
,
const
double
&
dt_max
)
->
double
{
return
acoustic_rho_dt
(
rho
,
ur
,
dt_max
);
}
));
this
->
_addBuiltinFunction
(
"acoustic_epsilon_dt"
,
std
::
function
(
[](
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
u
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
E
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>&
Ajr
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur
,
const
double
&
dt_max
)
->
double
{
return
acoustic_epsilon_dt
(
rho
,
u
,
E
,
p
,
Ajr
,
ur
,
dt_max
);
}
));
this
->
_addBuiltinFunction
(
"acoustic_entropy_dt"
,
std
::
function
(
[](
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
u
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
E
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>&
Ajr
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur
,
const
double
&
dt_max
)
->
double
{
return
acoustic_entropy_dt
(
rho
,
u
,
E
,
p
,
Ajr
,
ur
,
dt_max
);
}
));
this
->
_addBuiltinFunction
(
"glace_fluxes"
,
std
::
function
(
this
->
_addBuiltinFunction
(
"glace_fluxes"
,
std
::
function
(
[](
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
[](
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
...
@@ -296,7 +333,8 @@ SchemeModule::SchemeModule()
...
@@ -296,7 +333,8 @@ SchemeModule::SchemeModule()
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
vector
<
std
::
shared_ptr
<
const
IBoundaryConditionDescriptor
>>&
const
std
::
vector
<
std
::
shared_ptr
<
const
IBoundaryConditionDescriptor
>>&
bc_descriptor_list
)
bc_descriptor_list
)
->
std
::
tuple
<
std
::
shared_ptr
<
const
ItemValueVariant
>
,
->
std
::
tuple
<
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>
,
std
::
shared_ptr
<
const
ItemValueVariant
>
,
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>>
{
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>>
{
return
AcousticSolverHandler
{
getCommonMesh
({
rho
,
c
,
u
,
p
})}
return
AcousticSolverHandler
{
getCommonMesh
({
rho
,
c
,
u
,
p
})}
.
solver
()
.
solver
()
...
@@ -337,7 +375,8 @@ SchemeModule::SchemeModule()
...
@@ -337,7 +375,8 @@ SchemeModule::SchemeModule()
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
vector
<
std
::
shared_ptr
<
const
IBoundaryConditionDescriptor
>>&
const
std
::
vector
<
std
::
shared_ptr
<
const
IBoundaryConditionDescriptor
>>&
bc_descriptor_list
)
bc_descriptor_list
)
->
std
::
tuple
<
std
::
shared_ptr
<
const
ItemValueVariant
>
,
->
std
::
tuple
<
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>
,
std
::
shared_ptr
<
const
ItemValueVariant
>
,
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>>
{
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>>
{
return
AcousticSolverHandler
{
getCommonMesh
({
rho
,
c
,
u
,
p
})}
return
AcousticSolverHandler
{
getCommonMesh
({
rho
,
c
,
u
,
p
})}
.
solver
()
.
solver
()
...
...
This diff is collapsed.
Click to expand it.
src/scheme/AcousticSolver.cpp
+
539
−
259
View file @
049a4dd4
This diff is collapsed.
Click to expand it.
src/scheme/AcousticSolver.hpp
+
22
−
1
View file @
049a4dd4
...
@@ -13,6 +13,26 @@ class SubItemValuePerItemVariant;
...
@@ -13,6 +13,26 @@ class SubItemValuePerItemVariant;
double
acoustic_dt
(
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
c
);
double
acoustic_dt
(
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
c
);
double
acoustic_rho_dt
(
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur
,
const
double
&
dt_max
);
double
acoustic_epsilon_dt
(
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
u
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
E
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>&
Ajr_variant
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur_variant
,
const
double
&
dt_max
);
double
acoustic_entropy_dt
(
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
rho
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
u
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
E
,
const
std
::
shared_ptr
<
const
IDiscreteFunction
>&
p
,
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>&
Ajr_variant
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur_variant
,
const
double
&
dt_max
);
class
AcousticSolverHandler
class
AcousticSolverHandler
{
{
public:
public:
...
@@ -25,7 +45,8 @@ class AcousticSolverHandler
...
@@ -25,7 +45,8 @@ class AcousticSolverHandler
private
:
private
:
struct
IAcousticSolver
struct
IAcousticSolver
{
{
virtual
std
::
tuple
<
const
std
::
shared_ptr
<
const
ItemValueVariant
>
,
virtual
std
::
tuple
<
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>
,
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>>
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>>
compute_fluxes
(
compute_fluxes
(
const
SolverType
&
solver_type
,
const
SolverType
&
solver_type
,
...
...
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