https://gitlab.opengeosys.org/ogs/ogs.git
Revision 26db1ed92ecf2e5f816115e366ec9c6b22e8adc5 authored by Lars Bilke on 18 May 2021, 10:47:07 UTC, committed by Lars Bilke on 18 May 2021, 10:47:07 UTC
Bump LibXml2 to 2.9.12 and build statically, install xsltproc in container

See merge request ogs/ogs!3625
2 parent s 906dcad + 7395bbe
Raw File
Tip revision: 26db1ed92ecf2e5f816115e366ec9c6b22e8adc5 authored by Lars Bilke on 18 May 2021, 10:47:07 UTC
Merge branch 'ci-fix' into 'master'
Tip revision: 26db1ed
FemCondition.h
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 *
 */

#pragma once

#include <string>

namespace DataHolderLib
{
struct ProcessVariable
{
    std::string name;
    std::size_t order;
    std::size_t components;
};

enum class BaseObjType
{
    MESH = 0,
    GEOMETRY = 1
};

enum class ParameterType
{
    NONE = 0,
    CONSTANT,
    FUNCTION
};

/// Base class for boundary conditions, initial conditions and source terms.
class FemCondition
{
public:
    FemCondition(ProcessVariable const& process_var,
                 std::string const& param_name);
    virtual ~FemCondition() = default;

    /// Returns the name of the associated process variable
    std::string const getProcessVarName() const { return _process_var.name; }

    /// Returns the numerical order of the process variable
    ProcessVariable const& getProcessVar() const { return _process_var; }

    /// Returns the name of the parameter associated with the condition
    std::string const getParamName() const { return _param_name; }

    /// Specifies if the condition is set a geometry or on a mesh
    BaseObjType getBaseObjType() const { return _base_type; }

    /// Returns the name of the base object (i.e. geometry or mesh)
    std::string getBaseObjName() const { return _base_obj_name; }

    /// Returns the name of the geometric object
    std::string const getObjName() const { return _obj_name; }

    /// Sets a mesh as corresponding object for the condition
    void setMesh(std::string const& mesh_name);

    /// Sets a geometric object as corresponding object for the condition
    virtual void setGeoObject(std::string const& geo_name,
                              std::string const& obj_name);

    /// Returns the type of condition for displaying purposes
    virtual std::string const getConditionClassStr() const = 0;

private:
    BaseObjType _base_type;
    ProcessVariable _process_var;
    std::string _param_name;
    std::string _base_obj_name;
    std::string _obj_name;
};

}  // namespace DataHolderLib
back to top