Making your App depend on another App

When you create a new app with the stork script you get a new application that inherits from MOOSE and all of the physics modules by default, but what if you want to inherit from an existing application? This blog post dives into the details of how you modify you application to do just that!

We highly recommend that you add the application you are branching from as a submodule. This will ensure that update to that application don't surprise you and change the behavior of your tests or simulations without you noticing.

For the purpose of this discussion let's call the application we are branching from "SLUG" and the application that we are creating "ARION" (A specific kind of slug).

Step 1 Adding the dependent app submodule

I'm assuming that you already have your application created (from stork) and cloned locally

$ cd ~/projects/arion
$ git submodule add git@github.com:somename/slug.git

Step 2 Editing the Makefile

Now you need to tell your Makefile about the new application.

# Add these lines to the arion Makefile underneath the existing "modules" area.

# dep apps
SLUG_DIR          ?= $(CURDIR)/slug
include            $(FRAMEWORK_DIR)/app.mk

These lines take advantage of the fact that all MOOSE-based applications look the same and use the same build system. You are telling the Makefile where to find that application and defining a few variables so that the rules in the generic "app.mk" file are adapted specifically for the application you are including.

Step 3 Register the objects in your App and the App itself

Finally you need to update your main "app" file to tell it to use the objects from the dependent application.

# Edit your arion/src/base/ArionApp.C file

#include "SlugApp.h"
#include "SlugSyntax.h"

# in your ArionApp constructor register the app and associate the syntax

SlugApp::associateSyntax(_syntax, _action_factory);

# Finally make sure you register the app itself in registerApps()

That's all there is to it.

Current rating: 5


bragas calvin klein 8 months, 1 week ago

Any kind of help would be bragas calvin klein really appreciated!|

Link | Reply
Currently unrated

AndreyRix 2 months, 1 week ago

Мужчины и Женщтны Узнайте все о своем здоровье и самым важном аспекте
в своей жизне
физические упражнения для повышения потенции http://levitraviagratab.blogspot.ru/2017/01/blog-post_340.html

Link | Reply
Currently unrated

AndreyRix 2 months, 1 week ago

импаза действие http://sialiaviagra.blogspot.ru/2017/01/blog-post_63.html

Link | Reply
Currently unrated

JesminLinda 5 months, 2 weeks ago

Any kind of help would be bragas calvin klein really appreciated!|

Link | Reply
Currently unrated

uk.bestessays 5 months, 2 weeks ago

Many developers do not know how to make the appropriate coding for a specific project.When a person follows these steps by steps, they will become successful to make the desired app.Would you please let us know about the whole methods for coding the appropriate ways?

Link | Reply
Currently unrated

Boarding School in NCR 2 months, 1 week ago

A school is only a place where child develops physically and mentally by doing physical and mental exercise. Apart from this a child learns cooperation, coordination, understanding and also develops various skills in other fields.

Link | Reply
Currently unrated

Engineering college in Chandigarh 2 months, 1 week ago

Engineering as a subject combines mathematics, logic and science to find solutions to our daily life problems. Over the last few decades, engineering as a profession has seen vast expansion.

Link | Reply
Currently unrated

Zellmeonline456 1 month, 2 weeks ago

I really like this post, I am so excited to read this whole article, This is very nice and so interested, I appreciate your good effort, I get a lot of information to read this brilliant article. Thank you so much for sharing this awesome post. Keep it up

Link | Reply
Currently unrated

die cast light fixtures 1 month, 2 weeks ago

Actually, I am trying to make a new app for the past few days and this is a new idea that working on one app depends on another application. I have gone through the steps that you shared here and got some clear idea about the registration of submodule and other details.

Link | Reply
Currently unrated

z 3 weeks, 4 days ago


Link | Reply
Currently unrated

New Comment


required (not published)


R&D 100

Recent Blog Posts

Using our new clang-format Style

1 month, 2 weeks ago

Steady State Algorithm Change

10 months, 3 weeks ago

Making an App inherit from an App

11 months ago

Changing a published API (Deprecation)

11 months, 1 week ago

DiscreteMaterial Objects

1 year, 1 month ago

Recent Posts






RSS / Atom