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

Add the shape function order to ProcessVariable class #1503

Merged
merged 15 commits into from
Nov 2, 2016

Conversation

norihiro-w
Copy link
Collaborator

@norihiro-w norihiro-w commented Oct 28, 2016

Until now, the shape function order is decided by the order of the given mesh. This PR enables users to specify the shape function order in a config file, which can be different from the order of the given mesh, though appropriate mesh (e.g. 2nd order mesh for use of linear or quadratic order shape functions) should be provided.

This PR is extracted & modified after Dima's HM branch and is needed for implementing HM and "HM with LIE" processes, which use linear order for pressure and quadratic order for displacements. Major changes are

  • add the shape function order to ProcessVariable class
  • create local assemblers with the order provided in ProcessVariable
  • support the order in BC handling
  • pass the shape function order to local assembler creations in every process classes

Remarks

  • Currently linear and quadratic orders are supported
  • Config file needs tag for each process variable, e.g. <order>1</order>
  • I assume existing processes use the same order for all its variables.
  • The order in CalculateSurfaceFlux is fixed to 1. Correct me if it's wrong.

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.

Looks good and cleaner than my previous approach.
I'd though prefer explicit order=1 in the project files.

(I'll rebase HM on top of this before making PR.)

@norihiro-w
Copy link
Collaborator Author

I'll add the order=1 in the project files.

@@ -34,6 +34,9 @@ ProcessVariable::ProcessVariable(
_bc_builder(new BoundaryConditionBuilder())
{
DBUG("Constructing process variable %s", _name.c_str());
//! \ogs_file_param{prj__process_variables__process_variable__order}
auto opt_shapefunction_order = config.getConfigParameterOptional<int>("order");
_shapefunction_order = (opt_shapefunction_order ? opt_shapefunction_order.get() : 1);
Copy link
Member

@endJunction endJunction Nov 1, 2016

Choose a reason for hiding this comment

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

When the order is given in the prj files, then this default choice can be removed and the tag becomes non-optional. ✅

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.

The change is nice. I have only one comment.

@@ -34,6 +34,9 @@ ProcessVariable::ProcessVariable(
_bc_builder(new BoundaryConditionBuilder())
{
DBUG("Constructing process variable %s", _name.c_str());
//! \ogs_file_param{prj__process_variables__process_variable__order}
auto opt_shapefunction_order = config.getConfigParameterOptional<int>("order");
_shapefunction_order = (opt_shapefunction_order ? opt_shapefunction_order.get() : 1);
Copy link
Member

Choose a reason for hiding this comment

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

Need an assert somewhere such that this input order is not larger than the order of element of the mesh.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's not possible because Mesh/Element class doesn't know which order it is. In current implementation, LocalDataInitializer is checking if a proper element is found for the given shape function order.

@norihiro-w norihiro-w merged commit 8c43ebc into ufz:master Nov 2, 2016
@norihiro-w norihiro-w deleted the pv-quadratic-order branch November 2, 2016 14:27
@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.

4 participants