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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
cce915d3
Commit
cce915d3
authored
Apr 29, 2021
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Fix a few local type names
parent
700bfa0d
No related branches found
No related tags found
1 merge request
!89
Add missing compatibility check when affecting lists to R^d or R^dxd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/DiscreteFunctionP0.hpp
+12
-12
12 additions, 12 deletions
src/scheme/DiscreteFunctionP0.hpp
with
12 additions
and
12 deletions
src/scheme/DiscreteFunctionP0.hpp
+
12
−
12
View file @
cce915d3
...
...
@@ -125,8 +125,8 @@ class DiscreteFunctionP0 : public IDiscreteFunction
PUGS_INLINE
friend
DiscreteFunctionP0
<
Dimension
,
decltype
(
LHSDataType
{}
+
DataType
{})
>
operator
+
(
const
LHSDataType
&
a
,
const
DiscreteFunctionP0
&
g
)
{
using
Product
DataType
=
decltype
(
LHSDataType
{}
+
DataType
{});
DiscreteFunctionP0
<
Dimension
,
Product
DataType
>
sum
(
g
.
m_mesh
);
using
Sum
DataType
=
decltype
(
LHSDataType
{}
+
DataType
{});
DiscreteFunctionP0
<
Dimension
,
Sum
DataType
>
sum
(
g
.
m_mesh
);
parallel_for
(
g
.
m_mesh
->
numberOfCells
(),
PUGS_LAMBDA
(
CellId
cell_id
)
{
sum
[
cell_id
]
=
a
+
g
[
cell_id
];
});
return
sum
;
...
...
@@ -136,8 +136,8 @@ class DiscreteFunctionP0 : public IDiscreteFunction
PUGS_INLINE
friend
DiscreteFunctionP0
<
Dimension
,
decltype
(
DataType
{}
+
RHSDataType
{})
>
operator
+
(
const
DiscreteFunctionP0
&
f
,
const
RHSDataType
&
b
)
{
using
Product
DataType
=
decltype
(
DataType
{}
+
RHSDataType
{});
DiscreteFunctionP0
<
Dimension
,
Product
DataType
>
sum
(
f
.
m_mesh
);
using
Sum
DataType
=
decltype
(
DataType
{}
+
RHSDataType
{});
DiscreteFunctionP0
<
Dimension
,
Sum
DataType
>
sum
(
f
.
m_mesh
);
parallel_for
(
f
.
m_mesh
->
numberOfCells
(),
PUGS_LAMBDA
(
CellId
cell_id
)
{
sum
[
cell_id
]
=
f
[
cell_id
]
+
b
;
});
return
sum
;
...
...
@@ -159,8 +159,8 @@ class DiscreteFunctionP0 : public IDiscreteFunction
PUGS_INLINE
friend
DiscreteFunctionP0
<
Dimension
,
decltype
(
LHSDataType
{}
-
DataType
{})
>
operator
-
(
const
LHSDataType
&
a
,
const
DiscreteFunctionP0
&
g
)
{
using
Product
DataType
=
decltype
(
LHSDataType
{}
-
DataType
{});
DiscreteFunctionP0
<
Dimension
,
Product
DataType
>
difference
(
g
.
m_mesh
);
using
Difference
DataType
=
decltype
(
LHSDataType
{}
-
DataType
{});
DiscreteFunctionP0
<
Dimension
,
Difference
DataType
>
difference
(
g
.
m_mesh
);
parallel_for
(
g
.
m_mesh
->
numberOfCells
(),
PUGS_LAMBDA
(
CellId
cell_id
)
{
difference
[
cell_id
]
=
a
-
g
[
cell_id
];
});
return
difference
;
...
...
@@ -170,8 +170,8 @@ class DiscreteFunctionP0 : public IDiscreteFunction
PUGS_INLINE
friend
DiscreteFunctionP0
<
Dimension
,
decltype
(
DataType
{}
-
RHSDataType
{})
>
operator
-
(
const
DiscreteFunctionP0
&
f
,
const
RHSDataType
&
b
)
{
using
Product
DataType
=
decltype
(
DataType
{}
-
RHSDataType
{});
DiscreteFunctionP0
<
Dimension
,
Product
DataType
>
difference
(
f
.
m_mesh
);
using
Difference
DataType
=
decltype
(
DataType
{}
-
RHSDataType
{});
DiscreteFunctionP0
<
Dimension
,
Difference
DataType
>
difference
(
f
.
m_mesh
);
parallel_for
(
f
.
m_mesh
->
numberOfCells
(),
PUGS_LAMBDA
(
CellId
cell_id
)
{
difference
[
cell_id
]
=
f
[
cell_id
]
-
b
;
});
return
difference
;
...
...
@@ -227,8 +227,8 @@ class DiscreteFunctionP0 : public IDiscreteFunction
PUGS_INLINE
friend
DiscreteFunctionP0
<
Dimension
,
decltype
(
LHSDataType
{}
/
DataType
{})
>
operator
/
(
const
LHSDataType
&
a
,
const
DiscreteFunctionP0
&
f
)
{
using
Product
DataType
=
decltype
(
LHSDataType
{}
/
DataType
{});
DiscreteFunctionP0
<
Dimension
,
Product
DataType
>
ratio
(
f
.
m_mesh
);
using
Ratio
DataType
=
decltype
(
LHSDataType
{}
/
DataType
{});
DiscreteFunctionP0
<
Dimension
,
Ratio
DataType
>
ratio
(
f
.
m_mesh
);
parallel_for
(
f
.
m_mesh
->
numberOfCells
(),
PUGS_LAMBDA
(
CellId
cell_id
)
{
ratio
[
cell_id
]
=
a
/
f
[
cell_id
];
});
return
ratio
;
...
...
@@ -238,8 +238,8 @@ class DiscreteFunctionP0 : public IDiscreteFunction
PUGS_INLINE
friend
DiscreteFunctionP0
<
Dimension
,
decltype
(
DataType
{}
/
RHSDataType
{})
>
operator
/
(
const
DiscreteFunctionP0
&
f
,
const
RHSDataType
&
b
)
{
using
Product
DataType
=
decltype
(
DataType
{}
/
RHSDataType
{});
DiscreteFunctionP0
<
Dimension
,
Product
DataType
>
ratio
(
f
.
m_mesh
);
using
Ratio
DataType
=
decltype
(
DataType
{}
/
RHSDataType
{});
DiscreteFunctionP0
<
Dimension
,
Ratio
DataType
>
ratio
(
f
.
m_mesh
);
parallel_for
(
f
.
m_mesh
->
numberOfCells
(),
PUGS_LAMBDA
(
CellId
cell_id
)
{
ratio
[
cell_id
]
=
f
[
cell_id
]
/
b
;
});
return
ratio
;
...
...
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