Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dune-amdis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Praetorius, Simon
dune-amdis
Commits
dcbeb47a
Commit
dcbeb47a
authored
Nov 15, 2018
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
determine order of divides grid-function of second argument is constant
parent
e034a097
Pipeline
#1424
passed with stage
in 19 minutes and 39 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
src/amdis/gridfunctions/ConstantGridFunction.hpp
src/amdis/gridfunctions/ConstantGridFunction.hpp
+1
-1
src/amdis/gridfunctions/CoordsGridFunction.hpp
src/amdis/gridfunctions/CoordsGridFunction.hpp
+2
-2
src/amdis/gridfunctions/OperationsGridFunction.hpp
src/amdis/gridfunctions/OperationsGridFunction.hpp
+19
-2
No files found.
src/amdis/gridfunctions/ConstantGridFunction.hpp
View file @
dcbeb47a
...
...
@@ -82,7 +82,7 @@ namespace AMDiS
template
<
class
R
,
class
D
,
class
LocalContext
,
class
T
>
int
order
(
ConstantLocalFunction
<
R
(
D
),
LocalContext
,
T
>
const
&
lf
)
{
return
lf
.
order
()
;
return
0
;
}
...
...
src/amdis/gridfunctions/CoordsGridFunction.hpp
View file @
dcbeb47a
...
...
@@ -35,7 +35,7 @@ namespace AMDiS
return
x
;
}
friend
int
order
(
Self
const
&
/*f*/
,
int
/*d*/
)
friend
int
order
(
CoordsFunction
/*f*/
,
int
/*d*/
)
{
return
1
;
}
...
...
@@ -81,7 +81,7 @@ namespace AMDiS
return
x
[
comp_
];
}
friend
int
order
(
Self
const
&
/*f*/
,
int
/*d*/
)
friend
int
order
(
CoordsCompFunction
/*f*/
,
int
/*d*/
)
{
return
1
;
}
...
...
src/amdis/gridfunctions/OperationsGridFunction.hpp
View file @
dcbeb47a
...
...
@@ -16,7 +16,7 @@ namespace AMDiS
// @{
/// \brief Applies \ref Operation::Negate to GridFunctions. \relates FunctorGridFunction
template
<
class
Lhs
,
class
Rhs
,
template
<
class
Lhs
,
REQUIRES
(
Concepts
::
AnyGridFunction
<
Lhs
>)
>
auto
operator
-
(
Lhs
&&
lhs
)
{
...
...
@@ -47,12 +47,29 @@ namespace AMDiS
return
invokeAtQP
(
Operation
::
Multiplies
{},
std
::
forward
<
Lhs
>
(
lhs
),
std
::
forward
<
Rhs
>
(
rhs
));
}
namespace
Impl
{
template
<
class
Lhs
,
class
Value
,
REQUIRES
(
Concepts
::
ConstantToGridFunction
<
Value
>)
>
auto
divideAtQP
(
Lhs
&&
lhs
,
Value
value
)
{
return
invokeAtQP
(
Operation
::
Multiplies
{},
std
::
forward
<
Lhs
>
(
lhs
),
1.0
/
value
);
}
template
<
class
Lhs
,
class
Rhs
,
REQUIRES
(
not
Concepts
::
ConstantToGridFunction
<
std
::
decay_t
<
Rhs
>
>
)
>
auto
divideAtQP
(
Lhs
&&
lhs
,
Rhs
&&
rhs
)
{
return
invokeAtQP
(
Operation
::
Divides
{},
std
::
forward
<
Lhs
>
(
lhs
),
std
::
forward
<
Rhs
>
(
rhs
));
}
}
/// \brief Applies \ref Operation::Divides to GridFunctions. \relates FunctorGridFunction
template
<
class
Lhs
,
class
Rhs
,
REQUIRES
(
Concepts
::
AnyGridFunction
<
Lhs
,
Rhs
>)
>
auto
operator
/
(
Lhs
&&
lhs
,
Rhs
&&
rhs
)
{
return
invokeAtQP
(
Operation
::
Divides
{},
std
::
forward
<
Lhs
>
(
lhs
),
std
::
forward
<
Rhs
>
(
rhs
));
return
Impl
::
divideAtQP
(
std
::
forward
<
Lhs
>
(
lhs
),
std
::
forward
<
Rhs
>
(
rhs
));
}
...
...
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