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
c0435206
Commit
c0435206
authored
1 year ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Prepare use of R^d -> (R) function for P0 vector interpolation
parent
063dc78a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!167
Improve fluxing based remapping
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/DiscreteFunctionVectorInterpoler.cpp
+26
-5
26 additions, 5 deletions
src/scheme/DiscreteFunctionVectorInterpoler.cpp
with
26 additions
and
5 deletions
src/scheme/DiscreteFunctionVectorInterpoler.cpp
+
26
−
5
View file @
c0435206
...
...
@@ -96,11 +96,7 @@ template <size_t Dimension>
DiscreteFunctionVariant
DiscreteFunctionVectorInterpoler
::
_interpolate
()
const
{
for
(
const
auto
&
function_id
:
m_function_id_list
)
{
const
auto
&
function_descriptor
=
function_id
.
descriptor
();
Assert
(
function_descriptor
.
domainMappingNode
().
children
[
1
]
->
m_data_type
==
ASTNodeDataType
::
typename_t
);
const
ASTNodeDataType
&
data_type
=
function_descriptor
.
domainMappingNode
().
children
[
1
]
->
m_data_type
.
contentType
();
auto
check_data_type
=
[](
const
ASTNodeDataType
&
data_type
)
{
switch
(
data_type
)
{
case
ASTNodeDataType
::
bool_t
:
case
ASTNodeDataType
::
unsigned_int_t
:
...
...
@@ -115,7 +111,32 @@ DiscreteFunctionVectorInterpoler::_interpolate() const
throw
NormalError
(
os
.
str
());
}
}
};
if
(
m_function_id_list
.
size
()
==
1
)
{
const
auto
&
function_descriptor
=
m_function_id_list
[
0
].
descriptor
();
if
((
function_descriptor
.
domainMappingNode
().
children
[
1
]
->
m_data_type
==
ASTNodeDataType
::
typename_t
)
or
(
function_descriptor
.
domainMappingNode
().
children
[
1
]
->
m_data_type
==
ASTNodeDataType
::
tuple_t
))
{
const
ASTNodeDataType
&
data_type
=
function_descriptor
.
domainMappingNode
().
children
[
1
]
->
m_data_type
.
contentType
();
check_data_type
(
data_type
);
}
else
{
throw
UnexpectedError
(
"incorrect function"
);
}
}
else
{
for
(
const
auto
&
function_id
:
m_function_id_list
)
{
const
auto
&
function_descriptor
=
function_id
.
descriptor
();
if
(
function_descriptor
.
domainMappingNode
().
children
[
1
]
->
m_data_type
==
ASTNodeDataType
::
typename_t
)
{
const
ASTNodeDataType
&
data_type
=
function_descriptor
.
domainMappingNode
().
children
[
1
]
->
m_data_type
.
contentType
();
check_data_type
(
data_type
);
}
else
{
throw
UnexpectedError
(
"incorrect function"
);
}
}
}
return
this
->
_interpolate
<
Dimension
,
double
>
();
}
...
...
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