1
#ifndef _RHEOLEF_SPACE_CONSTANT_H
2
#define _RHEOLEF_SPACE_CONSTANT_H
4
/// This file is part of Rheolef.
6
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
8
/// Rheolef is free software; you can redistribute it and/or modify
9
/// it under the terms of the GNU General Public License as published by
10
/// the Free Software Foundation; either version 2 of the License, or
11
/// (at your option) any later version.
13
/// Rheolef is distributed in the hope that it will be useful,
14
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
/// GNU General Public License for more details.
18
/// You should have received a copy of the GNU General Public License
19
/// along with Rheolef; if not, write to the Free Software
20
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
/// =========================================================================
25
#include "rheolef/distributed.h"
27
namespace rheolef { namespace space_constant {
29
typedef size_t size_type;
31
// -------------------------------------------------------------
32
// coordinate system helper
33
// -------------------------------------------------------------
42
coordinate_type coordinate_system (std::string sys_coord);
43
std::string coordinate_system_name (coordinate_type);
44
void check_coord_sys_and_dimension (coordinate_type, size_type d);
46
// -------------------------------------------------------------
47
// multi-component field support
48
// -------------------------------------------------------------
52
tensor = 2, // symmetric, D_ij
53
unsymmetric_tensor = 3,
54
tensor4 = 4, // symmetric, A_ijkl
59
const std::string& valued_name (valued_type tag);
60
valued_type valued_tag (const std::string& name);
62
size_type n_component (
63
valued_type valued_tag,
65
coordinate_type sys_coord);
67
size_type n_component (
68
const std::string& valued,
70
coordinate_type sys_coord);
72
// -------------------------------------------------------------
74
// -------------------------------------------------------------
75
size_type tensor_index (
76
valued_type valued_tag,
77
coordinate_type sys_coord,
81
size_type tensor_index (
83
std::string sys_coord,
87
std::pair<size_type,size_type>
89
valued_type valued_tag,
90
coordinate_type sys_coord,
94
tensor_subscript_name (
95
valued_type valued_tag,
96
coordinate_type sys_coord,
99
std::pair<size_type,size_type>
102
std::string sys_coord,
106
tensor_subscript_name (
108
std::string sys_coord,
111
}} // namespace rheolef::space_constant
112
#endif // _RHEOLEF_SPACE_CONSTITUTION_H