Plugins
Loading...
Searching...
No Matches
common_user_data.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Gesellschaft fuer Anlagen- und Reaktorsicherheit gGmbH
3 * SPDX-License-Identifier: EUPL-1.2
4 * SPDX-FileContributor: Andreas Vogel
5 * SPDX-FileContributor: Goethe Universität Frankfurt
6 * SPDX-FileType: SOURCE
7 *
8 * This file is part of d3f++.
9 * d3f++ is an extension for UG4. Licensing information and citation requirements of UG4 are provided in LICENSES/UG4-LGPL_2.1
10 */
11
12
13#ifndef __H__UG__D3F__COMMON_USER_DATA__
14#define __H__UG__D3F__COMMON_USER_DATA__
15
17
18namespace ug{
19
20template <int dim>
22 : public StdGlobPosData<XInflow<dim>, number, dim>
23{
24 public:
25 XInflow(number _ca, number _cb, number _tstep)
26 : ca(_ca), cb(_cb), tstep(_tstep)
27 {};
28
29 inline void evaluate(number& val, const MathVector<dim>& pos, number time, int si) const
30 {
31 //const number t = time;
32 //const number x = pos[0];
33 //const number y = pos[1];
34
35 if (time < tstep) {
36 val = ca;
37 } else {
38 val = cb;
39 }
40 }
41
42 protected:
44};
45
46}
47#endif // __H__UG__D3F__COMMON_USER_DATA__
number time() const
Definition common_user_data.h:23
number tstep
Definition common_user_data.h:43
number cb
Definition common_user_data.h:43
void evaluate(number &val, const MathVector< dim > &pos, number time, int si) const
Definition common_user_data.h:29
number ca
Definition common_user_data.h:43
XInflow(number _ca, number _cb, number _tstep)
Definition common_user_data.h:25
double number