Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cm3Libraries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm3
cm3Libraries
Commits
ed0d7d21
Commit
ed0d7d21
authored
3 years ago
by
Vinayak Gholap
Browse files
Options
Downloads
Patches
Plain Diff
Change in averaging method for IPVariable over time
parent
869c0ca3
No related branches found
No related tags found
1 merge request
!386
Major update: Computing average IPVar over time period, rewriting last time...
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
NonLinearSolver/nlsolver/nonLinearMechSolver.cpp
+8
-2
8 additions, 2 deletions
NonLinearSolver/nlsolver/nonLinearMechSolver.cpp
with
8 additions
and
2 deletions
NonLinearSolver/nlsolver/nonLinearMechSolver.cpp
+
8
−
2
View file @
ed0d7d21
...
@@ -3838,6 +3838,7 @@ void nonLinearMechSolver::computePeriodAveragedIPDataOnPhysical(const double tst
...
@@ -3838,6 +3838,7 @@ void nonLinearMechSolver::computePeriodAveragedIPDataOnPhysical(const double tst
{
{
double avgValue = 0.0;
double avgValue = 0.0;
int count = 0;
int count = 0;
double sum_dt = 0.0;
// here can check GP against std::map coordinates for correctness
// here can check GP against std::map coordinates for correctness
...
@@ -3848,12 +3849,17 @@ void nonLinearMechSolver::computePeriodAveragedIPDataOnPhysical(const double tst
...
@@ -3848,12 +3849,17 @@ void nonLinearMechSolver::computePeriodAveragedIPDataOnPhysical(const double tst
if(t >= tstart && t <= tend)
if(t >= tstart && t <= tend)
{
{
count++;
count++;
sum_dt += t;
// compute average of IPVariable over given time period
// compute average of IPVariable over given time period
avgValue += IPVariableOverTime.at(t).at(eleNum).at(j);
//avgValue += IPVariableOverTime.at(t).at(eleNum).at(j);
// sum(w_AV * dt)
avgValue += (IPVariableOverTime.at(t).at(eleNum).at(j)) * t;
}
}
}
}
avgValue /= count;
//avgValue /= count;
avgValue /= sum_dt;
Vinayak Gholap
@vinugholap
·
Feb 19, 2022
Author
Developer
average = sum(w_AV * dt)/sum(dt)
average = sum(w_AV * dt)/sum(dt)
Please
register
or
sign in
to reply
tempMap.emplace(j, avgValue);
tempMap.emplace(j, avgValue);
}
}
avgIPVariable.emplace(eleNum, tempMap);
avgIPVariable.emplace(eleNum, tempMap);
...
...
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