Skip to content
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

Implementation of nodal source terms #1977

Merged
merged 12 commits into from
Nov 9, 2017

Conversation

TomFischer
Copy link
Member

Nodal source terms are setup in the project file in the process_variable section.

<source_terms>
    <source_term>
        <geometrical_set>geometry</geometrical_set>
        <geometry>inner</geometry>
        <type>Nodal</type>
        <value>1</value>
    </source_term>
</source_terms>

@@ -0,0 +1,4 @@
The name of the geometrical set (see \ref ogs_file_param__gml__name) in which
the \ref
ogs_file_param__prj__process_variables__process_variable__source_terms__ource_term_geometry
Copy link
Member

@endJunction endJunction Nov 2, 2017

Choose a reason for hiding this comment

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

ource_term_geometry -> source_term_geometry I guess... ✅

@@ -20,6 +20,7 @@

namespace MeshGeoToolsLib
{
inline
std::unique_ptr<MeshGeoToolsLib::SearchLength> createSearchLengthAlgorithm(
BaseLib::ConfigTree const& external_config, MeshLib::Mesh const& mesh)
{
Copy link
Member

@endJunction endJunction Nov 2, 2017

Choose a reason for hiding this comment

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

Would you move it to cpp, please. ✅

@@ -0,0 +1,98 @@
AddTest(
Copy link
Member

@endJunction endJunction Nov 2, 2017

Choose a reason for hiding this comment

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

I'd move the Tests.cmake content to the corresponding process' Tests.cmake.... ✅

Copy link
Member

@endJunction endJunction left a comment

Choose a reason for hiding this comment

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

You have done extensive tests, but there is no comparison, which would be nice I think.
Few documentation comments should be fixed.


#include "MeshGeoToolsLib/HeuristicSearchLength.h"
#include "MeshGeoToolsLib/SearchLength.h"
namespace MeshLib
Copy link
Member

Choose a reason for hiding this comment

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

Yes. This is much nicer because of the removed includes and the fwd-decls.

@@ -0,0 +1,4 @@
The name of the geometrical set (see \ref ogs_file_param__gml__name) in which
the \ref
ogs_file_param__prj__process_variables__process_variable__source_terms__source_term_geometry
Copy link
Member

Choose a reason for hiding this comment

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

underscore missing before geometry: ...__source_term__geometry

config.checkConfigParameter("type", "Nodal");

//! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__value}
auto const nodal_value = config.getConfigParameter<double>("value");
Copy link
Member

Choose a reason for hiding this comment

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

The <value> tag belongs to the "Nodal" type, so the ogs_file_param must be ..._source_term__Nodal__value. And then you need a new folder Nodal/ in the Documentation/.../source_term/. Compare to DirichletBC.cpp

Copy link
Member

@wenqing wenqing left a comment

Choose a reason for hiding this comment

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

👍

@endJunction
Copy link
Member

I think you didn't use 'git lfs' properly. Please enable the pre-commit hook.

@TomFischer
Copy link
Member Author

If there are no objections I'd like to rebase and merge the branch.

@wenqing
Copy link
Member

wenqing commented Nov 7, 2017

⏩ if you do not wait jenkins test works

MeshLib::Location const l{_mesh_id, MeshLib::MeshItemType::Node, _node_id};
auto const index =
_dof_table.getGlobalIndex(l, _variable_id, _component_id);
b.add(index, _value);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does that mean that such source terms only work for single nodes? Is an extension to line sources/volumetric sources planned?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes to both questions.

ids.size(), variable_id, *config.component_id);

return ProcessLib::createNodalSourceTerm(
config.config, dof_table, mesh.getID(), ids[0], variable_id,
Copy link
Collaborator

@chleh chleh Nov 8, 2017

Choose a reason for hiding this comment

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

IMHO it's very bad to silently drop n-1 of n sound node ids.
More complying with our current standards would be to OGS_FATAL if ids.size() > 1. ✅

$$
G(x, y) = \frac{1}{2 \pi} \ln \sqrt{(x-\xi)^2 + (y-\eta)^2}.
$$
With a nodal source term at $(0.0, 0.0)$ the analytical solution is
Copy link
Collaborator

@chleh chleh Nov 8, 2017

Choose a reason for hiding this comment

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

How strong is the source? Unity? ✅

@TomFischer TomFischer merged commit 39a862e into ufz:master Nov 9, 2017
@TomFischer TomFischer deleted the NodalSourceTerms branch November 9, 2017 10:51
bilke added a commit to bilke/ogs that referenced this pull request Nov 9, 2017
}

void NodalSourceTerm::integrateNodalSourceTerm(
const double t,
Copy link
Member

@wenqing wenqing Nov 9, 2017

Choose a reason for hiding this comment

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

@TomFischer t is not used. Would you please send a PR to remove this compilation warning?

@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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.

5 participants