Skip to content

Refactor to reduce assigning fields at creation #131

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

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

MakisH
Copy link
Member

@MakisH MakisH commented Jun 29, 2020

This replaces statements such as:

scalarField one_field = another_field;

by constructors:

scalarField one_field(another_field);

This can be safer and faster, as it avoids implicit conversions in between.

@davidscn do you see any problem with this approach? Have I forgotten to refactor any parts?

This replaces statements such as:

    scalarField one_field = another_field;

by constructors:

    scalarField one_field(another_field);

This can be safer and faster, as it avoids implicit conversions in between.
@MakisH MakisH requested a review from davidscn June 29, 2020 19:27
@MakisH MakisH changed the base branch from master to develop June 29, 2020 19:27
Copy link
Member

@davidscn davidscn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I didn't go through the whole source code to look for missing parts, but all supported fields are included. In case we see the assignment variant later somewhere, we can still fix it.

@MakisH MakisH merged commit 46c1dcf into develop Jun 30, 2020
pachesp added a commit that referenced this pull request Sep 30, 2020
commit 045d0d2
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Wed Jul 29 13:54:01 2020 +0200

    Cleanup sonicLiquidFoam case files

commit 91160d7
Author: uekerman <benjamin.uekermann@gmail.com>
Date:   Wed Jul 29 10:13:52 2020 +0200

    Tune FF sonicLiquidFoam to converge

commit c0e61f5
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Fri Jul 24 14:04:39 2020 +0200

    Add todo for determining solverType of multiphase solvers

commit 35cc2c2
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Wed Jul 22 21:57:15 2020 +0200

    Add pressure-based solver type guessing

commit c38f109
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Wed Jul 22 21:41:43 2020 +0200

    Update FF/FF.C

commit 03cee93
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Wed Jul 22 21:38:32 2020 +0200

    Update preCICE logger for consistency

commit fcb2c37
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Wed Jul 22 21:35:14 2020 +0200

    Remove density from transportProperties

commit a39035d
Merge: 78fc865 46c1dcf
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Wed Jul 22 18:22:28 2020 +0200

    Merge branch 'develop' into FF

commit 46c1dcf
Merge: 84a3178 0eb0742
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Tue Jun 30 10:47:18 2020 +0200

    Merge pull request #131 from precice/refactor-assign-construct

    Refactor to reduce assigning fields at creation

commit 0eb0742
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Mon Jun 29 21:21:45 2020 +0200

    Refactor to reduce assigning fields at creation

    This replaces statements such as:

        scalarField one_field = another_field;

    by constructors:

        scalarField one_field(another_field);

    This can be safer and faster, as it avoids implicit conversions in between.

commit 84a3178
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Tue Jun 23 21:19:26 2020 +0200

    Tutorials: Add removeObsoleteFolders.sh script

    Related to #26

    Already implemented separately for the FSI tutorials
    in the precice/tutorials repository.

commit 55a1d57
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Tue Jun 23 21:03:51 2020 +0200

    Simplify precice-config.xml of tutorials

    Hides the timing:initial of mapping (not needed) and extrapolation-order (not important).
    Moves the max-iterations together with the relative-convergence-measure (more natural to explain).

commit 671104a
Author: David Schneider <dav.schneider@tum.de>
Date:   Mon Jun 8 10:27:37 2020 +0200

    Support stress data (#125)

    Add support for stress data writing

commit 42a3d6d
Author: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date:   Tue Mar 24 10:07:35 2020 +0100

    Workaround for #109 (NP tutorial)

commit b7c7a7c
Author: David Schneider <dav.schneider@tum.de>
Date:   Fri Mar 20 20:39:04 2020 +0100

    Determine solver type by pressure dimension (#124)

    Determine solver type by pressure dimensions and throw error if automatic process fails.
@MakisH MakisH deleted the refactor-assign-construct branch April 15, 2021 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants