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
370dd86c
Commit
370dd86c
authored
14 years ago
by
Thomas De Maet
Browse files
Options
Downloads
Patches
Plain Diff
add fonctionalities
parent
78e178e4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Solver/function.cpp
+27
-0
27 additions, 0 deletions
Solver/function.cpp
Solver/function.h
+1
-0
1 addition, 0 deletions
Solver/function.h
with
28 additions
and
0 deletions
Solver/function.cpp
+
27
−
0
View file @
370dd86c
...
@@ -517,6 +517,33 @@ function *functionScaleNew(const function *f0, const double s) {
...
@@ -517,6 +517,33 @@ function *functionScaleNew(const function *f0, const double s) {
return
new
functionScale
(
f0
,
s
);
return
new
functionScale
(
f0
,
s
);
}
}
// functionMean
class
functionMean
:
public
function
{
fullMatrix
<
double
>
_f0
;
public:
functionMean
(
const
function
*
f0
)
:
function
(
f0
->
getNbCol
())
{
setArgument
(
_f0
,
f0
);
}
void
call
(
dataCacheMap
*
m
,
fullMatrix
<
double
>
&
val
)
{
double
mean
;
for
(
int
j
=
0
;
j
<
val
.
size2
();
j
++
)
{
mean
=
0
;
for
(
int
i
=
0
;
i
<
val
.
size1
();
i
++
)
mean
+=
_f0
(
i
,
j
);
mean
/=
(
double
)
val
.
size1
();
for
(
int
i
=
0
;
i
<
val
.
size1
();
i
++
)
val
(
i
,
j
)
=
mean
;
}
}
};
function
*
functionMeanNew
(
const
function
*
f0
)
{
return
new
functionMean
(
f0
);
}
// functionCoordinates (get XYZ coordinates)
// functionCoordinates (get XYZ coordinates)
class
functionCoordinates
:
public
function
{
class
functionCoordinates
:
public
function
{
...
...
This diff is collapsed.
Click to expand it.
Solver/function.h
+
1
−
0
View file @
370dd86c
...
@@ -296,6 +296,7 @@ function *functionProdNew (const function *f0, const function *f1);
...
@@ -296,6 +296,7 @@ function *functionProdNew (const function *f0, const function *f1);
function
*
functionScaleNew
(
const
function
*
f0
,
const
double
s
);
function
*
functionScaleNew
(
const
function
*
f0
,
const
double
s
);
function
*
functionExtractCompNew
(
const
function
*
f0
,
const
int
iComp
);
function
*
functionExtractCompNew
(
const
function
*
f0
,
const
int
iComp
);
function
*
functionCatCompNew
(
std
::
vector
<
const
function
*>
fArray
);
function
*
functionCatCompNew
(
std
::
vector
<
const
function
*>
fArray
);
function
*
functionMeanNew
(
const
function
*
f0
);
function
*
getFunctionCoordinates
();
function
*
getFunctionCoordinates
();
...
...
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