Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
98d73709
Commit
98d73709
authored
14 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
Added exportfunctions for Navier stokes 1D and gmsh postprocessing with probes
parent
4964934a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Solver/function.cpp
+41
-0
41 additions, 0 deletions
Solver/function.cpp
Solver/function.h
+2
-0
2 additions, 0 deletions
Solver/function.h
with
43 additions
and
0 deletions
Solver/function.cpp
+
41
−
0
View file @
98d73709
...
...
@@ -173,6 +173,47 @@ function *functionSumNew(const function *f0, const function *f1) {
return
new
functionSum
(
f0
,
f1
);
}
class
functionProd
:
public
function
{
public:
fullMatrix
<
double
>
_f0
,
_f1
;
void
call
(
dataCacheMap
*
m
,
fullMatrix
<
double
>
&
val
)
{
for
(
int
i
=
0
;
i
<
val
.
size1
();
i
++
)
for
(
int
j
=
0
;
j
<
val
.
size2
();
j
++
){
val
(
i
,
j
)
=
_f0
(
i
,
j
)
*
_f1
(
i
,
j
);
}
}
functionProd
(
const
function
*
f0
,
const
function
*
f1
)
:
function
(
f0
->
getNbCol
()){
if
(
f0
->
getNbCol
()
!=
f1
->
getNbCol
())
{
Msg
::
Error
(
"trying to compute product of 2 functions of different sizes
\n
"
);
throw
;
}
setArgument
(
_f0
,
f0
);
setArgument
(
_f1
,
f1
);
}
};
function
*
functionProdNew
(
const
function
*
f0
,
const
function
*
f1
)
{
return
new
functionProd
(
f0
,
f1
);
}
class
functionExtractComp
:
public
function
{
public:
fullMatrix
<
double
>
_f0
;
double
_iComp
;
void
call
(
dataCacheMap
*
m
,
fullMatrix
<
double
>
&
val
)
{
for
(
int
i
=
0
;
i
<
val
.
size1
();
i
++
)
val
(
i
,
0
)
=
_f0
(
i
,
_iComp
);
}
functionExtractComp
(
const
function
*
f0
,
const
int
iComp
)
:
function
(
1
){
setArgument
(
_f0
,
f0
);
_iComp
=
iComp
;
}
};
function
*
functionExtractCompNew
(
const
function
*
f0
,
const
int
iComp
)
{
return
new
functionExtractComp
(
f0
,
iComp
);
}
class
functionScale
:
public
function
{
public:
...
...
This diff is collapsed.
Click to expand it.
Solver/function.h
+
2
−
0
View file @
98d73709
...
...
@@ -248,7 +248,9 @@ class functionReplaceCache {
functionConstant
*
functionConstantNew
(
const
std
::
vector
<
double
>&
);
functionConstant
*
functionConstantNew
(
double
);
function
*
functionSumNew
(
const
function
*
f0
,
const
function
*
f1
);
function
*
functionProdNew
(
const
function
*
f0
,
const
function
*
f1
);
function
*
functionScaleNew
(
const
function
*
f0
,
const
double
s
);
function
*
functionExtractCompNew
(
const
function
*
f0
,
const
int
iComp
);
class
functionSolution
:
public
function
{
static
functionSolution
*
_instance
;
...
...
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