Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Özgür Ozan Sen
ogs
Commits
04312c22
Commit
04312c22
authored
8 years ago
by
Tom Fischer
Browse files
Options
Downloads
Plain Diff
Merge pull request #1214 from endJunction/ExtendLocalAsmInterface
Extend local asm interface
parents
48281805
69bbff09
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
AssemblerLib/VectorMatrixAssembler.h
+8
-4
8 additions, 4 deletions
AssemblerLib/VectorMatrixAssembler.h
ProcessLib/LocalAssemblerInterface.h
+28
-2
28 additions, 2 deletions
ProcessLib/LocalAssemblerInterface.h
with
36 additions
and
6 deletions
AssemblerLib/VectorMatrixAssembler.h
+
8
−
4
View file @
04312c22
...
...
@@ -136,16 +136,20 @@ public:
/// \attention The index \c id is not necessarily the mesh item's id.
void
preTimestep
(
std
::
size_t
const
id
,
LocalAssembler
&
local_assembler
,
GlobalVector
const
&
x
)
const
GlobalVector
const
&
x
,
double
const
t
,
double
const
delta_t
)
const
{
auto
cb
=
[
&
local_assembler
](
std
::
vector
<
double
>
const
&
local_x
,
LocalToGlobalIndexMap
::
RowColumnIndices
const
&
/*r_c_indices*/
)
LocalToGlobalIndexMap
::
RowColumnIndices
const
&
/*r_c_indices*/
,
double
const
t
,
double
const
delta_t
)
{
local_assembler
.
preTimestep
(
local_x
);
local_assembler
.
preTimestep
(
local_x
,
t
,
delta_t
);
};
passLocalVector_
(
cb
,
id
,
_data_pos
,
x
);
passLocalVector_
(
cb
,
id
,
_data_pos
,
x
,
t
,
delta_t
);
}
/// Executes the postTimestep() method of the local assembler for the
...
...
This diff is collapsed.
Click to expand it.
ProcessLib/LocalAssemblerInterface.h
+
28
−
2
View file @
04312c22
...
...
@@ -26,8 +26,34 @@ public:
virtual
void
assemble
(
double
const
t
,
std
::
vector
<
double
>
const
&
local_x
)
=
0
;
virtual
void
addToGlobal
(
AssemblerLib
::
LocalToGlobalIndexMap
::
RowColumnIndices
const
&
,
GlobalMatrix
&
M
,
GlobalMatrix
&
K
,
GlobalVector
&
b
)
const
=
0
;
virtual
void
addToGlobal
(
AssemblerLib
::
LocalToGlobalIndexMap
::
RowColumnIndices
const
&
,
GlobalMatrix
&
M
,
GlobalMatrix
&
K
,
GlobalVector
&
b
)
const
=
0
;
virtual
void
assembleJacobian
(
double
const
/*t*/
,
std
::
vector
<
double
>
const
&
/*local_x*/
)
{
ERR
(
"assembleJacobian function is not implemented in the local "
"assembler."
);
std
::
abort
();
}
virtual
void
addJacobianToGlobal
(
AssemblerLib
::
LocalToGlobalIndexMap
::
RowColumnIndices
const
&
/*indices*/
,
GlobalMatrix
&
/*Jac*/
)
const
{
ERR
(
"addJacobianToGlobal function is not implemented in the local "
"assembler."
);
std
::
abort
();
}
virtual
void
preTimestep
(
std
::
vector
<
double
>
const
&
/*local_x*/
,
double
const
/*t*/
,
double
const
/*delta_t*/
)
{
}
virtual
void
postTimestep
(
std
::
vector
<
double
>
const
&
/*local_x*/
)
{}
};
}
// namespace ProcessLib
...
...
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