-
-
Notifications
You must be signed in to change notification settings - Fork 24
Add functionality for volumetric multiscale coupling to micro-mechanics simulations #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
IshaanDesai
wants to merge
70
commits into
develop
Choose a base branch
from
multiscale-mech
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
dc01332
Updates for macro-micro call
kalupaika 6ce3ef1
Merge branch 'develop' into multiscale-update
IshaanDesai 7e1c1b7
Reintroduce parts that seemed to be deleted unintentionally
IshaanDesai 342df26
Formatting
IshaanDesai 8521dfe
Merge branch 'precice:develop' into multiscale-update
kalupaika c70bb78
volumetric coupling update
kalupaika 32fc350
Revert .gitignore because make clean takes care of it, and move examp…
IshaanDesai 33d08a6
Revert to CalculiX 2.20, because the adapter only works with this ver…
IshaanDesai 355cdd4
Revert CalculiX header file to 2.20
IshaanDesai f23833d
Remove unnecessary files which resulted from duplication
IshaanDesai 6329a47
Revert files which only had size change
IshaanDesai a9a0127
Adding necessary definitions in Fortran part, and code formatting
IshaanDesai 54bf8cb
Formatting .c files
IshaanDesai fcf72c9
Put old things back into CCXHelpers.c
IshaanDesai b932313
Compile with nonlingeo_precice.c and formatting
IshaanDesai 1c3febc
Revert nonlingeo_precice.c to old state
IshaanDesai cde18e9
Re-add functions which read and write modal checkpoints
IshaanDesai 0c32ca5
Apply clang-format to linstatic_precice.c
IshaanDesai cef5846
Revert Makefile to older state
IshaanDesai 9552f6a
First compiling version
IshaanDesai 06be8bb
Add call to linstatic_precice to ccx_2.20.c
IshaanDesai c3c8b46
Add functionality to write variables rve_id, mod_id, and ruc_size to …
IshaanDesai a56a7cf
Handle pointers to strain and stress data consistently in the linear …
IshaanDesai 38fa1b8
Trying to get gauss point coorindates from the FORTRAN side
IshaanDesai 7dc1468
Working version of the subroutine getelementgausspointcoords.f and re…
IshaanDesai b36a968
Working version for a linear static problem
IshaanDesai bfc0f58
Remove debugging print statements
IshaanDesai 3755875
Revert to older clang-format to test things
IshaanDesai fdf8be0
Remove print statement at the end of freeing data, and formatting
IshaanDesai 020c9d0
Merge branch 'develop' into multiscale-update
IshaanDesai 55319c3
Merge branch 'develop' into multiscale-update
IshaanDesai 9b7bdb4
Fix error in getting Gauss point coordinates for C3D8 elements
IshaanDesai afde186
Remove old 2D-3D mapping functions that were added by mistake
IshaanDesai af14bb4
Cleaning up functions which may have been remnants of resolving merge…
IshaanDesai 6aa96aa
Further reverting of unnecesarily pushed changes
IshaanDesai 1229dea
Add the file getgausspointscoords.f again
IshaanDesai 49f880b
Adding back functions which were deleted unintentionally
IshaanDesai a5d92b8
Revert more inadvertantly done changes
IshaanDesai 3784b38
Reverting some unnuecessary changes in the preCICE Interface functions
IshaanDesai 6e405ea
Remove print statements for debugging
IshaanDesai 69bbeb0
Merge branch 'develop' into multiscale-update
IshaanDesai 65cf38b
Revert changes to Makefile
IshaanDesai 8018a03
Refactor and clean up functionality to get strains from CalculiX
IshaanDesai 1a46209
Remove the file getstrain.f as the subroutine in it is not used
IshaanDesai 8b9de3b
Remove duplicate helper function
IshaanDesai ee111d7
Reinstate Elemtype
IshaanDesai e72c59c
Merge branch 'develop' into multiscale-update
IshaanDesai cef7a03
Remove NASMAT specific variable from the reading and writing function…
IshaanDesai e3ca91a
Reverting changes that are added inadvertently
IshaanDesai 5531833
Reinstating some of the variables and functions which were inadverten…
IshaanDesai d5674d3
Reverting unintended changes
IshaanDesai ef54706
Revert more unnecessarily made changes
IshaanDesai 9277fe1
Reverting more changes
IshaanDesai 8842923
Revert changes to fix function headers
IshaanDesai d21da28
Removing variables that are not used
IshaanDesai d846919
Merge branch 'develop' into multiscale-mech
IshaanDesai 5c2c66c
Use correct naming terminology for subroutine to set stress tensor
IshaanDesai 1df5061
Move functionality to set stiffness matrix and stress tensor values i…
IshaanDesai 31d9552
Use singular form for the word Element in function names, to make the…
IshaanDesai 2b679fe
Use appropriate functionality to identify element type for element me…
IshaanDesai 85a265f
Rework Gauss points coord loop for C3D4 and C3D8 elements
IshaanDesai 3278c16
FIRST WORKING VERSION with C3D4 elements and a 3D notch geometry
IshaanDesai 7103f29
Remove print statements used for debugging
IshaanDesai 2740ee5
Merge branch 'develop' into multiscale-mech
IshaanDesai 102d6d2
Rearrange data reading and writing for static problems, and remove so…
IshaanDesai 531ef30
Use datatype ITG in new functions
IshaanDesai 589e780
Implement feedback regarding function descriptions
IshaanDesai 0b1b243
Remove linstatic_precice.c
IshaanDesai 1c5f530
Use nonlingeo_precice.c for static nonlinear anaylsis
IshaanDesai 261cb33
Merge branch 'develop' into multiscale-mech
IshaanDesai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,6 +68,17 @@ void getSurfaceElementsAndFaces(ITG setID, ITG *ialset, ITG *istartset, ITG *ien | |
| } | ||
| } | ||
|
|
||
| void getElementsIDs(ITG setID, ITG *ialset, ITG *istartset, ITG *iendset, ITG *elements) | ||
| { | ||
|
|
||
| ITG i, k = 0; | ||
|
|
||
| for (i = istartset[setID] - 1; i < iendset[setID]; i++) { | ||
| elements[k] = ialset[i]; | ||
| k++; | ||
| } | ||
IshaanDesai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| void getNodeCoordinates(ITG *nodes, ITG numNodes, int dim, double *co, double *v, int mt, double *coordinates) | ||
| { | ||
|
|
||
|
|
@@ -409,6 +420,18 @@ int getXloadIndexOffset(enum xloadVariable xloadVar) | |
| } | ||
| } | ||
|
|
||
| void getElementStrain(ITG strainIdx, ITG numIPTotal, double *eei, double *strainData) | ||
| { | ||
| ITG i, idx; | ||
| // Loop through all element and respective gauss points | ||
| for (i = 0; i < numIPTotal; i++) { | ||
| idx = i * 6 + strainIdx; //TODO: Add explanation for 6 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, please. Two similar points below. |
||
| strainData[i * 3] = eei[idx]; | ||
| strainData[i * 3 + 1] = eei[idx + 1]; | ||
| strainData[i * 3 + 2] = eei[idx + 2]; | ||
| } | ||
| } | ||
|
|
||
| void setXload(double *xload, int *xloadIndices, double *values, int numValues, enum xloadVariable xloadVar) | ||
| { | ||
| ITG i; | ||
|
|
@@ -470,6 +493,30 @@ void setNodeDisplacements(double *displacements, ITG numNodes, int dim, int *xbo | |
| } | ||
| } | ||
|
|
||
| void setElementStiffness(ITG stiffnessIdx, ITG numIPTotal, double *stiffnessData, double *xstiff) | ||
| { | ||
| ITG i, idx; | ||
| // Loop through all element and respective gauss points | ||
| for (i = 0; i < numIPTotal; i++) { | ||
| idx = i * 27 + stiffnessIdx; //TODO: Add explanation for 27 | ||
| xstiff[idx] = stiffnessData[i * 3]; | ||
| xstiff[idx + 1] = stiffnessData[i * 3 + 1]; | ||
| xstiff[idx + 2] = stiffnessData[i * 3 + 2]; | ||
| } | ||
| } | ||
|
|
||
| void setElementStress(ITG stressIdx, ITG numIPTotal, double *stressData, double *stx) | ||
| { | ||
| ITG i, idx; | ||
| // Loop through all element and respective gauss points | ||
| for (i = 0; i < numIPTotal; i++) { | ||
| idx = i * 6 + stressIdx; //TODO: Add explanation for 6 | ||
| stx[idx] = stressData[i * 3]; | ||
| stx[idx + 1] = stressData[i * 3 + 1]; | ||
| stx[idx + 2] = stressData[i * 3 + 2]; | ||
| } | ||
| } | ||
|
|
||
| bool isSteadyStateSimulation(ITG *nmethod) | ||
| { | ||
| return *nmethod == 1; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly that these files are completely written for the adapter, and not included in the original CalculiX source code? In that case, I wonder if they should better be under
adapter/or another new folder. What is the motivation for putting them outside?The operations they define are specific to the adapter, right?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. These files are purely adapter-specific functionality. Moving them into theOn having a second look, the files have functionality which is directly copied from the CalculiX source code. So the files are intended for use in the adapter, but are not strictly code written by an adapter developer. The files are similar toadapter/folder makes sense and I will do so.nonlingeo_precice.cor evenccx_2.20.cfor that matter.My plan now is to remove the
linstatic_precice.centirely, because it is not serving the intended purpose of being a static solver for a multiscale scenario. I am trying to add the commands to read and write material data (stresses and strains) innonlingeo_precice.cso that we do not have to maintain a second solver in the adapter.