11#ifndef _HYODA_PLUGIN_MATERIALS_H_
12#define _HYODA_PLUGIN_MATERIALS_H_
14#include "arcane/core/IApplication.h"
15#include "arcane/core/IParallelMng.h"
17#include "arcane/core/AbstractService.h"
18#include "arcane/core/FactoryService.h"
20#include "arcane/core/IVariableMng.h"
21#include "arcane/core/SharedVariable.h"
22#include "arcane/core/CommonVariables.h"
24#include "arcane/core/IMesh.h"
25#include "arcane/core/IItemFamily.h"
27#include "arcane/materials/IMeshMaterialMng.h"
28#include "arcane/materials/IMeshMaterial.h"
29#include "arcane/materials/IMeshEnvironment.h"
30#include "arcane/materials/MeshMaterialModifier.h"
31#include "arcane/materials/MeshMaterialVariableRef.h"
32#include "arcane/materials/MaterialVariableBuildInfo.h"
33#include "arcane/materials/MeshEnvironmentBuildInfo.h"
34#include "arcane/materials/CellToAllEnvCellConverter.h"
35#include "arcane/materials/MatItemVector.h"
37#include "arcane/hyoda/Hyoda.h"
38#include "arcane/hyoda/HyodaArc.h"
39#include "arcane/hyoda/HyodaMix.h"
40#include "arcane/hyoda/HyodaIceT.h"
41#include "arcane/hyoda/IHyodaPlugin.h"
63 m_defaultMesh(m_sub_domain->defaultMesh()),
76 debug()<<
"\t[HyodaMats::drawGlobalCell] Cell #"<<cell.
localId();
78 hyoda()->meshIceT()->setColor(min,max,val,rgb);
80 glColor3d(rgb[0], rgb[1], rgb[2]);
81 glVertex2d(m_defaultMesh->nodesCoordinates()[node].x,
82 m_defaultMesh->nodesCoordinates()[node].y);
93 ARCANE_UNUSED(variable);
102 hyodaMix()->setCellOrigin(global_cell);
104 info()<<
"[HyodaMats::draw] aeCell #"
109 info() <<
"[HyodaMats::draw] all_env_cell.nbEnvironment()!=1";
112 info()<<
"\t[HyodaMats::draw] eCell #"
113 << (*ienvcell).globalCell().localId()
114 <<
", nbMaterial=" << (*ienvcell).nbMaterial();
116 if ((*ienvcell).nbMaterial()==1) drawGlobalCell((*ienvcell).globalCell(),
118 mat_density[(*ienvcell).globalCell()]);
122 if ((*ienvcell).nbMaterial()==2
123 && m_interface_normal[global_cell].abs()!=0.
124 && m_interface_distance[global_cell].size()==1
125 && m_interface_distance[global_cell].at(0)!=0.){
126 Int32 rtn=hyodaMix()->xCellPoints(global_cell,
127 m_interface_normal[global_cell],
128 m_interface_distance[global_cell].at(0),0);
129 info()<<
"\t[HyodaMats::draw] Cell #"
130 << global_cell.localId()
132 <<
", mat0="<< mat_density[(*ienvcell).cell(0)]
133 <<
", mat1="<< mat_density[(*ienvcell).cell(1)];
134 hyodaMix()->xCellDrawInterface((*ienvcell).globalCell(),0);
151 IMesh* m_defaultMesh;
#define ARCANE_REGISTER_SUB_DOMAIN_FACTORY(aclass, ainterface, aname)
Registers a factory service for the class aclass.
AbstractService(const ServiceBuildInfo &)
Constructor from a ServiceBuildInfo.
Interface of the subdomain manager.
@ PNoRestore
Indicates that the variable should not be restored.
@ PNoDump
Indicates that the variable should not be saved.
NodeConnectedListViewType nodes() const
List of nodes of the entity.
constexpr Int32 localId() const
Local identifier of the entity in the processor subdomain.
Arcane cell with material and environment information.
__host__ __device__ Int32 nbEnvironment() const
Number of environments present in the cell.
Cell globalCell() const
Global cell.
Interface for the material and environment manager of a mesh.
static IMeshMaterialMng * getReference(const MeshHandleOrMesh &mesh_handle, bool create=true)
Retrieves or creates the reference associated with mesh.
Class managing a 3-dimensional real vector.
ISubDomain * subDomain() const
Access to the associated ISubDomain.
Structure containing the information to create a service.
TraceMessageDbg debug(Trace::eDebugLevel=Trace::Medium) const
Flow for a debug message.
TraceMessage info() const
Flow for an information message.
Parameters necessary for building a variable.
MeshVariableScalarRefT< Cell, Real3 > VariableCellReal3
Coordinate type quantity at cell center.
MeshVariableArrayRefT< Cell, Real > VariableCellArrayReal
Quantity at the cell center of real array type.
Always enables tracing in Arcane parts concerning materials.
CellMaterialVariableScalarRef< Real > MaterialVariableCellReal
Material variable of type Real
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
double Real
Type representing a real number.
std::int32_t Int32
Signed integer type of 32 bits.